Hey everybody,

I started with my analysis.

I created an artificial dataset which looks like this:

as you can see:

I have a regular pattern. I have the exact same pattern for all weekdays (Monday to Friday).

Then there is a pattern for Saturday and one for Sunday.

So basically: I have the same pattern every week over one year.

I want to do a prediction on the data.

So my first step was to run a swarm.

I ran a large swarm including all the datapoints.

Here you see the resulting model_params:

MODEL_PARAMS = \

```
{ 'aggregationInfo': { 'days': 0,
'fields': [],
'hours': 0,
'microseconds': 0,
'milliseconds': 0,
'minutes': 0,
'months': 0,
'seconds': 0,
'weeks': 0,
'years': 0},
'model': 'HTMPrediction',
'modelParams': { 'anomalyParams': { u'anomalyCacheRecords': None,
u'autoDetectThreshold': None,
u'autoDetectWaitRecords': None},
'clParams': { 'alpha': 0.08751250000000001,
'regionName': 'SDRClassifierRegion',
'steps': '1',
'verbosity': 0},
'inferenceType': 'TemporalMultiStep',
'sensorParams': { 'encoders': { '_classifierInput': { 'classifierOnly': True,
'clipInput': True,
'fieldname': 'consumption',
'maxval': 324.167541908,
'minval': 37.0,
'n': 90,
'name': '_classifierInput',
'type': 'ScalarEncoder',
'w': 21},
u'consumption': { 'clipInput': True,
'fieldname': 'consumption',
'maxval': 324.167541908,
'minval': 37.0,
'n': 334,
'name': 'consumption',
'type': 'ScalarEncoder',
'w': 21},
u'datetime_dayOfWeek': None,
u'datetime_timeOfDay': None,
u'datetime_weekend': None},
'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.037687500000000006},
'tmEnable': True,
'tmParams': { 'activationThreshold': 14,
'cellsPerColumn': 32,
'columnCount': 2048,
'globalDecay': 0.0,
'initialPerm': 0.21,
'inputWidth': 2048,
'maxAge': 0,
'maxSegmentsPerCell': 128,
'maxSynapsesPerSegment': 32,
'minThreshold': 11,
'newSynapseCount': 20,
'outputType': 'normal',
'pamLength': 2,
'permanenceDec': 0.1,
'permanenceInc': 0.1,
'seed': 1960,
'temporalImp': 'cpp',
'verbosity': 0},
'trainSPNetOnlyIfRequested': False},
'predictAheadTime': None,
'version': 1}
```

so my question is the following:

I KNOW that there is a dependency on the day of week as well as the time of day.

But the swarm didn’t find that.

So… I decided to tune my parameters and add the Encoding for these:

I added on the right place (rest of the parameters were the same):

```
u'datetime_timeOfDay': {'fieldname': 'datetime',
'name': 'datetime',
'timeOfDay': (21, 1),
'type': 'DateEncoder'},
```

afterwards I checked some metrics:

I checked the mean absolute and the root mean squared error!

And my results got worse, when adding a time of day encoder:

so without timeOfDay Encder:

```
MAE = 2.3064795497420802
RMSE = 5.589831939559891
```

With timeOfDay Encder:

```
MAE = 4.370068288974104
RMSE = 14.843369165358364
```

Then i also checked the resilts for a bunch of different parameter settings and the usage of different Encoders (like dayOfWeek ect).

The result was ALWAYS worse.

I also added some noise to my data and checked again if I can improve the prediction by tuning the parameters.

But SAME result – the more importance I gave to the date and time, the worse the prediction.

How is that possible? I know that there is a dependency on these information, but the model returns bad results when adding them.

Is there anything I do not see? Anything else I HAVE TO tune as well?

I really need some help… I am trying to tune my parameter for days… and for me all this does not make any sense.

I hope someone can help me! Thank you all very much in advance.

Best,

Helena