Hello NuPIC,

There is "inferenceType" field both in search_def and also in model_params
(generated from search_def) Are there also equivalents for "iterationCount"
and "swarmSize" in model_params? I'm asking because I've resurrected model
standard way:
model = ModelFactory.loadFromCheckpoint("saved_model_state")

and I'm wondering if it is possible to get the model_params which were used
when this model was created (before it was saved using model.save)? So far
I've set debugger on line where model was resurrected and started to play
with it. I've noticed that there are various get* functions:


ipdb> model.
model.anomalyAddLabel      model.enableInference
model.getInferenceArgs     model.isInferenceEnabled
model.resetSequenceStates  model.setFieldStatistics
model.anomalyGetLabels     model.enableLearning
model.getInferenceType     model.isLearningEnabled
model.run                  model.write
model.anomalyRemoveLabels  model.finishLearning
model.getParameter         model.load
model.save                 model.writeToCheckpoint
model.disableInference     model.getAnomalyParameter
model.getProtoType         model.read
model.setAnomalyParameter
model.disableLearning      model.getFieldInfo
model.getRuntimeStats      model.readFromCheckpoint
model.setEncoderLearning

The closest I get are those functions but I do not know if e.g. numRunCalls
corresponds to iterationCount:
##########################################################################################################

ipdb> model.getFieldInfo(includeClassifierOnlyField=True)
(FieldMetaInfoBase(name='sine', type='float', special=''),)

ipdb> model.getFieldInfo()
(FieldMetaInfoBase(name='sine', type='float', special=''),)

ipdb> model.getInferenceArgs()
{'predictedField': 'sine'}

ipdb> model.getInferenceType()
'TemporalAnomaly'

ipdb> model.getRuntimeStats()
{'numRunCalls': 3000, 'TemporalNextStep': {}}


Those are not working (I do not know what parameters should I to pass into
it):
###############################################################################

ipdb> model.getAnomalyParameter("swarmSize")
ERR:  No item named: swarmSize
[/home/travis/build/numenta/nupic.core/src/nupic/ntypes/Collection.cpp line
94]
*** Exception: getParameter -- parameter name 'swarmSize' does not exist in
region AnomalyClassifier of type py.KNNAnomalyClassifierRegion

#
https://github.com/numenta/nupic/blob/master/src/nupic/frameworks/opf/clamodel.py#L332
# self._getAnomalyClassifier().getParameter(param)
ipdb> model._getAnomalyClassifier()
<nupic.engine.Region object at 0x7fb9de282bd0>


ipdb> model.getParameter("swarmSize")
*** RuntimeError: 'swarmSize' parameter is not exposed by clamodel.


I was studying following documents/codes but I did not figured it out:
#####################################################################
http://numenta.org/docs/nupic/classnupic_1_1frameworks_1_1opf_1_1modelfactory_1_1_model_factory.html
http://numenta.org/docs/nupic/classnupic_1_1frameworks_1_1opf_1_1model_1_1_model.html

https://github.com/numenta/nupic/blob/master/src/nupic/frameworks/opf/clamodel.py
https://github.com/numenta/nupic/blob/master/src/nupic/frameworks/opf/model.py
https://github.com/numenta/nupic/blob/master/src/nupic/frameworks/opf/modelfactory.py



One surprising thing that I've noticed is that e.g. there is function
"writeToCheckpoint" of model (see above my ipdb command) but in this
documentation it is not mentioned
http://numenta.org/docs/nupic/classnupic_1_1frameworks_1_1opf_1_1model_1_1_model.html
How is this possible?

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:
[email protected]
http://stackoverflow.com/users/1616488/wakan-tanka
https://github.com/wakatana
https://twitter.com/MackoP00h

Reply via email to