Skip to content

Instantly share code, notes, and snippets.

View rhyolight's full-sized avatar

Matthew Taylor rhyolight

View GitHub Profile
// The problem space.
var numColumns = 2048;
var cellsPerColumn = 4;
var lengthLargestSide = 64;
// Translate into cell dimensions.
// x = left->right
// y = down->up
// z = near->far
var x = numColumns / lengthLargestSide;
fursty@ubuntu:~/nupic$ ./scripts/run_nupic_tests.py
============================= test session starts ==============================
platform linux2 -- Python 2.7.10 -- pytest-2.5.1 -- /usr/bin/python
plugins: cov, xdist
collected 904 items / 1 errors / 5 skipped
==================================== ERRORS ====================================
___________ ERROR collecting tests/unit/nupic/math/topology_test.py ____________
tests/unit/nupic/math/topology_test.py:27: in <module>
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014-2016, 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.
#
MODEL_PARAMS = \
{'inferenceArgs': {'inputPredictedField': 'auto',
'predictedField': 'packets',
'predictionSteps': [1]},
'modelConfig': {'aggregationInfo': {'days': 0,
'fields': [],
'hours': 0,
'microseconds': 0,
'milliseconds': 0,
'minutes': 0,
import importlib
import sys
import csv
import datetime
import pprint
from nupic.data import fieldmeta
from nupic.data.inference_shifter import InferenceShifter
from nupic.frameworks.opf.modelfactory import ModelFactory
from nupic.frameworks.opf.common_models.cluster_params import (
'''
Created on Feb 8, 2015
@author: David Ray
'''
from datetime import datetime
import csv
import numpy as np
@rhyolight
rhyolight / quicktest.py
Last active July 26, 2016 14:31
Example Use of Raw HTM Algorithms
'''
Created on Feb 8, 2015
@author: David Ray
'''
import numpy as np
import pprint
from nupic.frameworks.opf.common_models.cluster_params import (
gopal-m@gopal-m:~/nupic$ py.test tests/unit
====================================================== test session starts =======================================================
platform linux2 -- Python 2.7.11 -- pytest-2.5.1
plugins: cov, xdist
collected 120 items / 67 errors
tests/unit/nupic/utils_test.py ...s..
tests/unit/nupic/algorithms/anomaly_test.py ..............
tests/unit/nupic/algorithms/knn_classifier_test.py .........s..
tests/unit/nupic/data/file_record_stream_test.py ......
gcc --version
gcc (Ubuntu 4.9.3-5ubuntu1) 4.9.3
g++ --version
g++ (Ubuntu 4.9.3-5ubuntu1) 4.9.3
~/nupic.core/build/scripts$ make -j3
[ 9%] [ 9%] [ 10%] Built target CapnProto
Built target Apr1StaticLib
Built target Swig
#!/usr/bin/env python
import copy
import numpy as np
import csv
import os
import json
import math
from pkg_resources import resource_filename
from nupic.encoders import SDRCategoryEncoder, ScalarEncoder, DateEncoder, MultiEncoder