Function getMatchingCells() for ExtendedTemporalMemory?

I want to know how better ExtendedTemporalMemory for predicting anomaly by a sinus-signal than TemporalMemory.
But I do not find a corresponding getMatchingCells() in ExtendedTemporalMemory.
Can anyone help me for implementing this function or giving me a pseudocode in ETM?

Best thanks, Binh

It’s ambiguous what a “matching cell” would be. In the TM it’s simply the cells that have matching segments. But now there are apical and basal dendrites. What does it take for a cell to become “matching”? Does it need a matching apical and basal segment? Or just one of either?

Why do you need this method? We don’t consume it anywhere. The only place it exists is on the C++ TM, and I’m tempted to remove that. The words “matching cell” don’t mean anything. Segments match. Cells don’t match.

Note that the ExtendedTemporalMemory is experimental and not supported.

in TM we use this function for getting the SDR at output.
Maybe another function of ETM can provide the output SDR, but I do not know.
@mrcslws Can you help me?

You should either call getActiveCells or getPredictiveCells, depending on which you want.

getMatchingCells() is like getPredictiveCells(), but with a lower threshold. Matching segments only have to have minThreshold active synapses, and the synapses’ permanences don’t have to be above the connectedPermanence.

if I use getPredictiveCells(), I can not get a good prediction result.
By using getWinnerCells(), the prediction is perfect, but have very big anomaly score.
By TM, I get good prediction and reasonable anomaly score.

Another point to keep in mind which may help to better understand how the TM is used, is to take a look at what the downstream components take from the TM. For instance, the CLAClassifier uses the getActiveCells() method of the TM to get its “active cells”; and the Anomaly/AnomalyLikelihood uses the getPredictiveCells() to derive the “predicted columns” (finds the column each predictive cell belongs to -> eliminating duplicates).

thanks for your help. It is exactly what we are using.
For getting good results, we have to change some parameters of ETM slightly.