Getting Periodic Spikes in Prediction and no change in anomalyscore

I’m predicting data reasonably well, but for some reason I get weird spikes around Sunday midnight.

The top chart shows ~september 2017, bottom is the whole dataset from 2015 to 2017. As you can see there is no real change in anomaly score despite a fluctuating RMSE. Do I need to adjust my encoder params perhaps?

My model params are:

{
    "aggregationInfo": {
        "seconds": 0, 
        "fields": [], 
        "months": 0, 
        "days": 0, 
        "years": 0, 
        "hours": 0, 
        "microseconds": 0, 
        "weeks": 0, 
        "minutes": 0, 
        "milliseconds": 0
    }, 
    "model": "HTMPrediction", 
    "version": 1, 
    "predictAheadTime": null, 
    "modelParams": {
        "sensorParams": {
            "verbosity": 0, 
            "encoders": {
                "datetime_timeOfDay": {
                    "fieldname": "datetime", 
                    "timeOfDay": [
                        61, 
                        12.44749401819989
                    ], 
                    "type": "DateEncoder", 
                    "name": "datetime_timeOfDay"
                }, 
                "flow": {
                    "resolution": 35.7, 
                    "type": "RandomDistributedScalarEncoder", 
                    "fieldname": "flow", 
                    "name": "flow"
                }, 
                "datetime_weekend": {
                    "fieldname": "datetime", 
                    "weekend": 57, 
                    "name": "datetime_weekend", 
                    "type": "DateEncoder"
                }, 
                "datetime_dayOfWeek": {
                    "dayOfWeek": [
                        47, 
                        8.917961957686792
                    ], 
                    "fieldname": "datetime", 
                    "type": "DateEncoder", 
                    "name": "datetime_dayOfWeek"
                }
            }, 
            "sensorAutoReset": null
        }, 
        "clEnable": true, 
        "spParams": {
            "columnCount": 2048, 
            "synPermInactiveDec": 0.04974889664757941, 
            "spatialImp": "cpp", 
            "inputWidth": 0, 
            "spVerbosity": 0, 
            "synPermConnected": 0.21511962104364837, 
            "synPermActiveInc": 0.048963364189924134, 
            "seed": 1956, 
            "numActiveColumnsPerInhArea": 28, 
            "boostStrength": 0.09046810233608615, 
            "globalInhibition": 1, 
            "potentialPct": 0.6726322618858365
        }, 
        "trainSPNetOnlyIfRequested": false, 
        "clParams": {
            "alpha": 0.10261273889384448, 
            "verbosity": 0, 
            "steps": "1", 
            "regionName": "SDRClassifierRegion"
        }, 
        "tmParams": {
            "columnCount": 2048, 
            "activationThreshold": 11, 
            "pamLength": 5, 
            "cellsPerColumn": 8, 
            "permanenceInc": 0.19146142766408633, 
            "minThreshold": 14, 
            "verbosity": 0, 
            "maxSynapsesPerSegment": 58, 
            "outputType": "normal", 
            "globalDecay": 0.0, 
            "initialPerm": 0.20265414843673274, 
            "permanenceDec": 0.11995046223980943, 
            "seed": 1960, 
            "maxAge": 0, 
            "newSynapseCount": 28, 
            "maxSegmentsPerCell": 40, 
            "temporalImp": "cpp", 
            "inputWidth": 2048
        }, 
        "tmEnable": true, 
        "anomalyParams": {
            "anomalyCacheRecords": null, 
            "autoDetectThreshold": null, 
            "autoDetectWaitRecords": null
        }, 
        "spEnable": true, 
        "inferenceType": "TemporalAnomaly"
    }
}

Are you serializing any of these models in any way? We just fixed a bunch of serialization bugs. I highly recommend you upgrade to NuPIC 1.0.4.

Shot in the dark: could it have something to do with the classifier? It generates the actual predictions, but is upstream from the TM and anomaly score calculations. The only real parameter to tune there is alpha.

@rhyolight I haven’t serialised it, I just made the model and evaluated it.

@subutai thanks I’ve now changed cl alpha and got some anomaly scores but they drop off about. Any idea about the midnight prediction peaks?

Here’s my new results