Created
June 8, 2013 04:01
-
-
Save oxtopus/5733989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from nupic.frameworks.opf.clamodel import CLAModel | |
params = \ | |
{'clParams': {'alpha': 0.0001, | |
'clVerbosity': 0, | |
'regionName': 'CLAClassifierRegion', | |
'steps': '1,5'}, | |
'inferenceType': 'TemporalMultiStep', | |
'sensorParams': {'encoders': {'consumption': {'clipInput': True, | |
'fieldname': u'consumption', | |
'n': 100, | |
'name': u'consumption', | |
'type': 'AdaptiveScalarEncoder', | |
'w': 21}, | |
'timestamp_dayOfWeek': {'dayOfWeek': (21, 1), | |
'fieldname': u'timestamp', | |
'name': u'timestamp_dayOfWeek', | |
'type': 'DateEncoder'}, | |
'timestamp_timeOfDay': {'fieldname': u'timestamp', | |
'name': u'timestamp_timeOfDay', | |
'timeOfDay': (21, 1), | |
'type': 'DateEncoder'}, | |
'timestamp_weekend': {'fieldname': u'timestamp', | |
'name': u'timestamp_weekend', | |
'type': 'DateEncoder', | |
'weekend': 21}}, | |
'sensorAutoReset': None, | |
'verbosity': 0}, | |
'spEnable': True, | |
'spParams': {'coincInputPoolPct': 0.5, | |
'columnCount': 2048, | |
'globalInhibition': 1, | |
'inputWidth': 0, | |
'numActivePerInhArea': 40, | |
'seed': 1956, | |
'spVerbosity': 0, | |
'synPermActiveInc': 0.10000000000000001, | |
'synPermConnected': 0.10000000000000001, | |
'synPermInactiveDec': 0.01}, | |
'tpEnable': True, | |
'tpParams': {'activationThreshold': 16, | |
'cellsPerColumn': 32, | |
'columnCount': 2048, | |
'globalDecay': 0.0, | |
'initialPerm': 0.20999999999999999, | |
'inputWidth': 2048, | |
'maxAge': 0, | |
'maxSegmentsPerCell': 128, | |
'maxSynapsesPerSegment': 32, | |
'minThreshold': 12, | |
'newSynapseCount': 20, | |
'outputType': 'normal', | |
'pamLength': 1, | |
'permanenceDec': 0.10000000000000001, | |
'permanenceInc': 0.10000000000000001, | |
'seed': 1960, | |
'temporalImp': 'cpp', | |
'verbosity': 0}, | |
'trainSPNetOnlyIfRequested': False} | |
CLAModel(**params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python clamodel_runtime_error.py | |
ImportError: numpy.core.multiarray failed to import | |
ERROR: Could not get valid spec for Region: py.RecordSensor [/Users/oxtopus/Desktop/nta/nupic/nta/engine/RegionImplFactory.cpp line 455] | |
Traceback (most recent call last): | |
File "clamodel_runtime_error.py", line 59, in <module> | |
CLAModel(**params) | |
File "/Users/oxtopus/Desktop/nta/eng/lib/python2.6/site-packages/nupic/frameworks/opf/clamodel.py", line 202, in __init__ | |
anomalyParams) | |
File "/Users/oxtopus/Desktop/nta/eng/lib/python2.6/site-packages/nupic/frameworks/opf/clamodel.py", line 1059, in __createCLANetwork | |
n.addRegion("sensor", "py.RecordSensor", json.dumps(dict(verbosity=sensorParams['verbosity']))) | |
File "/Users/oxtopus/Desktop/nta/eng/lib/python2.6/site-packages/nupic/engine/__init__.py", line 636, in addRegion | |
super(Network, self).addRegion(name, nodeType, nodeParams) | |
File "/Users/oxtopus/Desktop/nta/eng/lib/python2.6/site-packages/nupic/bindings/engine_internal.py", line 1011, in addRegion | |
return _engine_internal.Network_addRegion(*args, **kwargs) | |
RuntimeError: Could not get valid spec for Region: py.RecordSensor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment