Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Linear interpolation of a curve to compare with a reference curve

$
0
0
Hi everyone, I have a new problem, at each time-stamp, I am getting a curve of X and Y values. The number of X-Y pairs vary at each timestamp. I have a reference curve of Xref-Yref and now I want to create an interpolation of my X-Y values as Xref-Yinterpolated so I can compare the curves. Here it is step by step: index=index source=source | head 1 | dedup PartId1 | rex field=_raw ".*)<\/FloatPoints>" | rex mode=sed field=FP_Values "s/>/|/" | rex field=FP_Values "\|(?\d+.\d+)" max_match=5000 | table PartId1 XWert | mvexpand XWert | streamstats count | join type=OUTER count [ search index=atmo_pc* source=mysql* | head 1 | rex field=_raw ".*)<\/FloatPoints>" | rex field=FP_Values ";(?\-*\d\.\d+)" max_match=5000 | table YWert | mvexpand YWert | streamstats count ] So I get the following: PartId---Xwert-----YWert---count 0001-----75.11-----0.004-----1 0001-----75.32-----0.010-----2 0001-----75.53-----0.032-----3 ... I can easily add my reference curve (with an increment of 0.3 on the X ) via an inputlookup command but the count of Xvalues, Yvalues is different from Xref, Yref. PartId---Xwert-----YWert----Xref----Yref-----count 0001-----75.11-----0.004---74.9---0.0021---1 0001-----75.32-----0.010---75.2---0.0035---2 0001-----75.53-----0.032---75.5---0.0058---3 ... So here is the question, I want to create a linear interpolation that I will do via a loop in python, R, even excel... but here I don't know how to get the following: PartId---Xwert-----YWert----Xref----Yref----- **Yinterpolated** ----count 0001-----75.11-----0.004---74.9---0.0021---------0.000-------------1 0001-----75.32-----0.010---75.2---0.0035---------0.007-------------2 0001-----75.53-----0.032---75.5---0.0058---------0.030-------------3 ... So then I could easily compare YWert ant Y interpolated and check if it is outside the 2 standard deviations. Many thanks in advance, I hope it is clear enough.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>