cumulative distribution function

| stats count by X
| eventstats sum(count) as totalĀ 
| eval probXi=count/total
| sort X
| streamstats sum(probXi) as CDF

purpose:

requirements:

comments:

props to Pierre Brunel

Time Travel or How to move a field through time for prediction purposes

| inputlookup app_usage.csv | reverse | streamstats window=1 current=f first(RemoteAccess) as RemoteAccessFromFuture | reverse | ...

purpose:

Align a future value with the features in the past based on some time delta (Time to Decision, Time to Action) for machine learning or predictive analytics in general.

requirements:

comments:

Props to Tom LaGatta Be careful , check 1) for current=f 2) if your time frame is correct for the |reverse bit. 3) if you are confused about first() verse last(), use a line chart and check

Create a Normal Curve

| makeresults count=50000
| eval r = random() / (pow(2,31)-1)
| eval r2 = random() / (pow(2,31)-1)
| eval normal = sqrt(-2 * ln(r)) * cos(2 * pi() * r2)
| bin normal span=0.1
| stats count by normal
| makecontinuous normal

purpose:

requirements:

comments:

Props to Alexander (Xander) Johnson