There is no "predictedField" in https://raw.githubusercontent.com/numenta/nupic/master/examples/opf/clients/hotgym/simple/model_params.py is this OK? Where in the hierarchy should be added?
On Thu, May 5, 2016 at 10:56 PM, Matthew Taylor <m...@numenta.org> wrote: > I see. Yes, you can have one CSV file with several columns of data and use > it for the input for more than one model. The "predictedField" model param > should match the column header for the field you want to process. Does that > make sense? > > --------- > Matt Taylor > OS Community Flag-Bearer > Numenta > > On Thu, May 5, 2016 at 1:42 PM, Wakan Tanka <wakat...@gmail.com> wrote: > >> Matt, >> I understand this. But my initial idea was coming from your hotgym >> tutorial where you had 2 datasets (1st original, 2nd with Tuesdays removed) >> and two model params (one with TemporalAnomaly and another with >> TemporalMultiStep). If I knew which model_params fields are mapped to which >> csv column it would be possible to have only one csv with 3 columns >> (timestamp, kw cnsmpt, kw cnsmpt rm tue) and only one model_params (no >> matter if its TA or TMS becaue) and I will be able to feed model either >> with 1st dataset or 2nd (just with one if else branch from python) and. It >> is just my personal opinion but it seems to me more clearer than having >> bunch of files. Regardless of if you agree with me or not, is this >> possible? Thank you. >> >> Regards >> >> On Thu, May 5, 2016 at 4:15 PM, Matthew Taylor <m...@numenta.org> wrote: >> >>> Wakan, I'm a little confused by your email. If you copy and paste model >>> params from some sample project, you can't expect it to work with any input >>> data you throw at it. You must customize either the model params to match >>> your data, or your data field names to match the copy/pasted model params. >>> >>> --------- >>> Matt Taylor >>> OS Community Flag-Bearer >>> Numenta >>> >>> On Wed, May 4, 2016 at 5:26 AM, Wakan Tanka <wakat...@gmail.com> wrote: >>> >>>> Helo NuPIC, >>>> >>>> I've downloaded model_params.py for hotgym from this link: >>>> >>>> >>>> https://raw.githubusercontent.com/numenta/nupic/master/examples/opf/clients/hotgym/simple/model_params.py >>>> >>>> >>>> When I use this one I get this error: >>>> >>>> Traceback (most recent call last): >>>> File "run_nupic.py", line 456, in <module> >>>> debug = False) >>>> File "run_nupic.py", line 198, in run_experiment >>>> Debug = debug >>>> File "modules/user_defined_functions.py", line 167, in runModel >>>> result_unshifted = model.run(input_record) >>>> File >>>> "/home/nupic/.local/lib/python2.7/site-packages/nupic/frameworks/opf/clamodel.py", >>>> line 395, in run >>>> self._sensorCompute(inputRecord) >>>> File >>>> "/home/nupic/.local/lib/python2.7/site-packages/nupic/frameworks/opf/clamodel.py", >>>> line 480, in _sensorCompute >>>> sensor.compute() >>>> File >>>> "/home/nupic/.local/lib/python2.7/site-packages/nupic/engine/__init__.py", >>>> line 446, in compute >>>> return self._region.compute() >>>> File >>>> "/home/nupic/.local/lib/python2.7/site-packages/nupic/bindings/engine_internal.py", >>>> line 1384, in compute >>>> return _engine_internal.Region_compute(self) >>>> File >>>> "/home/nupic/.local/lib/python2.7/site-packages/nupic/regions/RecordSensor.py", >>>> line 331, in compute >>>> self.encoder.encodeIntoArray(data, outputs["dataOut"]) >>>> File >>>> "/home/nupic/.local/lib/python2.7/site-packages/nupic/encoders/multi.py", >>>> line 95, in encodeIntoArray >>>> encoder.encodeIntoArray(self._getInputValue(obj, name), >>>> output[offset:]) >>>> File >>>> "/home/nupic/.local/lib/python2.7/site-packages/nupic/encoders/base.py", >>>> line 212, in _getInputValue >>>> fieldName, knownFields, fieldName >>>> ValueError: Unknown field name 'consumption' in input record. Known >>>> fields are 'timestamp, kw_energy_consumption'. >>>> This could be because input headers are mislabeled, or because input >>>> data rows do not contain a value for 'consumption'. >>>> >>>> >>>> I know that the problem is in the column naming of input.csv file, it's >>>> structure is: >>>> >>>> timestamp,kw_energy_consumption >>>> datetime,float >>>> T, >>>> 7/2/10 0:00,21.2 >>>> 7/2/10 1:00,16.4 >>>> 7/2/10 2:00,4.7 >>>> ... >>>> >>>> >>>> If I change "kw_energy_consumption" in csv file to "consumption" >>>> everything is working. It also works vice versa: when I change >>>> "consumption" to "kw_energy_consumption" in model_params.py and keep >>>> input.csv untouched. But what if I do not want to touch the csv file nor >>>> the model_params.py, is this possible? In other words: I want to know which >>>> elements of model_params.py represents columns in my csv (or in more >>>> general: what is the structure of model_params.py)? If I know this then I >>>> can load model_params.py and change it's instance in memory (not in hdd) >>>> directly from python. I mean following like this: >>>> >>>> model_params["MODEL_PARAMS"]["model"] = "SOMETHING DIFFERENT THAN IT >>>> WAS BEFORE" >>>> >>>> >>>> PS: I was trying to somehow figure out which fields to change via >>>> debugger using: >>>> >>>> python -m pdb run_nupic.py >>>> import nupic.frameworks.opf.clamodel as CLAModel >>>> b CLAModel._sensorCompute >>>> >>>> but I was not luck if somebody have tip how to do that I would be glad. >>>> >>>> >>>> >>>> >>>> >>>> >>>> Best Regards >>>> >>>> Wakan Tanka >>>> >>>> -- >>>> Best Regards >>>> >>>> Name: Wakan Tanka a.k.a. Wakatana a.k.a. MackoP00h >>>> Location: Europe >>>> Note: I'm non native English speaker so please bare with me ;) >>>> Contact: >>>> wakat...@gmail.com >>>> http://stackoverflow.com/users/1616488/wakan-tanka >>>> https://github.com/wakatana >>>> https://twitter.com/MackoP00h >>>> >>> >>> >> >> >> -- >> Best Regards >> >> Name: Wakan Tanka a.k.a. Wakatana a.k.a. MackoP00h >> Location: Europe >> Note: I'm non native English speaker so please bare with me ;) >> Contact: >> wakat...@gmail.com >> http://stackoverflow.com/users/1616488/wakan-tanka >> https://github.com/wakatana >> https://twitter.com/MackoP00h >> > > -- Best Regards Name: Wakan Tanka a.k.a. Wakatana a.k.a. MackoP00h Location: Europe Note: I'm non native English speaker so please bare with me ;) Contact: wakat...@gmail.com http://stackoverflow.com/users/1616488/wakan-tanka https://github.com/wakatana https://twitter.com/MackoP00h