Multiple features and binary output


Ok so let’s see if I’m doing anything wrong either in the OPF model parameters or in the file format that could cause the reset not to happen:

Here is an extract of the OPF params : neuron_id is the first colum of the CSV file and is not encoded. It’s just here for sequence numbering. And then right below an extract of the sample file:

'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/
            'verbosity' : 0,

            # Include the encoders we use
            'encoders': {
                u'neuron_id': None,
                u'value': {
                    'clipInput': True,
                    'fieldname': u'value',
                    'maxval': 25.0,
                    'minval': 0.0,
                    'resolution': 0.01,
                    #'n': 50,
                    'name': u'value',
                    '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),
            # (value generated from SENSOR_AUTO_RESET)
            'sensorAutoReset' : None,

        'spEnable': True,

Sample CSV file:

.... other lines with 53 as neuron_id.....
.... other lines with 7229 as neuron_id.....

Do you anything wrong in this ?



The only suspicious thing I see is that you are not specifying an n value for the value encoder. I’m not cure what the default n value is, but it affects the total width of the encoding expected by the SP, which is specified by inputWidth in the sp params.

If this is the only value, I would make it 400 bits and adjust the inputWidth in the sp params to be the same (whatever you make it).


But I thought I read in the documentation that you can only specify one of n, resolution or radius and the 2 others are calculated. here I’m specifying resolution hence the comment on the specification of n. So you think specifying n instead of resolution would be better, right ?



Figures from my thesis (page 83, section 7.2.4) comparing the performance of reset vs non-reset. Reset performed 5x better on my specific case. However, I do not use resets by default. This is not Nupic of course but it is still something.


Yes you are right. I wasn’t thinking.