DateTime Encoder


Pleas explain meaning of 21 and 9.49 values in DateTime encoder? and What is the relation between these two values?

"timeOfDay": [


It describes how to encode the timeOfDay attribute of the DateEncoder. The
first number (21) would be the width of the attribute, and the second
number (9.49) would be its radius. Read more about the DateEncoder in the API docs:

A date encoder encodes a date according to encoding parameters specified in
its constructor. The input to a date encoder is a datetime.datetime object.
The output is the concatenation of several sub-encodings, each of which
encodes a different aspect of the date. Which sub-encodings are present,
anddetails of those sub-encodings, are specified in the DateEncoder
Each parameter describes one attribute to encode. By default, the attribute
is not encoded.

season (season of the year; units = day):
(int) width of attribute; default radius = 91.5 days (1 season)
(tuple) season[0] = width; season[1] = radius

dayOfWeek (monday = 0; units = day)
(int) width of attribute; default radius = 1 day
(tuple) dayOfWeek[0] = width; dayOfWeek[1] = radius

weekend (boolean: 0, 1)
(int) width of attribute

holiday (boolean: 0, 1)
(int) width of attribute

timeOfday (midnight = 0; units = hour)
(int) width of attribute: default radius = 4 hours
(tuple) timeOfDay[0] = width; timeOfDay[1] = radius

customDays TODO: what is it?
forced (default True) : if True, skip checks for parameters’ settings;
see encoders/ for details

So what is the meaning of time of day parameter? Also what is the meaning of dayOfWeek parameter? Specifically, what does the radius mean? It doesn’t become clearer after reading the documentation.

have you watched the HTMschool series ???