I tried to change One Hot Gym Prediction to use getScalarMetricWithTimeOfDayAnomalyParams instead of swarming but I’m getting the following error:
Exception has occurred: ValueError
Unknown field name 'c0' 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 'c0'.
File "C:\Python27\Lib\site-packages\nupic\encoders\base.py", line 229, in _getInputValue
fieldName, knownFields, fieldName
File "C:\Python27\Lib\site-packages\nupic\encoders\multi.py", line 106, in encodeIntoArray
encoder.encodeIntoArray(self._getInputValue(obj, name), output[offset:])
File "C:\Python27\Lib\site-packages\nupic\regions\record_sensor.py", line 377, in compute
self.encoder.encodeIntoArray(data, outputs["dataOut"])
File "C:\Python27\Lib\site-packages\nupic\bindings\regions\PyRegion.py", line 186, in guardedCompute
return self.compute(inputs, DictReadOnlyWrapper(outputs))
File "C:\Python27\Lib\site-packages\nupic\bindings\engine_internal.py", line 1559, in compute
return _engine_internal.Region_compute(self)
File "C:\Python27\Lib\site-packages\nupic\engine\__init__.py", line 435, in compute
return self._region.compute()
File "C:\Python27\Lib\site-packages\nupic\frameworks\opf\htm_prediction_model.py", line 521, in _sensorCompute
sensor.compute()
File "C:\Python27\Lib\site-packages\nupic\frameworks\opf\htm_prediction_model.py", line 436, in run
self._sensorCompute(inputRecord)
File "D:\Projects\nupic\examples\opf\clients\hotgym\prediction\one_gym\run.py", line 99, in runIoThroughNupic
"kw_energy_consumption": consumption
File "D:\Projects\nupic\examples\opf\clients\hotgym\prediction\one_gym\run.py", line 141, in runModel
runIoThroughNupic(inputData, model, gymName, plot)
File "D:\Projects\nupic\examples\opf\clients\hotgym\prediction\one_gym\run.py", line 151, in <module>
runModel(GYM_NAME, plot=plot)
File "C:\Python27\Lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\Lib\runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "C:\Python27\Lib\runpy.py", line 252, in run_path
The code with my changes can be found here: https://gist.github.com/razvan-panda/ce11d0e2064e6ba34123d95c5136e8a5