Hi,
To get started with HTM(.java), I am trying to re-implement the category
prediction example from the Python version in Java.
However, I am trying to figure out the exact model parameters as
specified here:
https://github.com/numenta/nupic/blob/master/examples/prediction/category_prediction/run.py

At first, I am trying to decode the Python example in as much detail as
I am able to. Please correct me where I am wrong:

The model:
- CLA
- One region, one layer with a spatial pooler and a temporal memory.

Sensor:
- read the token list (produced beforehand, one token per line, no
stopwords, sequential order).

Hence, what I am aiming for in the Java implementation (pseudo-code):
- Create a CLA model: `Network.create("CLA", parameters)`
- Create a region: `model.add(Network.createRegion("CLAClassifierRegion"))`
- Create a layer: `region.add(Network.createLayer("Layer 2/3", parameters)
                                .add(new SpatialPooler())
                                .add(new TemporalMemory())`
- Add a sensor to the layer:
`layer.add(Sensor.create(FileSensor::create,
SensorParams.create(Keys::path, "", tokensFile.getAbsolutePath())))));`


The first issue I run into is the sensor which causes a
IllegalArgumentException:
Exception in thread "main" java.lang.IllegalArgumentException: Cannot
initialize this Sensor's MultiEncoder with a null settings

I suspect this might have to do with the FileSensor requiring a CSV
file, doesn't it? The tokens with, however, is one token per line. I was
hoping that this somehow corresponds to a CSV with a single column though.

Furthermore, I am not sure how to train and run the network in the
following. I've created a gist with my initial start, perhaps you could
comment on that: https://gist.github.com/carschno/7f3828c2ea0c1a2b3be9

Thanks!
Carsten



-- 
Carsten Schnober
Doctoral Researcher
Ubiquitous Knowledge Processing (UKP) Lab
FB 20 / Computer Science Department
Technische Universität Darmstadt
Hochschulstr. 10, D-64289 Darmstadt, Germany
phone [+49] (0)6151 16-6227, fax -5455, room S2/02/B111
[email protected]
www.ukp.tu-darmstadt.de

Web Research at TU Darmstadt (WeRC): www.werc.tu-darmstadt.de
GRK 1994: Adaptive Preparation of Information from Heterogeneous Sources
(AIPHES): www.aiphes.tu-darmstadt.de
PhD program: Knowledge Discovery in Scientific Literature (KDSL)
www.kdsl.tu-darmstadt.de

Reply via email to