search_def_sar.json below:
{
"includedFields": [
{
"fieldName": "ddt",
"fieldType": "datetime"
},
{
"fieldName": "txkB",
"fieldType": "float"
}
],
"streamDef": {
"info": "sar",
"version": 1,
"streams": [
{
"info": "sar.csv",
"source": "file://sar.csv",
"columns": [
"*"
]
}
],
"aggregation": {
"hours": 0,
"microseconds": 0,
"seconds": 0,
"fields": [
[
"txkB",
"sum"
],
[
"ddt",
"first"
]
],
"weeks": 1,
"months": 0,
"mimutes": 0,
"days": 0,
"milliseconds": 0,
"years": 0
}
},
"inferenceType": "TemporalAnomaly",
"inferenceArgs": {
"predictionSteps": [
1
],
"predictedField": "txkB"
},
"iterationCount": -1,
"swarmSize": "medium"
}
model_params.py below:
MODEL_PARAMS = {
'aggregationInfo': {
'days': 0,
'fields': [],
'hours': 0,
'microseconds': 0,
'milliseconds': 0,
'minutes': 0,
'months': 0,
'seconds': 0,
'weeks': 1,
'years': 0
},
'model': 'HTMPrediction',
'modelParams': {
'anomalyParams': {
u'anomalyCacheRecords': None,
u'autoDetectThreshold': None,
u'autoDetectWaitRecords': None
},
'clParams': {
'alpha': 0.0001,
'regionName': 'SDRClassifierRegion',
'steps': '1',
'verbosity': 0
},
'inferenceType': 'TemporalAnomaly',
'sensorParams': {
'encoders': {
u'ddt_dayOfWeek': None,
u'ddt_timeOfDay': {
'fieldname': 'ddt',
'name': 'timestamp',
'timeOfDay': (21, 6.0903),
'type': 'DateEncoder'
},
u'ddt_weekend': {
'fieldname': 'ddt',
'name': 'timestamp',
'type': 'DateEncoder',
'weekend': (21, 1)
},
u'txkB': {
'clipInput': True,
'fieldname': 'txkB',
'n': 22,
'name': 'txkB',
'type': 'AdaptiveScalarEncoder',
'w': 21
}
},
'sensorAutoReset': None,
'verbosity': 0
},
'spEnable': True,
'spParams': {
'boostStrength': 0.0,
'columnCount': 2048,
'globalInhibition': 1,
'inputWidth': 0,
'numActiveColumnsPerInhArea': 40,
'potentialPct': 0.8,
'seed': 1956,
'spVerbosity': 0,
'spatialImp': 'cpp',
'synPermActiveInc': 0.05,
'synPermConnected': 0.1,
'synPermInactiveDec': 0.1
},
'tmEnable': True,
'tmParams': {
'activationThreshold': 12,
'cellsPerColumn': 32,
'columnCount': 2048,
'globalDecay': 0.0,
'initialPerm': 0.21,
'inputWidth': 2048,
'maxAge': 0,
'maxSegmentsPerCell': 128,
'maxSynapsesPerSegment': 32,
'minThreshold': 9,
'newSynapseCount': 20,
'outputType': 'normal',
'pamLength': 1,
'permanenceDec': 0.1,
'permanenceInc': 0.1,
'seed': 1960,
'temporalImp': 'cpp',
'verbosity': 0
},
'trainSPNetOnlyIfRequested': False
},
'predictAheadTime': None,
'version': 1
}