<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Machine Learning in Apache Nifi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Machine-Learning-in-Apache-Nifi/m-p/124309#M87053</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/7309/rendi7936.html" nodeid="7309" target="_blank"&gt;@Rendiyono Wahyu Saputro&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;What are you trying to build is what we call &lt;A href="http://fr.hortonworks.com/solutions/connected-data-platforms/" rel="nofollow noopener noreferrer" target="_blank"&gt;Connected Data Platform&lt;/A&gt; at Hortonworks. You need to understand that you have two types of workloads/requirements and you need to use HDF and HDP jointly.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;ML model construction: the first step towards you goal is to build your machine learning model. This require processing lot of historical data (data at rest) to detect some pattern related to what you are trying to predict. This phase is called "training phase".The best tool do this is HDP and more specifically Spark.&lt;/LI&gt;&lt;LI&gt;Applying the ML model: once step1 completed, you will have a model that you can apply to new data to predict something. In my understanding you want to apply this at real time data coming from twitter (data at motion). To get the data in real time and transform to what the ML model needs, you can use NiFi. Next, NiFi send the data to Storm or Spark Streaming that applies the model and get the prediction.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;So you will have to use HDP to construct the model, HDF to get and transform the data, and finally a combination of HDF/HDP to apply the model and make the prediction. &lt;/P&gt;&lt;P style="margin-left: 220px;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3874-screen-shot-2016-04-30-at-45216-pm.png" style="width: 876px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22724i43985E3A52F4381D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3874-screen-shot-2016-04-30-at-45216-pm.png" alt="3874-screen-shot-2016-04-30-at-45216-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To build a web service with NiFi you need to use several processors: one to listen to incoming requests, one or several processors to implement your logic (transformation, extraction, etc), one to publish the result. You can check this page that contains several data flow examples. The "&lt;A href="https://cwiki.apache.org/confluence/download/attachments/57904847/Hello_NiFi_Web_Service.xml?version=1&amp;amp;modificationDate=1449369797000&amp;amp;api=v2" rel="nofollow noopener noreferrer" target="_blank"&gt;Hello_NiFi_Web_Service.xml&lt;/A&gt;" gives an example on how to do it.&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/NIFI/Example+Dataflow+Templates" target="_blank" rel="nofollow noopener noreferrer"&gt;https://cwiki.apache.org/confluence/display/NIFI/Example+Dataflow+Templates&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 10:14:56 GMT</pubDate>
    <dc:creator>ahadjidj</dc:creator>
    <dc:date>2019-08-19T10:14:56Z</dc:date>
  </channel>
</rss>

