Hello dear Nupicers :)

I am working on a temporal classification with NuPIC (on EEG data), and I
have discovered that:
*) there used to be old temporal-classification model: how did it work? how
was the performance? why is it not used anymore?
*) then I used a workaround with multiple models
*) the new temporal memory could be solution to this problem (yay! :) ) - I
did not check it closely yet, so is it in a runnable state? Do we have an
example? :)

I've written my findings in a wiki article:
https://github.com/numenta/nupic/wiki/Temporal-classification

So please feel free to discuss here and edit.

Enclosing the text for convenience:

--------------------------------------------------------------------------
Temporal classification

<https://github.com/numenta/nupic/wiki/Temporal-classification#description-of-temporal-classification>Description
of Temporal classification

Temporal classification is a task of classification of sequences (time
series data) into given categories. For more see
https://en.wikipedia.org/wiki/Time_series#Classification
<https://github.com/numenta/nupic/wiki/Temporal-classification#methods-to-do-temporal-classification-in-nupic>Methods
to do Temporal Classification in NuPIC
<https://github.com/numenta/nupic/wiki/Temporal-classification#old-temporal-classification-model-obsolete>Old:
temporal classification model (obsolete)

Was used by NuPIC, but now is mentioned unused (and not sure to work)
https://github.com/numenta/nupic/blob/4723a4616fdaa9f3a78c6b851d8bfa855f0fb44c/nupic/frameworks/opf/clamodel.py#L407
https://github.com/numenta/nupic/blob/4723a4616fdaa9f3a78c6b851d8bfa855f0fb44c/nupic/frameworks/opf/clamodel.py#L546

TODO: please explain how it used to work, why was it abandoned?
<https://github.com/numenta/nupic/wiki/Temporal-classification#current-compare-multiple-models-prototypes>Current:
compare multiple models (prototypes)

As nowadays no method for temporal classification is directly provided, we
can "fallback" to multiple models, training each for one of the classes,
the each model serves as a prototype for the given class.
<https://github.com/numenta/nupic/wiki/Temporal-classification#training>
Training:

Separate the data (sequences) by class, and train a model on data of only
one class.
<https://github.com/numenta/nupic/wiki/Temporal-classification#classification>
Classification:

Sequence to be tested is fed into both (all) models, and the best
performant model is selected as a class for the tested sample.
<https://github.com/numenta/nupic/wiki/Temporal-classification#results>
Results:

(just my unofficial experience, I had very good results with this method on
EEG binary classification (healthy/ill), compared to complex multi layer
NNs.
<https://github.com/numenta/nupic/wiki/Temporal-classification#soonishfuture-temporal-memory>(Soonish)Future:
Temporal Memory

Temporal memory will transform a sequence to a single SDR. This way
temporal classification could easily be made.
<https://github.com/numenta/nupic/wiki/Temporal-classification#training-1>
Training:

Create your model something like: data->SP->TP->TM-->SP2 where spatial
pooler SP2 will receive (more stable) output from the TM (SDR representing
the current sequence) + the class for given sequence (all the time data
from the given sentence is fed, the belonging class is passed).
<https://github.com/numenta/nupic/wiki/Temporal-classification#classification-1>
Classification:

Run all your datapoints for one sequence through TP->TM, obtain SDR
describing the sequence, feed it into the SP2 and look which of the classes
has the most bits ON, that is the label.
<https://github.com/numenta/nupic/wiki/Temporal-classification#improvement>
Improvement:

Difference to the model above is that TM creates a stable pattern for the
whole sequence (or parts of it) and that SP2 has notion of both the
classes, so it can discriminate better.
<https://github.com/numenta/nupic/wiki/Temporal-classification#usecases>
Usecases

   - ECG/EEG classification
   - TODO ...


-- 
Marek Otahal :o)

Reply via email to