Skip to content

Instantly share code, notes, and snippets.

@Baquetron
Created July 4, 2017 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Baquetron/4e4220b5b9a7dfcab73b996f26b69e4c to your computer and use it in GitHub Desktop.
Save Baquetron/4e4220b5b9a7dfcab73b996f26b69e4c to your computer and use it in GitHub Desktop.
Model_factory CLA error
modelClass = None
if modelConfig['model'] == "HTMPrediction":
modelClass = HTMPredictionModel
elif modelConfig['model'] == "TwoGram":
modelClass = TwoGramModel
elif modelConfig['model'] == "PreviousValue":
modelClass = PreviousValueModel
else:
raise Exception("ModelFactory received unsupported Model type: %s" % \
modelConfig['model'])
return modelClass(**modelConfig['modelParams'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment