<?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 Generate timechart with normalized/rescaled data points in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Generate-timechart-with-normalized-rescaled-data-points/m-p/512910#M143901</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to analyze an A/B test results on access pattern changes for a specific field.&lt;/P&gt;&lt;P&gt;Simplified query looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test-app (ab_test_id="baseline" OR ab_test_id="ab123")
| timechart count(eval(ab_test_id=="baseline")) as Baseline count(eval(ab_test_id=="abc123")) as Test by api_endpoint&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the event counts diff by ~100x, it will be better to re-scale the data either like the following min-max normalization, or just a percentage of each API endpoint, e.g. api_xyz may account for 20% in baseline, but receives 50% in the A/B test (ab123).&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Archive/Normalizing-feature-scaling-a-datapoint/td-p/194303" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Archive/Normalizing-feature-scaling-a-datapoint/td-p/194303&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I used to have a concat field on the timechart, like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test-app (ab_test_id="baseline" OR ab_test_id="abc123")
| eval endpoint_by_ab=mvzip(api_endpoint, ab_test_id, "_")
| timechart count by endpoint_by_ab
| addtotals row=true fieldname=_total_baseline *_baseline
| addtotals row=true fieldname=_total_ab *_abc123
| foreach *_baseline [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' * 100 / _total_baseline)]
| foreach *_abc123 [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' * 100 / _total_ab)]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will be great to use the original api_endpoint to leverage the trellis layout to compare baseline with A/B for each api_endpoint, how should I do that?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Fri, 07 Aug 2020 01:08:38 GMT</pubDate>
    <dc:creator>izx</dc:creator>
    <dc:date>2020-08-07T01:08:38Z</dc:date>
    <item>
      <title>Generate timechart with normalized/rescaled data points</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Generate-timechart-with-normalized-rescaled-data-points/m-p/512910#M143901</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to analyze an A/B test results on access pattern changes for a specific field.&lt;/P&gt;&lt;P&gt;Simplified query looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test-app (ab_test_id="baseline" OR ab_test_id="ab123")
| timechart count(eval(ab_test_id=="baseline")) as Baseline count(eval(ab_test_id=="abc123")) as Test by api_endpoint&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since the event counts diff by ~100x, it will be better to re-scale the data either like the following min-max normalization, or just a percentage of each API endpoint, e.g. api_xyz may account for 20% in baseline, but receives 50% in the A/B test (ab123).&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Archive/Normalizing-feature-scaling-a-datapoint/td-p/194303" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Archive/Normalizing-feature-scaling-a-datapoint/td-p/194303&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I used to have a concat field on the timechart, like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test-app (ab_test_id="baseline" OR ab_test_id="abc123")
| eval endpoint_by_ab=mvzip(api_endpoint, ab_test_id, "_")
| timechart count by endpoint_by_ab
| addtotals row=true fieldname=_total_baseline *_baseline
| addtotals row=true fieldname=_total_ab *_abc123
| foreach *_baseline [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' * 100 / _total_baseline)]
| foreach *_abc123 [eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = round('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;' * 100 / _total_ab)]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will be great to use the original api_endpoint to leverage the trellis layout to compare baseline with A/B for each api_endpoint, how should I do that?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 07 Aug 2020 01:08:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Generate-timechart-with-normalized-rescaled-data-points/m-p/512910#M143901</guid>
      <dc:creator>izx</dc:creator>
      <dc:date>2020-08-07T01:08:38Z</dc:date>
    </item>
  </channel>
</rss>

