# Input data must be ordered?

**URL:** <https://discourse.numenta.org/t/input-data-must-be-ordered/1177>\
**Category:** NuPIC\
**Tags:** question, data\
**Created:** [August 3, 2016, 6:11pm UTC](https://discourse.numenta.org/t/input-data-must-be-ordered/1177 "2016-08-03T18:11:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainyyun](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rainyyun](https://discourse.numenta.org/u/rainyyun)\
**Post date:** [August 3, 2016, 6:11pm UTC](https://discourse.numenta.org/t/input-data-must-be-ordered/1177/1 "2016-08-03T18:11:34Z")

</div>

I am using the hotgym abnormally example. Looks like the input data must be ordered even though it has a timestamp. I tried to change the order of the data in the rec-center-hourly.csv and run it, it generated quite different results. So is there a way to use an unordered sequence as input (with timestamp)? Or I have to sort my input before feeding it into the engine?

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [August 3, 2016, 6:28pm UTC](https://discourse.numenta.org/t/input-data-must-be-ordered/1177/2 "2016-08-03T18:28:42Z")

</div>

You have to sort the input by timestamp if you’re including a timestamp.

---

<div class="post-metadata">

**Author:** ![rainyyun](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rainyyun](https://discourse.numenta.org/u/rainyyun)\
**Post date:** [August 3, 2016, 6:36pm UTC](https://discourse.numenta.org/t/input-data-must-be-ordered/1177/3 "2016-08-03T18:36:46Z")

</div>

Thanks Matt! So basically the engine always assume the input data is for NOW no matter what timestamp it actually is?

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [August 3, 2016, 6:39pm UTC](https://discourse.numenta.org/t/input-data-must-be-ordered/1177/4 "2016-08-03T18:39:42Z")

</div>

You must realize that encoding the timestamp is sortof a hack. HTM has an innate sense of temporal flow. One input always comes after another input, and the order is always important. So it’s not really that is assumes each point is for NOW() in time, just that one comes after another.

Just think what it would be like if your sensory organs started sending their inputs out of order into your brain!

---

<div class="post-metadata">

**Author:** ![rainyyun](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rainyyun](https://discourse.numenta.org/u/rainyyun)\
**Post date:** [August 3, 2016, 6:43pm UTC](https://discourse.numenta.org/t/input-data-must-be-ordered/1177/5 "2016-08-03T18:43:06Z")

</div>

I see. But it would be great if the engine takes whatever it sees to generate results, and when the time it sees some earlier data points, it will insert back into the engine and refine the model.

---

<div class="post-metadata">

**Author:** ![rhyolight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.numenta.org/rhyolight/32/3922_2.png) [@rhyolight](https://discourse.numenta.org/u/rhyolight)\
**Post date:** [August 3, 2016, 6:45pm UTC](https://discourse.numenta.org/t/input-data-must-be-ordered/1177/6 "2016-08-03T18:45:04Z")

</div>

That would only be possible if this ordering module was happening just outside the HTM system. A lot of streaming data frameworks do this, but it sacrifices timeliness for order. But an HTM system doesn’t work like this, and neither does your brain.
