<?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: predict function query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445468#M171571</link>
    <description>&lt;P&gt;Thanks ,that worked...&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2019 11:19:14 GMT</pubDate>
    <dc:creator>jiaqya</dc:creator>
    <dc:date>2019-05-02T11:19:14Z</dc:date>
    <item>
      <title>predict function query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445462#M171565</link>
      <description>&lt;P&gt;at time i find the predict function predicts values over 100% based on historical data.&lt;BR /&gt;
is there anything i can configure to ensure the predicted value does not go over 100%, ie cutoff at 100%, or set max value as 100% ?&lt;/P&gt;

&lt;P&gt;basically want to limit the predict value not to go beyond a certain number&lt;/P&gt;

&lt;P&gt;john.&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 09:38:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445462#M171565</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2019-05-02T09:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: predict function query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445463#M171566</link>
      <description>&lt;P&gt;hi @jiaqya,&lt;/P&gt;

&lt;P&gt;Check this out :&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Predict"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Predict&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;It's got everything you can do with the predict command, I don't see any way to limit the upper bound to 100 but you could always use eval on the resulting field and make a condition saying if &amp;gt; 100 then make it 100.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 09:49:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445463#M171566</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-02T09:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: predict function query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445464#M171567</link>
      <description>&lt;P&gt;Thanks David, but it does not tell much about limiting the prediction value.&lt;/P&gt;

&lt;P&gt;in my case , im trying to get prediction for max cpu, and it seems with 3 months of data, its predicting over 100% of cpu, which is not true, so anything over 100% i would like to eval it to 100.&lt;/P&gt;

&lt;P&gt;is there   a way to do it via predict function, else would it be ok to do it with eval..&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 09:58:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445464#M171567</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2019-05-02T09:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: predict function query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445465#M171568</link>
      <description>&lt;P&gt;Hey again @jiaqya, all available options for the predict commands are in the reference sheet. I went through it again and there is no max boundary that can be set which means the only way to avoid these weird over 100% predictions is to use predict followed by eval setting the maximum value. Let me know if you're not able to build the eval I'll help you out with it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 10:29:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445465#M171568</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-02T10:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: predict function query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445466#M171569</link>
      <description>&lt;P&gt;Thanks for helping David, i was having trouble evaluating the fields.&lt;/P&gt;

&lt;P&gt;the field is maxCPU&lt;/P&gt;

&lt;P&gt;after predict i get a field called prediction(maxCPU)&lt;/P&gt;

&lt;P&gt;i was not able to eval this field due to the nature of function in it, due to brackets.&lt;/P&gt;

&lt;P&gt;i was trying below, didnt work, see if you can help.&lt;/P&gt;

&lt;P&gt;eval prediction(maxCPU)=if(prediction(maxCPU)&amp;gt;100,100,prediction(maxCPU))&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 10:32:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445466#M171569</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2019-05-02T10:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: predict function query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445467#M171570</link>
      <description>&lt;P&gt;Try using the eval as follows : &lt;/P&gt;

&lt;P&gt;|eval prediction(maxCPU)=if('prediction(maxCPU)'&amp;gt;100,100,'prediction(maxCPU)')&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 10:40:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445467#M171570</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-02T10:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: predict function query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445468#M171571</link>
      <description>&lt;P&gt;Thanks ,that worked...&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 11:19:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445468#M171571</guid>
      <dc:creator>jiaqya</dc:creator>
      <dc:date>2019-05-02T11:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: predict function query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445469#M171572</link>
      <description>&lt;P&gt;awesome &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 11:20:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/predict-function-query/m-p/445469#M171572</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-02T11:20:54Z</dc:date>
    </item>
  </channel>
</rss>

