Skip to content

Instantly share code, notes, and snippets.

@Baquetron
Baquetron / SDR_anomaly.py
Created July 13, 2017 07:22
SDR anomaly detector example
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
@Baquetron
Baquetron / model_factory.py
Created July 4, 2017 09:02
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'])