{"action":"created","issue":{"url":"https://api.github.com/repos/numenta/nupic/issues/2757","labels_url":"https://api.github.com/repos/numenta/nupic/issues/2757/labels{/name}","comments_url":"https://api.github.com/repos/numenta/nupic/issues/2757/comments","events_url":"https://api.github.com/repos/numenta/nupic/issues/2757/events","html_url":"https://github.com/numenta/nupic/issues/2757","id":117339824,"number":2757,"title":"DateEncoder creates spurious anomalies due to sudden shifts (eg at midnight)","user":{"login":"fergalbyrne","id":5892040,"avatar_url":"https://avatars.githubusercontent.com/u/5892040?v=3","gravatar_id":"","url":"https://api.github.com/users/fergalbyrne","html_url":"https://github.com/fergalbyrne","followers_url":"https://api.github.com/users/fergalbyrne/followers","following_url":"https://api.github.com/users/fergalbyrne/following{/other_user}","gists_url":"https://api.github.com/users/fergalbyrne/gists{/gist_id}","starred_url":"https://api.github.com/users/fergalbyrne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fergalbyrne/subscriptions","organizations_url":"https://api.github.com/users/fergalbyrne/orgs","repos_url":"https://api.github.com/users/fergalbyrne/repos","events_url":"https://api.github.com/users/fergalbyrne/events{/privacy}","received_events_url":"https://api.github.com/users/fergalbyrne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/numenta/nupic/labels/priority:2","name":"priority:2","color":"eb6420"},{"url":"https://api.github.com/repos/numenta/nupic/labels/subject:algorithms","name":"subject:algorithms","color":"c7def8"},{"url":"https://api.github.com/repos/numenta/nupic/labels/type:bug","name":"type:bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-11-17T11:57:06Z","updated_at":"2015-11-18T19:49:01Z","closed_at":null,"body":"![Example of Spurious Anomalies](http://puu.sh/loHhg/2af0a99560.png)\r\n\r\n@JonnoFTW is reporting big anomalies across many of his sensors at midnight every night (see http://puu.sh/loHhg/2af0a99560.png for a plot). There is no anomalous traffic to explain this, and it repeats every night. He is using the standard date encoder, which shifts all its bits at midnight every night. This is causing a dramatic enough shift in the SP output that the columnar representation cannot be predicted by columns over-sensitive to day-of-week bits.\r\n\r\nThe fix is to add an hourOfWeek encoder to the DateEncoder, which is just a copy of the timeOfDay encoder with max set to 168 instead of 24. I'll add this in and do a PR."},"comment":{"url":"https://api.github.com/repos/numenta/nupic/issues/comments/157841484","html_url":"https://github.com/numenta/nupic/issues/2757#issuecomment-157841484","issue_url":"https://api.github.com/repos/numenta/nupic/issues/2757","id":157841484,"user":{"login":"cogmission","id":2340086,"avatar_url":"https://avatars.githubusercontent.com/u/2340086?v=3","gravatar_id":"","url":"https://api.github.com/users/cogmission","html_url":"https://github.com/cogmission","followers_url":"https://api.github.com/users/cogmission/followers","following_url":"https://api.github.com/users/cogmission/following{/other_user}","gists_url":"https://api.github.com/users/cogmission/gists{/gist_id}","starred_url":"https://api.github.com/users/cogmission/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cogmission/subscriptions","organizations_url":"https://api.github.com/users/cogmission/orgs","repos_url":"https://api.github.com/users/cogmission/repos","events_url":"https://api.github.com/users/cogmission/events{/privacy}","received_events_url":"https://api.github.com/users/cogmission/received_events","type":"User","site_admin":false},"created_at":"2015-11-18T19:49:01Z","updated_at":"2015-11-18T19:49:01Z","body":"@subutai What @fergalbyrne is saying (which he still hasn't said), is that @jonnoftw was using **both** TimeOfDay **and** DayOfWeek originally, and now he is using TimeOfDay **and** HourOfWeek. That's correct right @fergalbyrne ?"}}