# How to work with Machine Learning

**URL:** <https://discuss.elastic.co/t/how-to-work-with-machine-learning/116303>\
**Category:** Elasticsearch\
**Created:** [January 19, 2018, 8:43pm UTC](https://discuss.elastic.co/t/how-to-work-with-machine-learning/116303 "2018-01-19T20:43:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pratiksha\_Tewary](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Pratiksha\_Tewary](https://discuss.elastic.co/u/Pratiksha_Tewary)\
**Post date:** [January 19, 2018, 8:43pm UTC](https://discuss.elastic.co/t/how-to-work-with-machine-learning/116303/1 "2018-01-19T20:43:46Z")

</div>

Hi,

I am trying to work with X-Pack's Machine Learning feature. There are several resources available at the Elastic websites and beyond to learn about this tool. However, I am having trouble with making ML take in my data in the first place. I am fairly new to this, so kindly bear with me. It just gives me an error saying "Index pattern \<index\_pattern\> is not time based". I do not understand how it is detecting whether the index is time-based or not.

For the data set that I am working with, @timestamp is not meant to be my default time-based field. I have another field called "Date", which is meant to be my time-based field. I was able to change the default for Timelion by going to Advanced Settings. However, I don't even know how to start with Machine Learning (or where to go if I want to customize parameters).

Any help will be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![dmitri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmitri/32/17997_2.png) [@dmitri](https://discuss.elastic.co/u/dmitri)\
**Post date:** [January 22, 2018, 10:47am UTC](https://discuss.elastic.co/t/how-to-work-with-machine-learning/116303/2 "2018-01-22T10:47:09Z")

</div>

Hi,

The problem is that you are using an index pattern that has no time field defined. ML anomaly detection only works with time series, thus a time-based index pattern is required. You can create a new index pattern for use with ML, and this time set the "Date" field as the index pattern's time field. You can do that through the `management` page in Kibana. You should then be able to use ML with the newly created index pattern without issues.

Let me know if you need more help with this.

Kind regards,  
Dimitris

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 19, 2018, 10:47am UTC](https://discuss.elastic.co/t/how-to-work-with-machine-learning/116303/3 "2018-02-19T10:47:38Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
