is there any quickstart for above anomaly detection algorithm code
in the above code they use the active columns and predicted columns to calculate the anomaly score. But as i know the output of SP is active columns indecies í ok but the output of TM is predicted cells (not columns). Can any one explain ?
Thank you very much
When the TM predicts cells, they are in minicolumns structures. To see if the prediction was correct, we compare the next set of active minicolumns from the SP and see if the predicted cells were within those minicolumns.
I’d say first get familiar with how to instantiate encoders, SP and TM objects and feed them data.
Once you’re there you can TM.getPreictedCells(), then for each of these cells get their corresponding column with TM.columnFromCell(cell).
From there you can store those columns as like ‘previouslyPredictedColumns’ and compare them to the columns activated by the SP at the next time step. The proportion of the SP active columns which were also previouslyPredicted is the anomaly score.
Then the next step is to feed the anomaly scores into an anomaly likelihood object to get the likelihood values.
the getActiveCells() function returns the indices of Active cells . It’s a list ( 1-D) not a matrix ( 2-D). How can i convert an index ( that the getActicell() returns) to exact the position of column and the cell in 2-D matrix ?
You use the predicted columns from t-1 and the actual active columns from t. Yes this causes the anomaly score to always be 1 at t = 0 (Since t=-1 doesn’t exist) but you can just ignore that special case.
after get your guides/advices @marty1885@sheiser1… i have run successfully the anomaly, anomalylikelihood, loglikelihood for hotgym dataset ( i use agorithms not OPF ). I tried change some paramether in scalar encoder, TM, anomly() and anomalylikelihood() ( eg: resolution, permernace increase/decrase, slidingwindow , learningPeriod …) and i got different anomaly detection results. I would like to check the right anomaly from the dataset.
I have some question below :
As i search and read in this forum , there is no reference result for hotGym datasets. Is it right ?