# Machine Learning in Ignition

**URL:** <https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328>\
**Category:** General Discussion\
**Created:** [May 17, 2017, 4:34pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328 "2017-05-17T16:34:15Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [May 17, 2017, 4:34pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/1 "2017-05-17T16:34:15Z")

</div>

A couple of my Perfect Abstractions Ignition developers wrote an article about Machine Learning in Ignition. I’d like to share it and know what other’s think.

The article is here: [http://blog.perfectabstractions.com/2017/05/17/machine-learning-in-ignition/](http://blog.perfectabstractions.com/2017/05/17/machine-learning-in-ignition/)

---

<div class="post-metadata">

**Author:** ![accyroy](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/accyroy/32/3386_2.png) [@accyroy](https://forum.inductiveautomation.com/u/accyroy)\
**Post date:** [May 17, 2017, 5:37pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/2 "2017-05-17T17:37:13Z")

</div>

Good article, thanks for posting. I’ve been dipping my toes in machine learning lately with a view to doing something with the masses of production data and parameters we are collecting. Ignition seems a perfect place to both collect and process the data. I assume with the interest your developers are showing, a module is perhaps in the pipeline?

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [May 17, 2017, 9:39pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/3 "2017-05-17T21:39:06Z")

</div>

For those interested in an overview of machine learning, Kevin McClusky and I will be doing a session on ML at the ICC in September.

And if you have questions on ML projects before then, feel free to contact us. Kevin has implemented some interesting ML projects in Ignition, and my Master’s in CS specialized in machine learning, AI, and data mining.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [May 17, 2017, 9:42pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/4 "2017-05-17T21:42:35Z")

</div>

We may develop one. We are interested in feedback and ideas for now.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [May 18, 2017, 12:52pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/5 "2017-05-18T12:52:04Z")

</div>

This is how I usually end up seeing it. 😉

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/a4fd02f25d0936105468232c7ffc933eabff5f57.png)

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [May 18, 2017, 1:35pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/6 "2017-05-18T13:35:18Z")

</div>

Heh, Randall knows the truth about ML. 😂

---

<div class="post-metadata">

**Author:** ![hamlinjr](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hamlinjr/32/8228_2.png) [@hamlinjr](https://forum.inductiveautomation.com/u/hamlinjr)\
**Post date:** [May 18, 2017, 9:10pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/7 "2017-05-18T21:10:57Z")

</div>

Thanks @nmudge enjoyed the article. Since I work in wastewater, especially enjoyed your example 🙂

For us, we would find an extreme amount of value in ML predicting the impact on our facility due to predicted rainfall, and would also want to use it to predict treatment impact due to changing conditions. There are some tests that take 5 days to run, so wastewater so there are a lot of times you don’t know things are getting worse until too late. Would love to see more ML in wastewater!

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [May 19, 2017, 4:01pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/8 "2017-05-19T16:01:10Z")

</div>

Great to know @hamlinjr !

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [May 22, 2017, 5:36pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/9 "2017-05-22T17:36:26Z")

</div>

I do alot of oil and gas monitoring. I would be interesting in seeing what ML analysis could provide for my customers. I have a large amount of data that gets stored but outside of viewing in trends, we really dont do any analysis on it.

---

<div class="post-metadata">

**Author:** ![michael.e.johnson](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@michael.e.johnson](https://forum.inductiveautomation.com/u/michael.e.johnson)\
**Post date:** [February 27, 2018, 10:33pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/10 "2018-02-27T22:33:15Z")

</div>

If we have a python file with ML def that we place in the userlib for python, then can we not use these def in python scripting?  
Is using a Java based ML program for introducing classes and methods into the ignition environment is recommended path for ML in Ignition?

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [February 27, 2018, 11:52pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/11 "2018-02-27T23:52:48Z")

</div>

You can definitely use python files, but they need to be compatible with Ignition – Jython 2.5 (not CPython).

---

<div class="post-metadata">

**Author:** ![michael.e.johnson](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@michael.e.johnson](https://forum.inductiveautomation.com/u/michael.e.johnson)\
**Post date:** [February 28, 2018, 1:32am UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/12 "2018-02-28T01:32:42Z")

</div>

What is the difference between Jython 2.5 and Python 2.7?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 28, 2018, 3:09am UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/13 "2018-02-28T03:09:52Z")

</div>

All the differences between Python 2.5 and Python 2.7, plus all of the limitations of the Java environment, plus all of the advantages of the Java environment. Primarily, the biggies are:

1. No support for any addon to CPython that depends on native C-code. That means no numpy or anything like it.
2. Direct support for java classes and objects as if they were jython, including automatic conversion of netbeans compliant getter/setter methods into python properties.
3. Jython strings use Java’s UTF-16 storage of characters instead of python2’s undifferentiated byte-oriented storage, eliminating the biggest motivator for the creation of python3.
4. Java array types, including byte arrays, are available through the jython-only “jarray” module.

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [February 28, 2018, 4:58am UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/14 "2018-02-28T04:58:09Z")

</div>

> [@pturmel](#):
>
> No support for any addon to CPython that depends on native C-code. That means no numpy or anything like it.  
> Direct support for java classes and objects as if they were jython, including automatic conversion of netbeans compliant getter/setter methods into python properties.  
> Jython strings use Java's UTF-16 storage of characters instead of python2's undifferentiated byte-oriented storage, eliminating the biggest motivator for the creation of python3.  
> Java array types, including byte arrays, are available through the jython-only "jarray" module.

Just wondering, why do we need a full stack Python engine inside Ignition which may overload and affect the performance?. Can't we push the data outside, process it and pushback the results to Ignition as JSON data?. For presentation we can always use a Javascript engine like FB's ReactJS.

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [February 28, 2018, 1:51pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/15 "2018-02-28T13:51:44Z")

</div>

First ask your customers, their wish list. Design a questionnaire and get their feedbacks. This will help you to decide some goals. Interact with some institutions who use machine learning to make some good money 🙂

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [February 28, 2018, 3:14pm UTC](https://forum.inductiveautomation.com/t/machine-learning-in-ignition/14328/16 "2018-02-28T15:14:56Z")

</div>

> [@R.Alamsha](#):
>
> Can't we push the data outside, process it and pushback the results to Ignition as JSON data?.

You absolutely can, and many of our users who do ML and analytics with their Ignition data do just that.
