Hi, could you please tell me if the setting below is correct to encode Date input to Morning, Noon,Afternoon, Evening and night.
If it is not correct could you suggest a correct setting. I need this for anomaly detection for vital sign readings.
Let’s ignore the tuple option and just provide an integer for timeOfDay in the constructor, which means how long, in hours, the time window will be. The default is a 4-hour window, which gives you time periods like morning, afternoon, evening, early night, late night, etc.
The code will look different depending on what interface you are using. If you create the encoder directly, it would be:
de = DateEncoder(timeOfDay=(21, 4))
de = DateEncoder(timeOfDay=21)
You should experiment a bit if you want more or less resolution. Remember this will be combined with any other encodings you include in the input. These values are used as w and radius when creating a periodic scalar encoder to represent the time of day period: