Well, that really depends on what you want the model to do. Do you want it to learn and evolve with the data stream? Or do you want it to only understand one snapshot in time (the training data stream)?
If you are looking for anomalies, I would say you train on non-anomalous data, then turn learning OFF. Anything that strays too far from the training data would be anomalous, but your model would not evolve over time to recognize new temporal patterns. So it depends on what you want.
Since you’re trying to spot abnormal bp I think you’re right to learn only on normal bp, and then turn learning off before the abnormals come in. Are you planning to combine the data from all 30 ‘normal’ patients into a big ‘training’ set and use the other 40 as a big ‘testing’ set?
As you probably know the online learning setting doesn’t generally required that you divide data into train and test, but I think it makes sense in your case. It all depends what you want the model to used to seeing.
@rhyolight Yes I want to detect anomalies, I don’t think I can expect the model evolve over time to recognizes new temporal patterns as I have limited rows of data. My aim is to detect abnormal signs for the patients who will have stroke.
@sheiser1 yes I was thinking about online learning characteristic of the HTM, and thanks for mentioning it. but because I want to calculate TP,FN, FP,TN then I decided for learning only feed normal bp (160 files which each file has 24 hours of readings for bp) and
then for testing I mix the normal and abnormal (40 abnormal , 30 normal) to see if it can detect anomalies and calculate the accuracy of the model?!
@sheiser1 so if the HTM is an online learning approach, why the HTM has option of disabling the learning for SP and TM? Is it for development and testing purposes? if we leave learning on , then the model will learn all the patterns of and then it does not score any anomalies?!