Thanks Mark and Subutai, I will try these but I think I need another strategy ^^
On Tue, Oct 21, 2014 at 2:37 PM, Subutai Ahmad <[email protected]> wrote: > > Hmm, those generally look pretty good to me. You could try these two: > > 1) Change cellsPerColumn down to 16. This is probably the safest change. > You could even maybe try 8. > > 2) The other set to try is lower the number of columns but still keep 2% > sparsity: > > Set columnCount to 1024 (need to change for SP and TP) > > Also set numActiveColumnsPerInhArea to 20 > > I am not sure how well this will work. If it runs a lot faster, then you > might then need to spend some time to tune some of the other parameters in > the TP, such as newSynapseCount. > > Let us know if this worked! > > —Subutai > > > On Tue, Oct 21, 2014 at 2:15 PM, Nicolas Thiébaud <[email protected]> > wrote: > >> Thanks Subutai, this is I have been using: >> >> MODEL_PARAMS = { >> # Type of model that the rest of these parameters apply to. >> 'model': "CLA", >> >> # Version that specifies the format of the config. >> 'version': 1, >> >> # Intermediate variables used to compute fields in modelParams and >> also >> # referenced from the control section. >> #'aggregationInfo': { 'days': 0, >> # 'fields': [(u'c1', 'sum'), (u'c0', 'first')], >> # 'hours': 1, >> # 'microseconds': 0, >> # 'milliseconds': 0, >> # 'minutes': 0, >> # 'months': 0, >> # 'seconds': 0, >> # 'weeks': 0, >> # 'years': 0}, >> >> 'predictAheadTime': None, >> >> # Model parameter dictionary. >> 'modelParams': { >> # The type of inference that this model will perform >> 'inferenceType': 'TemporalAnomaly', >> >> 'sensorParams': { >> # Sensor diagnostic output verbosity control; >> # if > 0: sensor region will print out on screen what it's >> sensing >> # at each step 0: silent; >=1: some info; >=2: more info; >> # >=3: even more info (see compute() in >> py/regions/RecordSensor.py) >> 'verbosity' : 0, >> >> # Example: >> # dsEncoderSchema = [ >> # DeferredDictLookup('__field_name_encoder'), >> # ], >> # >> # (value generated from DS_ENCODER_SCHEMA) >> 'encoders': { >> u'timestamp_timeOfDay': None, >> u'timestamp_dayOfWeek': None, >> u'timestamp_weekend': None, >> u'channel1': { >> 'clipInput': True, >> 'fieldname': u'channel1', >> 'maxval': 4.0, >> 'minval': -4.0, >> 'n': 134, >> 'name': u'channel1', >> 'type': 'ScalarEncoder', >> 'w': 21 >> }, >> }, >> >> # A dictionary specifying the period for >> automatically-generated >> # resets from a RecordSensor; >> # >> # None = disable automatically-generated resets (also >> disabled if >> # all of the specified values evaluate to 0). >> # Valid keys is the desired combination of the following: >> # days, hours, minutes, seconds, milliseconds, microseconds, >> weeks >> # >> # Example for 1.5 days: sensorAutoReset = >> dict(days=1,hours=12), >> 'sensorAutoReset' : None, >> }, >> >> 'spEnable': True, >> >> 'spParams': { >> # SP diagnostic output verbosity control; >> # 0: silent; >=1: some info; >=2: more info; >> 'spVerbosity' : 0, >> >> # Spatial Pooler implementation selector. >> # Options: 'py', 'cpp' (speed optimized, new) >> 'spatialImp' : 'cpp', >> >> 'globalInhibition': 1, >> >> # Number of columns in the SP (must be same as in TP) >> 'columnCount': 2048, >> >> 'inputWidth': 0, >> >> # SP inhibition control (absolute value); >> # Maximum number of active columns in the SP region's output >> (when >> # there are more, the weaker ones are suppressed) >> 'numActiveColumnsPerInhArea': 40, >> >> 'seed': 1956, >> >> # potentialPct >> # What percent of the columns's receptive field is available >> # for potential synapses. >> 'potentialPct': 0.8, >> >> # The default connected threshold. Any synapse whose >> # permanence value is above the connected threshold is >> # a "connected synapse", meaning it can contribute to the >> # cell's firing. Typical value is 0.10. >> 'synPermConnected': 0.1, >> >> 'synPermActiveInc': 0.0001, >> >> 'synPermInactiveDec': 0.0005, >> >> 'maxBoost': 1.0, >> }, >> >> # Controls whether TP is enabled or disabled; >> # TP is necessary for making temporal predictions, such as >> predicting >> # the next inputs. Without TP, the model is only capable of >> # reconstructing missing sensor inputs (via SP). >> 'tpEnable' : True, >> >> 'tpParams': { >> # TP diagnostic output verbosity control; >> # 0: silent; [1..6]: increasing levels of verbosity >> # (see verbosity in nta/trunk/py/nupic/research/TP.py and >> TP10X*.py) >> 'verbosity': 0, >> >> # Number of cell columns in the cortical region (same number >> for >> # SP and TP) >> # (see also tpNCellsPerCol) >> 'columnCount': 2048, >> >> # The number of cells (i.e., states), allocated per column. >> 'cellsPerColumn': 32, >> >> 'inputWidth': 2048, >> >> 'seed': 1960, >> >> # Temporal Pooler implementation selector (see _getTPClass in >> # CLARegion.py). >> 'temporalImp': 'cpp', >> >> # New Synapse formation count >> # NOTE: If None, use spNumActivePerInhArea >> # >> # TODO: need better explanation >> 'newSynapseCount': 20, >> >> # Maximum number of synapses per segment >> # > 0 for fixed-size CLA >> # -1 for non-fixed-size CLA >> # >> # TODO: for Ron: once the appropriate value is placed in TP >> # constructor, see if we should eliminate this parameter from >> # description.py. >> 'maxSynapsesPerSegment': 32, >> >> # Maximum number of segments per cell >> # > 0 for fixed-size CLA >> # -1 for non-fixed-size CLA >> # >> # TODO: for Ron: once the appropriate value is placed in TP >> # constructor, see if we should eliminate this parameter from >> # description.py. >> 'maxSegmentsPerCell': 128, >> >> # Initial Permanence >> # TODO: need better explanation >> 'initialPerm': 0.21, >> >> # Permanence Increment >> 'permanenceInc': 0.1, >> >> # Permanence Decrement >> # If set to None, will automatically default to >> tpPermanenceInc >> # value. >> 'permanenceDec' : 0.1, >> >> 'globalDecay': 0.0, >> >> 'maxAge': 0, >> >> # Minimum number of active synapses for a segment to be >> considered >> # during search for the best-matching segments. >> # None=use default >> # Replaces: tpMinThreshold >> 'minThreshold': 9, >> >> # Segment activation threshold. >> # A segment is active if it has >= >> tpSegmentActivationThreshold >> # connected synapses that are active due to infActiveState >> # None=use default >> # Replaces: tpActivationThreshold >> 'activationThreshold': 12, >> >> 'outputType': 'normal', >> >> # "Pay Attention Mode" length. This tells the TP how many new >> # elements to append to the end of a learned sequence at a >> time. >> # Smaller values are better for datasets with short sequences, >> # higher values are better for datasets with long sequences. >> 'pamLength': 3, >> }, >> >> # Don't create the classifier since we don't need predictions. >> 'clEnable': False, >> 'clParams': None, >> >> 'anomalyParams': { u'anomalyCacheRecords': None, >> u'autoDetectThreshold': None, >> u'autoDetectWaitRecords': 2184}, >> >> 'trainSPNetOnlyIfRequested': False, >> }, >> } >> >> On Tue, Oct 21, 2014 at 2:10 PM, Subutai Ahmad <[email protected]> >> wrote: >> >>> Hi Nicolas, >>> >>> Yeah, 913 years might be too long! Can you email the model params file >>> you are using? I could look at that and try to suggest some changes. >>> >>> However, 10 msecs per data point is not too bad for the HTM. It might be >>> hard to get too much faster! >>> >>> --Subutai >>> >>> On Tue, Oct 21, 2014 at 1:45 PM, Nicolas Thiébaud <[email protected] >>> > wrote: >>> >>>> Hi, >>>> >>>> What are the parameters we can tune to train and predict faster. I am >>>> seeing ingestion speed without learning at 100 scalar points points per >>>> second. >>>> >>>> If I downsample my input data (EEG) to 100Hz which is a minimum >>>> acceptable and using a 16 core amazon instance, I would need 913 years (not >>>> corrected for Moore's law). >>>> >>>> Which model params should I try to tune? >>>> >>>> Thank you for the help, >>>> >>>> Nicolas. >>>> >>> >>> >> >
