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.bindings.sdr import SDR | |
from nupic.bindings.algorithms import SpatialPooler as SP | |
a=SDR([100]) | |
a.randomize(0.05) | |
a.sparse | |
b=SDR([100]) | |
sp=SP([100],[100]) | |
sp.compute(a.sparse, True, b.sparse) | |
b.sparse | |
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
####>> UPDATED JOB RESULTS: | |
{ u'bestModel': 104195, | |
u'bestValue': 4.43, | |
u'metrics': { u"multiStepBestPredictions:multiStep:errorMetric='aae':steps=1:window=1000:field=ecg": 4.43, | |
u"multiStepBestPredictions:multiStep:errorMetric='altMAPE':steps=1:window=1000:field=ecg": 0.46635898904319556, | |
u"prediction:trivial:errorMetric='aae':steps=1:window=1000:field=ecg": 3.752, | |
u"prediction:trivial:errorMetric='altMAPE':steps=1:window=1000:field=ecg": 0.39498395640859363}, | |
u'saved': True} (elapsed time: 31110.6 secs) | |
##>> UPDATED STATUS: | |
Completed generation #2 of swarm 'modelParams|sensorParams|encoders|ecg' with a best errScore of 4.601. Matured swarm(s): [u'modelParams|sensorParams|encoders|ecg'] |
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 | |
import numpy as np | |
import random as r | |
import nupic | |
from nupic.encoders.coordinate import CoordinateEncoder as Enc | |
e=Enc(w=25, n=1000) | |
print e |
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.encoders.multi import SimpleVector as Vec | |
import time | |
mx=10**5 | |
start=time.time() | |
#create big Vector | |
v = Vec(mx,0,100) | |
stop=time.time() |