<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use predict command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-predict-command/m-p/372532#M109577</link>
    <description>&lt;P&gt;What is the query in which you are using &lt;CODE&gt;predict&lt;/CODE&gt;?&lt;BR /&gt;
What error are you getting from &lt;CODE&gt;timechart&lt;/CODE&gt;?&lt;BR /&gt;
If _time is only today's date then it means Splunk can't find a date in your data so it's using the current date or the file modification date.  Check your timestamp settings.&lt;/P&gt;</description>
    <pubDate>Wed, 10 May 2017 19:46:58 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2017-05-10T19:46:58Z</dc:date>
    <item>
      <title>How to use predict command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-predict-command/m-p/372531#M109576</link>
      <description>&lt;P&gt;Date    &lt;STRONG&gt;ALLOCATED_GB&lt;/STRONG&gt;    &lt;EM&gt;USED_GB&lt;/EM&gt;   &lt;STRONG&gt;Difference&lt;/STRONG&gt;&lt;BR /&gt;
20/08/2016  &lt;STRONG&gt;580.22&lt;/STRONG&gt;  &lt;EM&gt;566.57&lt;/EM&gt;    &lt;STRONG&gt;13.65&lt;/STRONG&gt;&lt;BR /&gt;
21/08/2016  &lt;STRONG&gt;580.22&lt;/STRONG&gt;  106.6   &lt;STRONG&gt;473.62&lt;/STRONG&gt;&lt;BR /&gt;
22/08/2016  &lt;STRONG&gt;580.22&lt;/STRONG&gt;  &lt;EM&gt;80.88&lt;/EM&gt; &lt;STRONG&gt;499.34&lt;/STRONG&gt;&lt;BR /&gt;
23/08/2016  &lt;STRONG&gt;580.22&lt;/STRONG&gt;  &lt;EM&gt;96.34&lt;/EM&gt; &lt;STRONG&gt;483.88&lt;/STRONG&gt;&lt;BR /&gt;
24/08/2016  &lt;STRONG&gt;580.22&lt;/STRONG&gt;  &lt;EM&gt;566.57&lt;/EM&gt;    &lt;STRONG&gt;13.65&lt;/STRONG&gt;&lt;BR /&gt;
25/08/2016  &lt;STRONG&gt;580.22&lt;/STRONG&gt;  &lt;EM&gt;107.49&lt;/EM&gt;    &lt;STRONG&gt;472.73&lt;/STRONG&gt;&lt;BR /&gt;
26/08/2016  &lt;STRONG&gt;580.22&lt;/STRONG&gt;  &lt;EM&gt;112.1&lt;/EM&gt; &lt;STRONG&gt;468.12&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I inserted raw date today in Splunk with the help of CSV file&lt;BR /&gt;&lt;BR /&gt;
I am getting _time=10/05/2017 only which is of today's date.&lt;BR /&gt;
Also i have a field name as Date which contains all the date of this month.&lt;BR /&gt;
I am trying to predict USED_GB on the basis of my date.&lt;BR /&gt;
But when i try to use predict command to predict USED_GB its not working for me. Timechart is giving me error.&lt;/P&gt;

&lt;P&gt;Could any one please help me how can i use predict ?&lt;BR /&gt;
I have also attached the glimpse of raw data in the form of csv with this question&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:00:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-predict-command/m-p/372531#M109576</guid>
      <dc:creator>m7787579</dc:creator>
      <dc:date>2020-09-29T14:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use predict command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-predict-command/m-p/372532#M109577</link>
      <description>&lt;P&gt;What is the query in which you are using &lt;CODE&gt;predict&lt;/CODE&gt;?&lt;BR /&gt;
What error are you getting from &lt;CODE&gt;timechart&lt;/CODE&gt;?&lt;BR /&gt;
If _time is only today's date then it means Splunk can't find a date in your data so it's using the current date or the file modification date.  Check your timestamp settings.&lt;/P&gt;</description>
      <pubDate>Wed, 10 May 2017 19:46:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-predict-command/m-p/372532#M109577</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-05-10T19:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use predict command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-predict-command/m-p/372533#M109578</link>
      <description>&lt;P&gt;Try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval _time=strptime(Date,"%d/%m/%Y")
| timechart span=1d max(USED_GB) as USED_GB
| predict USED_GB 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: If you insert the CSV data to Splunk with correct timestamp recognition, eval statement will not be required. You have only one row per day, however, I am ensuring the same using &lt;STRONG&gt;span=1d&lt;/STRONG&gt; and &lt;STRONG&gt;max()&lt;/STRONG&gt; aggregation function. Since the issue seems to be with timechart command and not predict, you might have to provide your timechart query and error detail, if the above does not solve the same.&lt;/P&gt;

&lt;P&gt;There are several other factors for predict command to work as per your data like algorithm, holdback, correlation, confidence intervals, future timespan etc. Refer to the following documentation: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Predict"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Predict&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Also you should get the &lt;STRONG&gt;Machine Learning Toolkit&lt;/STRONG&gt; (which also requires &lt;STRONG&gt;Python for Scientific Computing Add On&lt;/STRONG&gt; to work). You should check out some of &lt;STRONG&gt;Forecast Time  Series&lt;/STRONG&gt; examples (Your use case is similar to Forecast Internet Traffic data). The app also has links to Video Tutorials and several Tool Tips as well as option to see SPL powering various panels. As a bonus you have some unique Visualizations specifically for Predictions and Detecting Outliers. Try to feed several year of Data to train and fit the model.&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 08:51:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-predict-command/m-p/372533#M109578</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-05-11T08:51:15Z</dc:date>
    </item>
  </channel>
</rss>

