<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Priscilla Parodi</title>
    <description>The latest articles on DEV Community by Priscilla Parodi (@priscilla_parodi).</description>
    <link>https://dev.to/priscilla_parodi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F672257%2F113fbaee-42e5-4b6b-8283-eab4eff00e7e.jpeg</url>
      <title>DEV Community: Priscilla Parodi</title>
      <link>https://dev.to/priscilla_parodi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/priscilla_parodi"/>
    <language>en</language>
    <item>
      <title>NLP and Elastic: Getting started</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Thu, 02 Jun 2022 21:13:34 +0000</pubDate>
      <link>https://dev.to/elastic/natural-language-processing-15fj</link>
      <guid>https://dev.to/elastic/natural-language-processing-15fj</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/elastic/nlp-handson-4f90"&gt;Next Post: NLP HandsOn&lt;/a&gt; |&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Natural language processing (NLP)&lt;/strong&gt; is the branch of artificial intelligence (AI) that focuses on understanding human language as closely as possible to human interpretation, combining computational linguistics with statistical, machine learning and deep learning models.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwy77qmvnlsb6oyavpdze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwy77qmvnlsb6oyavpdze.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Some examples of NLP tasks:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Named entity recognition&lt;/strong&gt; is a type of information extraction, identifying words or phrases as entities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcquav4p0h8gheba0zhwv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcquav4p0h8gheba0zhwv.png" alt="Image description"&gt;&lt;/a&gt;(&lt;a href="https://huggingface.co/dslim/bert-base-NER" rel="noopener noreferrer"&gt;&lt;em&gt;model used&lt;/em&gt;&lt;/a&gt;)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sentiment analysis&lt;/strong&gt; is a type of text classification, attempting to extract subjective emotions from text.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3oseiqe4zrzrbvpywsa3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3oseiqe4zrzrbvpywsa3.png" alt="Image description"&gt;&lt;/a&gt;(&lt;a href="https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english" rel="noopener noreferrer"&gt;&lt;em&gt;model used&lt;/em&gt;&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;There are more examples that can be used according to your use case.&lt;/p&gt;

&lt;h2&gt;
  
  
  BERT
&lt;/h2&gt;

&lt;p&gt;In 2018, Google sourced a new technique for pre-training NLP called &lt;a href="https://www.youtube.com/watch?v=2lR8Fzays4I" rel="noopener noreferrer"&gt;BERT&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;BERT uses “transfer learning”, which is the method of pre-training linguistic representations. Pre-training refers to how BERT was first trained using unsupervised learning on a large source of plain text extracted from a collection of samples (800 million words) and Wikipedia documents (2,500 million words). Earlier models required manual labeling.&lt;/p&gt;

&lt;p&gt;BERT was pretrained on two tasks: language modeling (15% of tokens were masked and BERT was trained to predict them from context) and next sentence prediction (BERT was trained to predict if a chosen next sentence was probable or not given the first sentence). With this understanding, BERT can be adapted to many other types of NLP tasks very easily.&lt;/p&gt;

&lt;p&gt;Knowing the intent and context and not just the keywords, it is possible to go further in understanding in a way that is even closer to the way humans understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  NLP with Elastic
&lt;/h2&gt;

&lt;p&gt;To support models that use the same tokenizer as BERT, Elastic is supporting the PyTorch library, one of the most popular machine learning libraries that supports neural networks like the Transformer architecture that BERT uses, enabling NLP tasks.&lt;/p&gt;

&lt;p&gt;In general, any trained model that has a supported architecture is deployable in Elasticsearch, including BERT and variants.&lt;/p&gt;

&lt;p&gt;These models are listed by NLP task. &lt;a href="https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-overview.html" rel="noopener noreferrer"&gt;Currently&lt;/a&gt;, these are the tasks supported:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-extract-info.html" rel="noopener noreferrer"&gt;Extract information&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Named entity recognition&lt;br&gt;
Fill-mask&lt;br&gt;
Question answering&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-classify-text.html" rel="noopener noreferrer"&gt;Classify text&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Language identification&lt;br&gt;
Text classification&lt;br&gt;
Zero-shot text classification&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-search-compare.html" rel="noopener noreferrer"&gt;Search and compare text&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Text embedding&lt;br&gt;
Text similarity&lt;/p&gt;

&lt;p&gt;As in the cases of &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-1b3f"&gt;classification&lt;/a&gt; and &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-regression-analysis-2ge2"&gt;regression&lt;/a&gt;, when a &lt;a href="https://dev.to/priscilla_parodi/trained-models-for-supervised-learning-154n"&gt;trained model&lt;/a&gt; is imported you can use it to make predictions (&lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-inference-processor-handson-3392"&gt;inference&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: For NLP tasks you must choose and deploy a third-party NLP model. If you choose to perform language identification, as an option we have a trained model &lt;code&gt;lang_ident_model_1&lt;/code&gt; provided in the cluster.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  NLP with Elastic Solutions
&lt;/h2&gt;

&lt;p&gt;There are many possible use cases to add NLP capabilities to your Elastic project and here are some examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Spam detection: Text classification capabilities are useful for scanning emails for language that often indicates spam, allowing content to be blocked or deleted and preventing malware emails.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8t4dljvgvf6yapd9ug52.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8t4dljvgvf6yapd9ug52.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PUT spam-detection/_doc/1
{
  "email subject": "Camera - You are awarded a SiPix Digital Camera! Call 09061221066. Delivery within 28 days.",
  "is_spam": true
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Enterprise Search&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Analysis of unstructured text: Entity recognition is useful for structuring text data, adding new field types to your documents and allowing you to analyze more data and obtain even more valuable insights.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fksptdxozxqx09ugsh3vk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fksptdxozxqx09ugsh3vk.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PUT /source-index
{
  "mappings": {
    "properties": {
      "input":    { "type": "text" }
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PUT /new-index
{
  "mappings": {
    "properties": {
      "input":    { "type": "text" },  
      "organization":  { "type": "keyword"  }, 
      "location":   { "type": "keyword"  }     
    }
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Observability&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Service request and incident data: Extracting meaning from operational data, including ticket resolution comments, allows you to not only generate alerts during incidents, but also go further by observing your application, predicting behavior, and having more data to improve ticket resolution time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwxuc8kv6g1ur3lbvki9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhwxuc8kv6g1ur3lbvki9.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;...
  "_source": {
    "support_ticket_id": 119237,
    "customer_id": 283823,
    "timestamp": "2021-06-06T17:23:02.770Z",
    "text_field": "Response to the case was fast and problem was solved after first response, did not need to provide any additional info.",
    "ml": {
      "inference": {
        "predicted_value": "positive",
        "prediction_probability": 0.9499962712516151,
        "model_id": "heBERT_sentiment_analysis"
      }
    }
  }
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  NLP HandsOn
&lt;/h2&gt;

&lt;p&gt;Now, let's proceed with an &lt;strong&gt;&lt;a href="https://dev.to/elastic/nlp-handson-4f90"&gt;end-to-end example&lt;/a&gt;&lt;/strong&gt;! To prepare for the &lt;a href="https://dev.to/elastic/nlp-handson-4f90"&gt;NLP HandsOn&lt;/a&gt;, we will need an Elasticsearch cluster running at least version 8.0 with an ML node. If you haven't created your &lt;a href="https://dev.to/priscilla_parodi/handson-setup-elastic-cloud-4j8p"&gt;Elastic Cloud Trial&lt;/a&gt; yet, now is the time.&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/elastic/nlp-handson-4f90"&gt;Next Post: NLP HandsOn&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch, Kibana, Logstash and Beats) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>nlp</category>
      <category>tutorial</category>
      <category>elasticsearch</category>
    </item>
    <item>
      <title>NLP HandsOn</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Thu, 02 Jun 2022 21:13:24 +0000</pubDate>
      <link>https://dev.to/elastic/nlp-handson-4f90</link>
      <guid>https://dev.to/elastic/nlp-handson-4f90</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: This HandsOn assumes that you have already followed the step-by-step Setup of your &lt;a href="https://dev.to/priscilla_parodi/handson-setup-elastic-cloud-4j8p"&gt;Elastic Cloud Trial account&lt;/a&gt;, and also that you have read the blog &lt;a href="https://dev.to/elastic/natural-language-processing-15fj"&gt;NLP and Elastic: Getting started&lt;/a&gt;.&lt;br&gt;
Config: To prepare for the NLP HandsOn, we will need an Elasticsearch cluster running at least version 8.0 with an ML node.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To start using NLP in your Stack you will need to import your model. The first thing we need to do is upload your model into a cluster.&lt;/p&gt;

&lt;p&gt;In our &lt;a href="https://www.elastic.co/guide/en/elasticsearch/client/eland/current/overview.html" rel="noopener noreferrer"&gt;eland&lt;/a&gt; library, a Python Elasticsearch client for exploring and analyzing data in Elasticsearch, we have some simple methods and scripts that allow you to upload models from local disk, or to pull models down from the Hugging Face model hub.&lt;/p&gt;

&lt;p&gt;Once models are uploaded into the cluster, you’ll be able to allocate those models to specific ML nodes. Once model allocation is complete, we’re ready for inference.&lt;/p&gt;

&lt;p&gt;Eland can be installed from &lt;a href="https://pypi.org/project/eland" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt; via pip.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before you go any further, make sure you have Python installed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can check this by running:&lt;/p&gt;

&lt;p&gt;Unix/macOS&lt;br&gt;
&lt;code&gt;python3 --version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You should get some output like:&lt;br&gt;
&lt;code&gt;Python 3.8.8&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Additionally, you’ll need to make sure you have &lt;a href="https://packaging.python.org/en/latest/key_projects/#pip" rel="noopener noreferrer"&gt;pip&lt;/a&gt; available.&lt;/p&gt;

&lt;p&gt;You can check this by running:&lt;/p&gt;

&lt;p&gt;Unix/macOS&lt;br&gt;
&lt;code&gt;python3 -m pip --version&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You should get some output like:&lt;br&gt;
&lt;code&gt;pip 21.0.1 from …&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you installed Python from source, with an installer from &lt;a href="//python.org"&gt;python.org&lt;/a&gt;, or via &lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;Homebrew&lt;/a&gt; you should already have pip.&lt;/p&gt;

&lt;p&gt;If you don't have Python and pip installed, &lt;a href="https://packaging.python.org/en/latest/tutorials/installing-packages/" rel="noopener noreferrer"&gt;install it first&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With that, Eland can be installed from &lt;a href="https://pypi.org/project/eland/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt; via pip:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ python3 -m pip install eland&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;To interact with your cluster through the &lt;a href="https://eland.readthedocs.io/en/v8.1.0/reference/index.html" rel="noopener noreferrer"&gt;API&lt;/a&gt;, we will need to use your Elasticsearch cluster endpoint information.&lt;/p&gt;

&lt;p&gt;The endpoint looks like:&lt;br&gt;
&lt;code&gt;https://&amp;lt;user&amp;gt;:&amp;lt;password&amp;gt;@&amp;lt;hostname&amp;gt;:&amp;lt;port&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Open your &lt;a href="https://cloud.elastic.co/deployments" rel="noopener noreferrer"&gt;deployment&lt;/a&gt; settings to find your endpoint information  and click on the gear icon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6ynpjou5lw8xx076ibo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6ynpjou5lw8xx076ibo.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy your Elasticsearch endpoint as in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fir6l9yqmk71ktw0vm9lb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fir6l9yqmk71ktw0vm9lb.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: If you want to try out examples with your own cluster, remember to include your endpoint URLs and authentication details.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now add the username and password so your request can be authenticated, your endpoint will look like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://elastic:123456789@00c1f8.es.uscentral1.gcp.cloud.es.io:9243&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;username:&lt;/strong&gt; &lt;code&gt;elastic&lt;/code&gt; is a built-in superuser. Grants full access to cluster management and data indices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;password:&lt;/strong&gt; If you don't have your password, you will need to reset it and &lt;a href="https://www.elastic.co/guide/en/cloud-enterprise/2.3/ece-password-reset-elastic.html" rel="noopener noreferrer"&gt;generate a new password&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Copy your endpoint, you'll need it later.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In parallel, let's proceed locating the first model to be imported.&lt;/p&gt;

&lt;p&gt;We will import the model from &lt;a href="https://huggingface.co" rel="noopener noreferrer"&gt;Hugging Face&lt;/a&gt;, an AI community to build, train and deploy open source machine learning models.&lt;/p&gt;

&lt;p&gt;In this demo we will use a random sentiment analysis model but feel free to import the model you want to use. You can read more details about &lt;a href="https://huggingface.co/bhadresh-savani/distilbert-base-uncased-emotion" rel="noopener noreferrer"&gt;this model&lt;/a&gt; on the Hugging Face webpage.&lt;/p&gt;

&lt;p&gt;Copy the model name as in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswxdak4ytf3gf7bule28.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fswxdak4ytf3gf7bule28.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we have all the necessary information &lt;strong&gt;(elasticsearch cluster endpoint information and the name of the model we want to import)&lt;/strong&gt; let's proceed by importing the model:&lt;/p&gt;

&lt;p&gt;Open your terminal and update the following command with your endpoint and model name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eland_import_hub_model --url https://&amp;lt;user&amp;gt;:&amp;lt;password&amp;gt;@&amp;lt;hostname&amp;gt;:&amp;lt;port&amp;gt; \
--hub-model-id &amp;lt;model_name&amp;gt; \
--task-type &amp;lt;task_type&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this case we are importing the &lt;code&gt;bhadresh-savani/distilbert-base-uncased-emotion&lt;/code&gt; model to run the &lt;code&gt;text_classification&lt;/code&gt; task.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In Huggning Face filters you will be able to see the task of each model. Supported values are fill_mask, ner, question_answering, text_classification, text_embedding, and zero_shot_classification.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxswewkqgmqtbtkah593y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxswewkqgmqtbtkah593y.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eland_import_hub_model --url https://elastic:&amp;lt;password&amp;gt;@&amp;lt;hostname&amp;gt;:&amp;lt;port&amp;gt; \
--hub-model-id bhadresh-savani/distilbert-base-uncased-emotion \
--task-type text_classification
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will see that the Hugging Face model will be loaded directly from the model hub and then your model will be imported into Elasticsearch.&lt;/p&gt;

&lt;p&gt;Wait for the process to end.&lt;/p&gt;

&lt;p&gt;Let's check if the model was imported.&lt;/p&gt;

&lt;p&gt;Click &lt;code&gt;Machine Learning&lt;/code&gt; in your Kibana menu.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Froba7x9q593t01lyh6v4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Froba7x9q593t01lyh6v4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Under model management click &lt;code&gt;Trained Models&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx7qnt7a2v27hh4jc4t18.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx7qnt7a2v27hh4jc4t18.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your model needs to be on this list as shown in the image below, if it is not on this list check if there was any error message in the previous process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdh6kvjkr8kk43hnwlsa1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdh6kvjkr8kk43hnwlsa1.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If your model is on this list it means it was imported but now you need to start the deployment. To do this, in the last column under &lt;code&gt;Actions&lt;/code&gt; click &lt;code&gt;Start deployment&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm6qwqlvv5uw9qz1teddq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm6qwqlvv5uw9qz1teddq.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After deploying, the &lt;code&gt;State&lt;/code&gt; column will have the value &lt;code&gt;started&lt;/code&gt; and under &lt;code&gt;Actions&lt;/code&gt; the &lt;code&gt;Start deployment&lt;/code&gt; option will be disabled, which means that the deploy has been done.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1yhto34cp8myjidoev4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi1yhto34cp8myjidoev4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's test our model!&lt;/p&gt;

&lt;p&gt;Copy your model ID:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzbk607jepdmbaaeilr5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzbk607jepdmbaaeilr5.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Kibana's menu, click &lt;code&gt;Dev Tools&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flfizr6wogdbj9qzto8xs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flfizr6wogdbj9qzto8xs.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this UI you will have a console to interact with the REST API of Elasticsearch.&lt;/p&gt;

&lt;p&gt;We will to use the &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/infer-trained-model-deployment.html#infer-trained-model-deployment-request" rel="noopener noreferrer"&gt;inference processor&lt;/a&gt; to evaluate this model.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST _ml/trained_models/&amp;lt;model_id&amp;gt;/deployment/_infer
{
  "docs": { "text_field": "&amp;lt;input&amp;gt;"}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This &lt;code&gt;POST&lt;/code&gt; method contains a &lt;code&gt;docs&lt;/code&gt; array with a field matching your configured trained model input, typically the field name is &lt;code&gt;text_field&lt;/code&gt;. The &lt;code&gt;text_field&lt;/code&gt; value is the input you want to infer.&lt;/p&gt;

&lt;p&gt;In our case it will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST _ml/trained_models/bhadresh-savani__distilbert-base-uncased-emotion/deployment/_infer
{
  "docs": { "text_field": "Elastic is the perfect platform for knowledgebase NLP applications"}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where the model_id is &lt;code&gt;bhadresh-savani__distilbert-base-uncased-emotion&lt;/code&gt; and the value that I am using as a test is &lt;code&gt;Elastic is the perfect platform for knowledgebase NLP applications&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Clicking the play button you can send the request:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbto5nhhhn6pee4b646fg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbto5nhhhn6pee4b646fg.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case the predicted sentiment is "joy".&lt;/p&gt;

&lt;p&gt;That's it, the model is working. 🚀&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: You can run more tests to determine if this model works for what you need.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To get all the statistics of your model you can use the &lt;code&gt;_stats&lt;/code&gt; request:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;GET _ml/trained_models/&amp;lt;model_id&amp;gt;/_stats&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's continue with part 2, How to run this model on data being ingested?
&lt;/h2&gt;

&lt;p&gt;To do this, let's start by importing a .csv file into Elasticsearch. So we can run the model while importing data.&lt;/p&gt;

&lt;p&gt;I think it's interesting to run an analysis on random texts and tweets are good use cases.&lt;/p&gt;

&lt;p&gt;Recently Elon Musk announced his interest in buying Twitter, but before that he was famously active on the platform. As we have a sentiment analysis model, let's proceed with analyzing a sample of Elon's tweets.&lt;/p&gt;

&lt;p&gt;I found this database on &lt;a href="https://www.kaggle.com/datasets/kulgen/elon-musks-tweets?resource=download" rel="noopener noreferrer"&gt;Kaggle&lt;/a&gt;, this is a good website for locating datasets.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: We don't have a huge amount of data, 172Kb between November 16, 2012 and September 29, 2017. But as this is not a research paper this is not a problem.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Feel free to use whatever data you prefer, or even the twitter API.&lt;/p&gt;

&lt;p&gt;Let's download this file:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwow2ov4dx39uf5dv1v6h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwow2ov4dx39uf5dv1v6h.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And import into Elasticsearch.&lt;/p&gt;

&lt;p&gt;There are different ways to do this, but since this is a small .csv file, we can use the &lt;code&gt;Upload a file&lt;/code&gt; integration.&lt;/p&gt;

&lt;p&gt;In the Kibana menu, click &lt;code&gt;Integrations&lt;/code&gt;, you will see a list of integrations we have for collecting data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ka2xdgnc58lw05io3pn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4ka2xdgnc58lw05io3pn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Search for &lt;code&gt;Upload a file&lt;/code&gt; as in the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx7gsre12r11ikirgdbpf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx7gsre12r11ikirgdbpf.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And then click &lt;code&gt;Select or drag and drop a file&lt;/code&gt; and choose your csv file, in our case &lt;code&gt;data_elonmusk.csv&lt;/code&gt; that you downloaded earlier.&lt;/p&gt;

&lt;p&gt;You will see something similar to the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxd9e2q37zy997gil6cda.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxd9e2q37zy997gil6cda.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;code&gt;Override settings&lt;/code&gt; to rename the Tweet column to &lt;code&gt;text_field&lt;/code&gt;. As explained before, there needs to be a field that matches your configured trained model input which is typically called &lt;code&gt;text_field&lt;/code&gt;. With this, the model will be able to identify the field to be analyzed.&lt;/p&gt;

&lt;p&gt;Rename the Tweet column/field to &lt;code&gt;text_field&lt;/code&gt;. Click &lt;code&gt;Apply&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdsjvrcfrx86olzftw2gt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdsjvrcfrx86olzftw2gt.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the page loads, click &lt;code&gt;Import&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl40dc6yrilyp7sq0mrez.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl40dc6yrilyp7sq0mrez.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And then click &lt;code&gt;Advanced&lt;/code&gt; to edit the import process settings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxuvs4xzkqfde9c3n6an.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxuvs4xzkqfde9c3n6an.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The import process has several steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Processing file&lt;/strong&gt; - Turning the data into NDJSON documents so they can be ingested using the bulk api&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating index&lt;/strong&gt; - Creating the index using the settings and mappings objects&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating ingest pipeline&lt;/strong&gt; - Creating the ingest pipeline using the ingest pipeline object&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Uploading data&lt;/strong&gt; - Loading data into the new Elasticsearch index&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Creating a data view&lt;/strong&gt; (Index pattern) - Create a Kibana index pattern (if the user has opted to)&lt;/p&gt;

&lt;p&gt;As you can see the &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/csv-processor.html#csv-processor" rel="noopener noreferrer"&gt;CSV processor&lt;/a&gt; is being used  in the ingest pipeline to import your document.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgm89yqaqulgrkog509y7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgm89yqaqulgrkog509y7.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to edit the mapping or ingest pipeline.&lt;/p&gt;

&lt;p&gt;In our case we need to edit the ingest pipeline to add our previously trained and imported model.&lt;/p&gt;

&lt;p&gt;Add the model that will infer the data being ingested into the processor as in the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu87kayxj9t342qiqrwem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu87kayxj9t342qiqrwem.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  {
       "inference": {
       "model_id": "bhadresh-savani__distilbert-base-uncased-emotion"
        }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that add your index name and click Import. If for some reason it doesn't work, repeat the process and check if you typed something incorrectly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvyxuv1tfeircaq6pplkl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvyxuv1tfeircaq6pplkl.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: What we are doing is adding your model for &lt;strong&gt;inference&lt;/strong&gt; in the &lt;strong&gt;ingest pipeline&lt;/strong&gt;, it doesn't need to be a .csv. Read more about it &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When it finishes loading, your screen will look like mine, click &lt;code&gt;View index in Discover&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvysyz999acviwjjli77m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvysyz999acviwjjli77m.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you didn't disable &lt;code&gt;Create data view&lt;/code&gt; when you were importing data you should be able to locate your index by the name you used. Now you can explore your index data. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7y3c4dao2p648jpbak6j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7y3c4dao2p648jpbak6j.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next to the word &lt;code&gt;Documents&lt;/code&gt;, click &lt;code&gt;Field statistics&lt;/code&gt;, so far this is a beta feature but excellent for exploring your data. As we can see, Elon was feeling Joyful in 70% of the analyzed tweets considering this sentiment analysis model. The second most popular sentiment in Elon's tweets was anger and then fear.&lt;/p&gt;

&lt;p&gt;Let's click on the lens button on the right side of the screen to open &lt;a href="https://www.elastic.co/guide/en/kibana/current/lens.html" rel="noopener noreferrer"&gt;Kibana Lens&lt;/a&gt; and explore this data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flp2lijn7t9z60yrgt1h2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flp2lijn7t9z60yrgt1h2.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When the screen loads. Click and drag the Time field to explore this data considering the date of each tweet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3s4ouyausor7fjv2hsr4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3s4ouyausor7fjv2hsr4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Considering time, some suggestions will appear, I liked one of them, but instead of every 30 days I edited it for an annual review. Also try filtering only by prediction probability between 0.90 and 1 for better accuracy. Here you can have fun with the analysis you want to run.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F67i77qwdj2ujmf57j6z5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F67i77qwdj2ujmf57j6z5.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Apparently anger has increased over time, but joy remains the most common in Elon's Tweets. Fear increased until the beginning of 2016 but decreased in 2017.&lt;/p&gt;

&lt;p&gt;Well, there are several interpretations for data, we always need to take into account the model used, accuracy, the quality of our data, the information we seek, the type of analysis and our interpretation, context and knowledge, but I believe that now it is possible to see how useful it is to analyze language.&lt;/p&gt;

&lt;p&gt;For example, try running a classification model with the inference data (which is now a new field) to predict sentiment in addition to checking for influencers. Also try importing other models and using other datasets.&lt;/p&gt;

&lt;p&gt;I also imported a &lt;a href="https://huggingface.co/dslim/bert-base-NER" rel="noopener noreferrer"&gt;NER&lt;/a&gt; model to identify entities in the same dataset so we can start to correlate text topics (keywords) with sentiment. The year Elon talked about Tesla the most in this dataset was 2015, which coincides with the year with the greatest increase in joy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwbam6v4cnp7nkcls4n5m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwbam6v4cnp7nkcls4n5m.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This &lt;a href="https://money.cnn.com/2015/02/12/investing/tesla-apple-elon-musk/" rel="noopener noreferrer"&gt;news&lt;/a&gt; is from 2015 and Elon was really positive about Tesla even with the company reporting losses. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flmfgl7j6yni47fq3t6fi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flmfgl7j6yni47fq3t6fi.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Again, these are not necessarily facts. But my goal is to show a little bit of what we can do with NLP analysis and correlation (which &lt;strong&gt;does not imply causation&lt;/strong&gt; 😅).&lt;/p&gt;

&lt;h2&gt;
  
  
  Let's proceed with the last part, How to run this model on an existing index?
&lt;/h2&gt;

&lt;p&gt;If your data is already &lt;strong&gt;indexed&lt;/strong&gt; and you want to infer your model considering this data but without changing the index content, &lt;strong&gt;this is possible&lt;/strong&gt;. If this is your case, let's proceed with this test.&lt;/p&gt;

&lt;p&gt;In the Kibana menu click &lt;code&gt;Ingest Pipeline&lt;/code&gt; and then &lt;code&gt;Create pipeline&lt;/code&gt; and &lt;code&gt;New pipeline&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feulb9ea55pmg7uda3ync.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feulb9ea55pmg7uda3ync.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Give your pipeline a &lt;code&gt;name&lt;/code&gt; and click &lt;code&gt;Add a processor&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The first step is to rename the field that will be inferred to &lt;code&gt;text_field&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For that add the Rename processor, in the message field add the field to be renamed and in the target field add &lt;code&gt;text_field&lt;/code&gt;. And then click &lt;code&gt;Add&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyquh4cy4uxfjoodrg7l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyquh4cy4uxfjoodrg7l.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we will add the Inference processor, for that click again &lt;code&gt;Add processor&lt;/code&gt; and then under Model ID add your Model ID, in our case: &lt;code&gt;bhadresh-savani__distilbert-base-uncased-emotion&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;code&gt;Add&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Click &lt;code&gt;Create pipeline&lt;/code&gt; and copy the &lt;code&gt;name&lt;/code&gt; of your pipeline, you will need it later.&lt;/p&gt;

&lt;p&gt;Now open &lt;code&gt;Dev Tools&lt;/code&gt; and run the following request (adding your source index, dest index and pipeline name):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;POST _reindex
{
  "source": {
    "index": "&amp;lt;your-source-index-name&amp;gt;"
  },
  "dest": {
    "index": "&amp;lt;your-ml-dest-index-name&amp;gt;",
    "pipeline": "&amp;lt;your-pipeline-name&amp;gt;"
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html#docs-reindex-filter-source" rel="noopener noreferrer"&gt;This&lt;/a&gt; copies documents from a source to a destination. You can copy all documents to the destination index, or reindex a subset of the documents, you can also use source filtering to reindex a subset of the fields in the original documents.&lt;/p&gt;

&lt;p&gt;This will take some time, wait for the successful response as in the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiwq0wug49rf96y34f9mj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiwq0wug49rf96y34f9mj.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this new index you don't have the &lt;a href="https://www.elastic.co/guide/en/kibana/current/data-views.html" rel="noopener noreferrer"&gt;Data View&lt;/a&gt; yet, you need it to access the Elasticsearch data that you want to explore, to do that click &lt;code&gt;Stack Management&lt;/code&gt; in the Kibana menu and then click &lt;code&gt;Data Views&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Click &lt;code&gt;Create new data view&lt;/code&gt; and then for the Name field add the name of your new index, in my case it is &lt;code&gt;elon-output-ml&lt;/code&gt;. Click &lt;code&gt;Create data view&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now open &lt;code&gt;Discover&lt;/code&gt; and select the new index.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnzjexmxzupe0p7omhgd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbnzjexmxzupe0p7omhgd.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it, without making changes to your current index you have a new index with the result of this model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I hope you enjoy using NLP with the Elastic Stack! Feedback is always welcome.&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>nlp</category>
      <category>tutorial</category>
      <category>elasticsearch</category>
    </item>
    <item>
      <title>Elastic Anomaly Detection - Learning Process and Anomaly Score</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:39:44 +0000</pubDate>
      <link>https://dev.to/elastic/elastic-anomaly-detection-learning-process-and-anomaly-score-3nl7</link>
      <guid>https://dev.to/elastic/elastic-anomaly-detection-learning-process-and-anomaly-score-3nl7</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-categorization-5cdg"&gt;Next Post: Elastic Anomaly Detection - Categorization&lt;/a&gt; |&lt;/p&gt;

&lt;p&gt;As the name suggests, the algorithm needs to identify anomalies in the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But how does the model identify anomalies?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How do &lt;strong&gt;we&lt;/strong&gt; identify anomalies? &lt;/p&gt;

&lt;p&gt;For example, considering the image bellow.&lt;/p&gt;

&lt;p&gt;What is abnormal in this image?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p8u1jgvnezedq5mtqbx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p8u1jgvnezedq5mtqbx.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What if I add something to this image? Now, considering the updated image below, what is abnormal?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuje9mwxjmc1n379t5re.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxuje9mwxjmc1n379t5re.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It was probably easier with the second image because the cat is not a dog, making the cat the anomaly in this image, for most people. In this process, you are identifying patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identifying patterns&lt;/strong&gt; is an essential part of our learning process, but the answers are not necessarily obvious, because you know what a cat is and what a dog is, not from the pictures I showed you, I never told you this, but because you learned it during your life.&lt;/p&gt;

&lt;p&gt;We must always remember that the algorithms will only process the data that you choose to share.&lt;/p&gt;

&lt;p&gt;In the case of a child who is still learning the difference between a dog and a cow, for example, we might receive the answer that all animals in the image belong to the same category: animals. This answer is not incorrect; it simply applies different criteria based on similar characteristics observed in the available data.&lt;/p&gt;

&lt;p&gt;If we are seeking a more specific answer, considering all possible details, variables, and behavior, we need to ensure that all data that could contribute to the answer is analyzed over time. The more data we have, the better our understanding will be.&lt;/p&gt;

&lt;p&gt;In the case of a child, for them to identify the cat as 'abnormal' they would need more examples, more data would need to be “analyzed” over time. &lt;strong&gt;The conclusion is the same for the algorithms.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Based on this information, you already know that the question 'What is abnormal?' is answered by taking into account what is considered normal (which can vary), and to determine what is normal, &lt;strong&gt;the algorithm identifies patterns over time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are multiple types of Anomaly Detection analyses available in Elastic's ML solution, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single Metric analysis&lt;/strong&gt;, for jobs that analyze a single time series;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-Metric analysis&lt;/strong&gt;, to split a single time series into multiple time series;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Population analysis&lt;/strong&gt;, to identify abnormal behaviors in a homogeneous "population" over a period of time;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-categorization-5cdg"&gt;&lt;strong&gt;Categorization analysis&lt;/strong&gt;&lt;/a&gt;, which is a machine learning process that tokenizes a text field, clusters similar to data together, and classifies it into categories;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Anomaly Detection feature analyzes the input stream of data, models its behavior using techniques to construct a model that best matches your data, and performs analysis based on the detectors you defined in your job, considering possible rules and dates you want to ignore or disqualify from being modeled.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpx5hjvkc066r639nivt5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpx5hjvkc066r639nivt5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The blue line in the chart represents the actual data values, while the shaded blue area represents the bounds for the expected values. Initially, the range of expected values is wide due to a limited amount of data in the analyzed time period. Consequently, the model fails to capture the periodicity in the data.&lt;/p&gt;

&lt;p&gt;After processing more data, a model is built with coefficients that result in expected values close to the actual values. This leads to the shaded blue area being close to the blue line. By comparing the values to this area, we can determine if they fall outside of it and monitor the anomaly score to indicate the severity of potential anomalies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Anomaly Score
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;anomaly score&lt;/strong&gt; (severity) is a value from 0 to 100, which indicates the significance of the observed anomaly compared to previously seen anomalies. Highly anomalous values ​​are shown in red.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxsrhv1xaavfigaayosh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxsrhv1xaavfigaayosh.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F064rrp0bs9v32pjn4uzb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F064rrp0bs9v32pjn4uzb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to provide a sensible view of the results, an anomaly score is calculated for each &lt;strong&gt;bucket time interval&lt;/strong&gt; (we use the concept of a bucket to divide up a continuous stream of data into batches, between 10 minutes and 1 hour, for processing).&lt;/p&gt;

&lt;p&gt;When you review your machine learning results, there is a &lt;code&gt;multi_bucket_impact&lt;/code&gt; property that indicates how strongly the final anomaly score is influenced by multi-bucket analysis; anomalies with medium or high impact on multiple buckets are represented with a cross symbol instead of a circle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk3oxpfwo22imt26014cg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk3oxpfwo22imt26014cg.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-categorization-5cdg"&gt;Next Post: Elastic Anomaly Detection - Categorization&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>elasticsearch</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Elastic Anomaly Detection - Categorization</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:39:32 +0000</pubDate>
      <link>https://dev.to/elastic/elastic-anomaly-detection-categorization-5cdg</link>
      <guid>https://dev.to/elastic/elastic-anomaly-detection-categorization-5cdg</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-and-data-visualizer-handson-3c2j"&gt;Next Post: Elastic Anomaly Detection and Data Visualizer HandsOn&lt;/a&gt;|&lt;/p&gt;

&lt;p&gt;For categorization analysis, the learning process &lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-learning-process-and-anomaly-score-3nl7"&gt;is the same&lt;/a&gt;, but there are other steps to process the text.&lt;/p&gt;

&lt;p&gt;The input data must be a text field, typically containing repeated elements such as log messages because it's not a natural language processing &lt;a href="https://en.wikipedia.org/wiki/Natural_language_processing" rel="noopener noreferrer"&gt;(NLP)&lt;/a&gt; and it works best on machine-written messages.&lt;/p&gt;

&lt;p&gt;When you create a categorization anomaly detection job, the machine learning model processes the input text into different categories, identifying patterns over time, as you can see in this example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Input text&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Log message:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Jul 20 15:02:19 localhost sshd[8903]: Invalid user admin from 58.218.92.41 port 26062
Jul 20 15:02:19 localhost sshd[8903]: input_userauth_request: invalid user admin [preauth]
Jul 20 15:02:20 localhost sshd[8903]: Connection closed by 58.218.92.41 port 26062 [preauth]
Jul 20 17:10:23 localhost sshd[2074]: Received disconnect from 41.43.112.199 port 41805:11: disconnected by user
Jul 20 17:10:23 localhost sshd[2074]: Disconnected from 41.43.112.199 port 26062
Jul 20 17:10:23 localhost sshd[2072]: pam_unix (sshd:session): session closed for user ec2-user
Jul 20 19:14:55 localhost sshd[8944]: pam_unix (sshd:session): session closed for user ec2-user by (uid=0)
Jul 20 19:17:22 localhost runner: pam_unix(runuser-1:session): session closed for user ec2-user 
Jul 20 19:17:22 localhost runner: pam_unix(runuser-1:session): session opened for user ec2-user by (uid=0)
Jul 20 19:17:23 localhost runner: pam_unix(runuser-1:session): session closed for user ec2-user 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 1 - Remove mutable text&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mutable texts are not taken into account to not identify an anomaly or a pattern where there is no relevance as the value is always changing, e.g, date and time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;localhost sshd: Invalid user from port
localhost sshd: input_userauth_request: invalid user [preauth]
localhost sshd: Connection closed by port [preauth]
localhost sshd: Received disconnect from port disconnected by user
localhost sshd: Disconnected from port
localhost sshd: pam_unix session: session closed for user ec2-user
localhost sshd[8944]: pam_unix session: session closed for user ec2-user by (uid=0)
localhost runner: pam_unix session: session closed for user ec2-user 
localhost runner: pam_unix session: session opened for user ec2-user by (uid=0)
localhost runner: pam_unix session: session closed for user ec2-user 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2 - cluster similar messages together&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Which can mean a line or several lines that are part of a task, for example, and that are respecting a pattern.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&amp;gt;mlcategory:1&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;localhost sshd: Invalid user from port&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&amp;gt;mlcategory:2&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;localhost sshd: input_userauth_request: invalid user [preauth]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&amp;gt;mlcategory:3&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;localhost sshd: Connection closed by port [preauth]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&amp;gt;mlcategory:4&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;localhost sshd: Received disconnect from port disconnected by user&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&amp;gt;mlcategory:5&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;localhost sshd: Disconnected from port&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;-&amp;gt;mlcategory:6&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;localhost sshd: pam_unix session: session closed for user ec2-user&lt;br&gt;
localhost sshd[8944]: pam_unix session: session closed for user ec2-user by (uid=0)&lt;br&gt;
localhost runner: pam_unix session: session closed for user ec2-user &lt;br&gt;
localhost runner: pam_unix session: session opened for user ec2-user by (uid=0)&lt;br&gt;
localhost runner: pam_unix session: session closed for user ec2-user&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3 - Count per time bucket&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;By processing analyzing time buckets, the behavior in a cluster can be better and easily identified for anomaly checking.&lt;/p&gt;

&lt;p&gt;In the image below you can see an example of the graphic behavior of each ml category over time for a further time bucket analysis:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n0fblbgzsda6nnvv3sv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2n0fblbgzsda6nnvv3sv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As an example, at a specific time bucket, we could see an mlcategory:1 followed by an mlcategory:4, twice:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mlcategory:1 -&amp;gt; mlcategory:4 -&amp;gt; mlcategory:1 -&amp;gt; mlcategory:4&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;We could call it bucket 1, as a reference, and so on, bucket 2...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzml0mskmfvr95y8dudjy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzml0mskmfvr95y8dudjy.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-and-data-visualizer-handson-3c2j"&gt;Next Post: Elastic Anomaly Detection and Data Visualizer HandsOn&lt;/a&gt;|&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>elasticsearch</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Elastic Anomaly Detection and Data Visualizer HandsOn</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:39:16 +0000</pubDate>
      <link>https://dev.to/elastic/elastic-anomaly-detection-and-data-visualizer-handson-3c2j</link>
      <guid>https://dev.to/elastic/elastic-anomaly-detection-and-data-visualizer-handson-3c2j</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-outlier-detection-16ni"&gt;Next Post: Elastic Data Frame - Outlier Detection&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Note: This HandsOn assumes that you have already followed the step-by-step Setup of your Elastic Cloud account and added the Samples available there to replicate the analysis mentioned here. If not, please, &lt;a href="https://dev.to/priscilla_parodi/handson-setup-elastic-cloud-4j8p"&gt;follow the steps mentioned there&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We've added a &lt;a href="https://dev.to/priscilla_parodi/handson-setup-elastic-cloud-4j8p"&gt;Sample&lt;/a&gt; containing data you don't know anything about.&lt;/p&gt;

&lt;p&gt;As mentioned here, it is very &lt;strong&gt;important&lt;/strong&gt; to know the data and type of data we have in order to know what &lt;strong&gt;kind of analysis we can do.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So, before proceeding with Anomaly Detection we can, for example, use &lt;strong&gt;Data Visualizer&lt;/strong&gt; &lt;code&gt;Kibana&amp;gt;Machine Learning&amp;gt;Data visualizer&lt;/code&gt; to &lt;strong&gt;understand more&lt;/strong&gt; about the available data. &lt;/p&gt;

&lt;p&gt;In a real use case you may prefer to change some field, mapping or wrong/empty data, but in this case we will use the available data exactly as it is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrr9gk0fd0gt17emd6x7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrr9gk0fd0gt17emd6x7.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's select the Index Pattern &lt;code&gt;[eCommerce] Orders&lt;/code&gt;. When the page loads you usually won't be able to see any data because the time interval initially set is too short (15 minutes) for this type of data that is not continuously being updated, for you to access all available data click on &lt;code&gt;Use full kibana_sample_data_ecommerce_data&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh7zmjks6vvtg7h3123rc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh7zmjks6vvtg7h3123rc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we have some important information, the data type (text/keyword/geo_point/number...), % of documents containing that data type, distintic values, distributions and the possibility to visualize data in a graph &lt;code&gt;Actions&lt;/code&gt;, something we won't cover at this point. This can help us with the most important part before analyzing data, which is: What answer don't we have? What is this data not telling us that it would be important to know based on the needs that I/my company have?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5v5kxvavanrxltc0qn0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi5v5kxvavanrxltc0qn0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's pretend we are an Ecommerce owner and we want to analyze our data, the first thing we can notice is that we only have 1 month data &lt;code&gt;May 26, 2021 -&amp;gt; Jun 26, 2021&lt;/code&gt; which may not be positive for a complete analysis because we have holidays and events that can momentarily change customer behavior.&lt;/p&gt;

&lt;p&gt;Maybe it's our first month with the company, we could do a full analysis after a few years and possibly map and add rules to skip holidays and momentary events, but now what we want is to start an analysis that will be useful at this point, clearly, with limited possibilities.&lt;/p&gt;

&lt;p&gt;Something that can make sense is to understand who our customers are, after all, in just 1 month we already have a total of 4675 events with 3321 distinct values ​​for &lt;code&gt;customer_full_name.keyword&lt;/code&gt;, which means that we have a good amount of unique customers.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0atcakxl1feiexvt3m5o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0atcakxl1feiexvt3m5o.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another thing that stands out is that these customers are from different continents and countries, we are a global ecommerce company. But how does this &lt;strong&gt;population&lt;/strong&gt; spend their money? Do they &lt;strong&gt;behave similarly&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5d3ienbf63bo7mit67xb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5d3ienbf63bo7mit67xb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's run an Anomaly Detection analysis: &lt;code&gt;Machine Learning&amp;gt;Anomaly Detection&amp;gt;Create job&lt;/code&gt; and select &lt;code&gt;[eCommerce] Orders&lt;/code&gt; then, click &lt;code&gt;Use a Wizard&amp;gt;Population&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Again, let’s use the full sample, click on &lt;code&gt;Use full kibana_sample_data_ecommerce_data&amp;gt;Next&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To define a population we need a relationship between the data, not necessarily with the same value for all, but we need at least one field that is common, which characterizes the data as belonging to the same population.&lt;/p&gt;

&lt;p&gt;For the Population field, let's add some location data, let’s use the &lt;code&gt;geoip.region_name&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, considering a population characterized by groups from different regions, we want to know how these people spend their money, so as a metric to identify abnormal behavior, let's add the sum of &lt;code&gt;taxful_total_price&lt;/code&gt;, to understand if there are abnormal behaviors in the sum of the total amount spent over time.&lt;/p&gt;

&lt;p&gt;Your screen should look like this image:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4d75uvfw52g1vhhf1vkj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4d75uvfw52g1vhhf1vkj.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can also add the Bucket Span on the left side, usually the Bucket Span is 15 minutes, but you can click &lt;code&gt;Estimate bucket span&lt;/code&gt; and based on your data automatically set a good interval for time series analysis. In my case the estimated time was 3h.&lt;/p&gt;

&lt;p&gt;And on the right side you will see the &lt;code&gt;Influencers&lt;/code&gt;, if you want to see the influence of other fields on the result, and as you can see, the region will already be there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6a3yagdrnniz0ir5nkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe6a3yagdrnniz0ir5nkh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Next and then define a name for the Job ID, I used the name: &lt;code&gt;pop_price_region&lt;/code&gt;. At this time we are not going to add additional or advanced settings. After that, click Next and your webpage should look like this image:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc0d8zycoo74jgmarm9hw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc0d8zycoo74jgmarm9hw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click Next one more time if your webpage looks like this, otherwise check the error message. Finally, click Create Job. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fej0tn6jcy87wo1vhv5cf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fej0tn6jcy87wo1vhv5cf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After loading, click on View Results, in this case we don't want the Job running in real time, otherwise you could do that. &lt;/p&gt;

&lt;p&gt;A new page will load and as you can see, we don't have an Anomaly Score &amp;gt; 75, which means we don't have one high-severity event, but we do have two anomalies &amp;gt; 50, in orange.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9n65ghu5sgjrih2816fr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9n65ghu5sgjrih2816fr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The two events with &lt;code&gt;severity&amp;gt;50&lt;/code&gt;, taking into account the population and not just a single metric, came from New York on June 17th 2021 (Current: $998.88 / Typical: $117.59, 8x higher, Probability: 0.00148...), and from Cairo Governorate on June 21st 2021 (Current: $885.97 / Typical: $118.45, 7x higher, Probability: 0.00234), although all this detailed information is important it is worth remembering that the severity value is a &lt;strong&gt;normalized value&lt;/strong&gt; from 0-100 of all these data considering the behavior of the population in the analyzed period of time, which means that only one data, alone, is not necessarily relevant, it is possible to find other purchases with a value also 7x higher with less relevance, for example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fetoltwcts99c4fym3lds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fetoltwcts99c4fym3lds.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to leave this job running, as mentioned above, you just need to click &lt;code&gt;Machine Learning&amp;gt;Anomaly Detection&amp;gt;(your job)&amp;gt;Start datafeed&lt;/code&gt;, you will set the start date and set the end time, select &lt;code&gt;no end time&lt;/code&gt; to search in real time and then click Start.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgw0a8qer5oox8ef538u1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgw0a8qer5oox8ef538u1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also &lt;a href="https://www.elastic.co/guide/en/machine-learning/7.13/ml-configuring-alerts.html" rel="noopener noreferrer"&gt;create alerts&lt;/a&gt; based on severity and connect to services like Email, &lt;em&gt;IBM Resilient, Jira, Microsoft Teams, Slack&lt;/em&gt; or even write to an index or create a &lt;em&gt;Webhook&lt;/em&gt; connector. There are also &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html" rel="noopener noreferrer"&gt;APIs&lt;/a&gt; to perform machine learning anomaly detection activities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg22h806b0c8h9bewpm2u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg22h806b0c8h9bewpm2u.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-outlier-detection-16ni"&gt;Next Post: Elastic Data Frame - Outlier Detection&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>elasticsearch</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>HandsOn Setup - Elastic Cloud</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:39:00 +0000</pubDate>
      <link>https://dev.to/elastic/handson-setup-elastic-cloud-4j8p</link>
      <guid>https://dev.to/elastic/handson-setup-elastic-cloud-4j8p</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; |&lt;/p&gt;

&lt;p&gt;For HandsOn posts we will use Elastic Cloud. If you don't use Elastic Cloud yet, on &lt;a href="https://ela.st/latam-community"&gt;this link&lt;/a&gt; you can access a 30-day trial. Just add your email to start using your free trial as you can see in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HmqMi_O9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7t21s89n4rac5dyl5u5u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HmqMi_O9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7t21s89n4rac5dyl5u5u.png" alt="Alt Text" width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating your account you will not have any deployment available, to create a new one click on Create Deployment as in the image below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JwMdJzUt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mt5pxurjjjbg1vomwz52.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JwMdJzUt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mt5pxurjjjbg1vomwz52.png" alt="Alt Text" width="800" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feel free to choose the settings you prefer but before creating your deployment you need to customize to add the ML node.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QhcXxS6J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uv9qaazl3hizr081hlau.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QhcXxS6J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uv9qaazl3hizr081hlau.png" alt="Alt Text" width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FCFiS8Mb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjrl6p93cyd1ev6bhals.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FCFiS8Mb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjrl6p93cyd1ev6bhals.png" alt="Alt Text" width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then you can finally create your deployment and open Kibana. At this point don't worry about the settings beyond that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hYDJSktD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2gj6ujprlgin4lyyq0j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hYDJSktD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r2gj6ujprlgin4lyyq0j.png" alt="Alt Text" width="800" height="377"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When Kibana opens you will see a message like the message in image 1 below, suggesting that you start adding data. To proceed implementing the data analysis demonstrated here you will need to add all available samples.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iIopDPWG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dkyrk0ra5ir4ymghkjia.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iIopDPWG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dkyrk0ra5ir4ymghkjia.png" alt="Alt Text" width="800" height="988"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3blQ8Jgs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3afo2dr4fxb2qexkvf1e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3blQ8Jgs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3afo2dr4fxb2qexkvf1e.png" alt="Alt Text" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it. Now you can proceed with the data analysis examples.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lgmKuMts--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vp2anvl2mix8optzmrch.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lgmKuMts--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vp2anvl2mix8optzmrch.png" alt="Alt Text" width="800" height="753"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-and-data-visualizer-handson-3c2j"&gt;Elastic Anomaly Detection and Data Visualizer HandsOn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-handson-4ilb"&gt;Elastic Data Frame - Classification Analysis HandsOn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-inference-processor-handson-3392"&gt;Elastic Data Frame - Inference Processor HandsOn&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch, Kibana, Logstash and Beats) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>beginners</category>
      <category>tutorial</category>
      <category>elasticsearch</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Elastic Data Frame - Outlier Detection</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:38:34 +0000</pubDate>
      <link>https://dev.to/elastic/elastic-data-frame-outlier-detection-16ni</link>
      <guid>https://dev.to/elastic/elastic-data-frame-outlier-detection-16ni</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-regression-analysis-2ge2"&gt;Next Post: Elastic Data Frame - Regression Analysis&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Unlike the &lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-learning-process-and-anomaly-score-3nl7"&gt;Anomaly Detection&lt;/a&gt; models, this is a multi-variate analysis, it enables a better understanding of complex behaviors that are described by many features. For this analysis we have 3 models with different algorithms and learning types (Outlier, &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-regression-analysis-2ge2"&gt;Regression&lt;/a&gt; and &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-1b3f"&gt;Classification&lt;/a&gt;) and in this post we'll talk about Outlier Detection.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Outlier detection&lt;/strong&gt; identifies unusual data points in the dataset (Unsupervised ML).&lt;/p&gt;

&lt;p&gt;When we talk about time series modeling and population anomaly detection, we look for outliers but basing it on how far the metric is from the normal model.  &lt;/p&gt;

&lt;p&gt;With Outlier Detection we are looking at clusters of data and evaluating density and distance using multi-variate analysis. We are not interested in tracking evolution of this dataset over time like we do in population anomaly detection and there are no buckets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SRNjE1cj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cl024oq275dcoie8yya7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SRNjE1cj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cl024oq275dcoie8yya7.png" alt="Alt Text" width="800" height="718"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Evaluation of the Outlier detection
&lt;/h3&gt;

&lt;p&gt;Outliers may denote errors or unusual behavior. In the Elastic Stack, we use an ensemble of four different distance and density based outlier detection methods, based on this approach, a metric is computed called local outlier factor for each data point. The higher the local outlier factor, the more outlying is the data point.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ssxA61tl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5bzxtmxc2eokycb2y4rb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ssxA61tl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5bzxtmxc2eokycb2y4rb.png" alt="Alt Text" width="800" height="611"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-regression-analysis-2ge2"&gt;Next Post: Elastic Data Frame - Regression Analysis&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>elasticsearch</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Elastic Data Frame - Regression Analysis</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:38:17 +0000</pubDate>
      <link>https://dev.to/elastic/elastic-data-frame-regression-analysis-2ge2</link>
      <guid>https://dev.to/elastic/elastic-data-frame-regression-analysis-2ge2</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-1b3f"&gt;Next Post: Elastic Data Frame - Classification Analysis&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Unlike the &lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-learning-process-and-anomaly-score-3nl7"&gt;Anomaly Detection&lt;/a&gt; models, this is a multi-variate analysis, it enables a better understanding of complex behaviors that are described by many features. For this analysis we have 3 models with different algorithms and learning types (&lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-outlier-detection-16ni"&gt;Outlier&lt;/a&gt;, Regression and &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-1b3f"&gt;Classification&lt;/a&gt;) and in this post we'll talk about Regression Analysis.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Regression&lt;/strong&gt; makes predictions on your data after it determines certain relationships among your data points (Supervised ML).&lt;/p&gt;

&lt;p&gt;For example, suppose we are interested in finding the relationship between apartment size and monthly rent in a city, to do this we need to find the relationship between a number of &lt;strong&gt;features&lt;/strong&gt; and a &lt;strong&gt;target variable&lt;/strong&gt; to know if the target variable can/can't be explained by the feature(s).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ISogRk3K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jp5os5594ginh5rjdh5q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ISogRk3K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jp5os5594ginh5rjdh5q.png" alt="Alt Text" width="800" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This example is a one-dimensional regression problem, because we only have one feature variable (size), but we could easily add more features.&lt;/p&gt;

&lt;h3&gt;
  
  
  Evaluation of the Regression analysis
&lt;/h3&gt;

&lt;p&gt;For the regression analysis we use a variation of the XGBoost algorithm, which combines decision trees with gradient boosting methodologies.&lt;/p&gt;

&lt;p&gt;The two measures that we can use to evaluate regression in the stack is R2 and MSE:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s1a7sTg6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oql3xo4eugegi6eppjo4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s1a7sTg6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oql3xo4eugegi6eppjo4.png" alt="Alt Text" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;R Squared&lt;/strong&gt; (ranges from 0 to 1 | the higher the better): measures goodness of fit, to know if the target variable can/can’t be explained by the feature variable, 1 is a perfect fit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mean Squared Error&lt;/strong&gt; (ranges from 0 to 1 | the lower the better) - measures the average error between the actual datapoints and the predicted data points telling you how close a regression line is to a set of points. It does this by taking the distances from the points (purple dots) to the regression line (blue line), these distances (red lines) are the “errors”, and squaring them.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Rt5oNPm3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j2wulfvxfyk3tmscsrx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Rt5oNPm3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6j2wulfvxfyk3tmscsrx.png" alt="Alt Text" width="800" height="803"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can measure how well our model is performing by computing the average squared sum of the difference between the true and predicted value - Mean Square Error.&lt;/p&gt;

&lt;p&gt;When you view the regression results in Kibana. It provides information about the analysis, model evaluation metrics, total feature importance values, and a scatterplot matrix.&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-classification-analysis-1b3f"&gt;Next Post: Elastic Data Frame - Classification Analysis&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>elasticsearch</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Elastic Data Frame - Classification Analysis</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:38:03 +0000</pubDate>
      <link>https://dev.to/elastic/elastic-data-frame-classification-analysis-1b3f</link>
      <guid>https://dev.to/elastic/elastic-data-frame-classification-analysis-1b3f</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-classification-vs-regression-4cod"&gt;Next Post: Elastic Data Frame - Classification vs Regression&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Unlike the &lt;a href="https://dev.to/priscilla_parodi/elastic-anomaly-detection-learning-process-and-anomaly-score-3nl7"&gt;Anomaly Detection&lt;/a&gt; models, this is a multi-variate analysis, it enables a better understanding of complex behaviors that are described by many features. For this analysis we have 3 models with different algorithms and learning types (&lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-outlier-detection-16ni"&gt;Outlier&lt;/a&gt;, &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-regression-analysis-2ge2"&gt;Regression&lt;/a&gt; and Classification) and in this post we'll talk about Classification Analysis.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Classification&lt;/strong&gt; predicts the class or category of a given data point in a data set (Supervised ML).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uxLqlNL4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z97o8dgzzombkqd47a5v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uxLqlNL4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z97o8dgzzombkqd47a5v.png" alt="Alt Text" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In regression the goal is to have our prediction close to the actual value. In classification the goal is to be correct (and heavily penalize incorrect predictions).&lt;/p&gt;

&lt;h3&gt;
  
  
  Evaluation of the Classification analysis
&lt;/h3&gt;

&lt;p&gt;The algorithms we are using for Classification are Boosted Tree and Logistic Function.&lt;/p&gt;

&lt;p&gt;A Logistic function can be fit to the data using a cross-entropy cost function, which essentially computes a measure of dissimilarity between the true (observed) probabilities and our model of the probabilities. The goal is to make the model output be as close as possible to the desired output (true classes).&lt;/p&gt;

&lt;p&gt;Kibana provides a normalized confusion matrix that contains the percentage of occurrences where the analysis classified data points correctly with their actual class, for example, &lt;code&gt;TP&lt;/code&gt; and &lt;code&gt;TN&lt;/code&gt; in the image below are good results when they have a higher percentage than &lt;code&gt;FN&lt;/code&gt; and &lt;code&gt;FP&lt;/code&gt; because this means that the prediction of "true and false" was correct, corresponding to the real value, in most cases. The higher the percentage in this case, the better.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--krMlrOYp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3towpzlxgr6dlifb66pw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--krMlrOYp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3towpzlxgr6dlifb66pw.png" alt="Alt Text" width="800" height="553"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qtsXfT1D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/72458nfcs0hnjocgyhbn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qtsXfT1D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/72458nfcs0hnjocgyhbn.png" alt="Alt Text" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Kibana also provides the receiver operating characteristic (ROC) curve as part of the model evaluation. The plot compares the true positive rate (y-axis) to the false positive rate (x-axis) for each class; in this example, true and false. It is a number between 0 and 1. The higher the AUC, the better the model is at predicting the classes correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8W2kSnpF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qspaajwehfio6rkay8pu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8W2kSnpF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qspaajwehfio6rkay8pu.png" alt="Alt Text" width="800" height="582"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/elastic-data-frame-classification-vs-regression-4cod"&gt;Next Post: Elastic Data Frame - Classification vs Regression&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>elasticsearch</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Elastic Data Frame - Classification vs Regression</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:37:51 +0000</pubDate>
      <link>https://dev.to/elastic/elastic-data-frame-classification-vs-regression-4cod</link>
      <guid>https://dev.to/elastic/elastic-data-frame-classification-vs-regression-4cod</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/data-preparation-for-data-frame-analysis-with-transforms-2bp6"&gt;Next Post: Data preparation for Data Frame Analysis with Transforms&lt;/a&gt;|&lt;/p&gt;

&lt;p&gt;Regression and classification algorithms are supervised ML algorithms but the difference between the two is how they are used for different machine learning challenges. In the classification analysis we are predicting class probabilities such as yes / no, true / false, spam / not spam, while in the regression analysis we are predicting continuous values such as price and salary.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7Vf_0Ck4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kth62bb9fpdq6gaxk8k7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Vf_0Ck4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kth62bb9fpdq6gaxk8k7.png" alt="Alt Text" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/data-preparation-for-data-frame-analysis-with-transforms-2bp6"&gt;Next Post: Data preparation for Data Frame Analysis with Transforms&lt;/a&gt;|&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>elasticsearch</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Data preparation for Data Frame Analysis with Transforms</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:36:58 +0000</pubDate>
      <link>https://dev.to/elastic/data-preparation-for-data-frame-analysis-with-transforms-2bp6</link>
      <guid>https://dev.to/elastic/data-preparation-for-data-frame-analysis-with-transforms-2bp6</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/trained-models-for-supervised-learning-154n"&gt;Next Post: Trained Models for Supervised Learning&lt;/a&gt; |&lt;/p&gt;

&lt;p&gt;When you are using Data Frames (multi-variate analysis), Transforms can be useful in the data preparation step.&lt;/p&gt;

&lt;p&gt;It converts existing Elasticsearch indexes into summary indexes, allowing you to define a pivot, which is a set of features that transform the index into a different, more digestible format, providing opportunities for new insights and analysis.&lt;/p&gt;

&lt;p&gt;In fact, it performs search aggregations on the source index and indexes the results on the destination index. Therefore, a transformation never takes less time or uses less resources than the aggregation and indexing processes.&lt;/p&gt;

&lt;p&gt;You can decide whether you want the transform to run once or continuously.&lt;/p&gt;

&lt;p&gt;In this example we have 3 documents from a source index that stores reviews, with these fields: user-id, vendor and review.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Source Index (reviews)
{
...
user-id: 123,
vendor: "abc",
review: 4
},
{
...
user-id: 123,
vendor: "def",
review: 3
},
{
...
user-id: 123,
vendor: "ghi",
review: 5
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Transforms we can have a Destination Index grouped by user-id, for example, with the number of reviews per user (3 reviews in this case), and a simple average of the reviews (4+3+5)/4.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Destination Index (reviews-result)
{
...
user-id: 123,
num_reviews(sum): 3,
avg_review: 4
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And it could be updated if running continuously, which means we could use the data we need in the way we need it, e.g., sum, max, cardinality, etc.&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/trained-models-for-supervised-learning-154n"&gt;Next Post: Trained Models for Supervised Learning&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>elasticsearch</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Trained Models for Supervised Learning</title>
      <dc:creator>Priscilla Parodi</dc:creator>
      <pubDate>Mon, 02 Aug 2021 14:36:46 +0000</pubDate>
      <link>https://dev.to/elastic/trained-models-for-supervised-learning-154n</link>
      <guid>https://dev.to/elastic/trained-models-for-supervised-learning-154n</guid>
      <description>&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/inference-for-supervised-learning-66k"&gt;Next Post: Inference for Supervised Learning&lt;/a&gt; |&lt;/p&gt;

&lt;p&gt;When you use a data frame analytics job to perform classification or regression analysis, it creates a &lt;strong&gt;machine learning model&lt;/strong&gt; that is trained and tested against a labelled data set. When you are satisfied with your &lt;strong&gt;trained model&lt;/strong&gt;, you can use it to make predictions against new data.&lt;/p&gt;

&lt;p&gt;To see your available models: Kibana&amp;gt;Machine Learning&amp;gt;Data Frame Analytics&amp;gt;Models&lt;/p&gt;

&lt;p&gt;Alternatively, you can use APIs like &lt;a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.13/get-trained-models.html#ml-get-trained-models-request"&gt;get trained models&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The following example gets information for all the trained models:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;GET _ml/trained_models/&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Models trained in Elasticsearch are &lt;a href="https://www.elastic.co/guide/en/machine-learning/current/ml-trained-models.html#export-import"&gt;portable&lt;/a&gt; and can be transferred between clusters.&lt;/p&gt;

&lt;p&gt;It is also possible to import a model to your Elasticsearch cluster even if the model is not trained by Elastic Data Frame analytics. &lt;a href="https://eland.readthedocs.io/en/v7.13.0b1/"&gt;&lt;strong&gt;Eland&lt;/strong&gt;&lt;/a&gt; supports &lt;a href="https://www.elastic.co/guide/en/elasticsearch/client/eland/current/machine-learning.html"&gt;importing models&lt;/a&gt; directly through its APIs.&lt;/p&gt;

&lt;p&gt;| &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Menu&lt;/a&gt; | &lt;a href="https://dev.to/priscilla_parodi/inference-for-supervised-learning-66k"&gt;Next Post: Inference for Supervised Learning&lt;/a&gt; |&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This post is part of a series that covers &lt;a href="https://dev.to/priscilla_parodi/a-guide-to-machine-learning-ai-with-the-elastic-stack-1dkl"&gt;Artificial Intelligence with a focus on Elastic's (Creators of Elasticsearch) Machine Learning solution&lt;/a&gt;, aiming to introduce and exemplify the possibilities and options available, in addition to addressing the context and usability.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>machinelearning</category>
      <category>elasticsearch</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
