Sure, here's the stacktrace:
Exception in thread "main" java.lang.IllegalArgumentException: Cannot
initialize this Sensor's MultiEncoder with a null settings
at
org.numenta.nupic.network.sensor.HTMSensor.initEncoders(HTMSensor.java:595)
at
org.numenta.nupic.network.sensor.HTMSensor.initEncoder(HTMSensor.java:566)
at org.numenta.nupic.network.Network.setSensor(Network.java:549)
at org.numenta.nupic.network.Region.setNetwork(Region.java:126)
at org.numenta.nupic.network.Network.add(Network.java:489)
at
org.numenta.nupic.examples.category_prediction.CategoryPrediction.main(CategoryPrediction.java:43)
The tokens.txt file is here:
https://gist.github.com/carschno/c0504952c9f7f7f9799a
Carsten
Am 19.10.2015 um 16:11 schrieb cogmission (David Ray):
> Hi Carsten,
>
> This is a two-parter...
>
> I can help with the first, and maybe @rhyolight can help with the second.
>
> RE: The first problem (IllegalArgumentException) can you write back with
> your whole stack trace?
>
> We'll take it from there...
>
> Cheers,
> David
>
> On Mon, Oct 19, 2015 at 8:15 AM, Carsten Schnober
> <[email protected]
> <mailto:[email protected]>> wrote:
>
> 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
> <tel:%5B%2B49%5D%20%280%296151%2016-6227>, fax -5455, room S2/02/B111
> [email protected]
> <mailto:[email protected]>
> www.ukp.tu-darmstadt.de <http://www.ukp.tu-darmstadt.de>
>
> Web Research at TU Darmstadt (WeRC): www.werc.tu-darmstadt.de
> <http://www.werc.tu-darmstadt.de>
> GRK 1994: Adaptive Preparation of Information from Heterogeneous Sources
> (AIPHES): www.aiphes.tu-darmstadt.de <http://www.aiphes.tu-darmstadt.de>
> PhD program: Knowledge Discovery in Scientific Literature (KDSL)
> www.kdsl.tu-darmstadt.de <http://www.kdsl.tu-darmstadt.de>
>
>
>
>
> --
> /With kind regards,/
>
> David Ray
> Java Solutions Architect
>
> *Cortical.io <http://cortical.io/>*
> Sponsor of: HTM.java <https://github.com/numenta/htm.java>
>
> [email protected] <mailto:[email protected]>
> http://cortical.io <http://cortical.io/>
--
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