Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Standard Deviation Aggregation #5

Closed
angocor opened this issue Mar 9, 2018 · 7 comments
Closed

Using Standard Deviation Aggregation #5

angocor opened this issue Mar 9, 2018 · 7 comments

Comments

@angocor
Copy link

angocor commented Mar 9, 2018

Hello.

I am trying to create a Datasweet formula that uses a Standard Deviation aggregation as input. However it seems that Datasweet Formula is not capable of using that value.

Is there support for Standard Deviation in Datasweet Formula?.

I am using Kibana and Elasticsearch version 6.2.1 and installed Datasweet Formula datasweet_formula-1.0.1_kibana-6.2.1.zip

@lfroment-datasweet
Copy link

Hi @angocor,

indeed, that one creates two columns of data, that is why Formula does not handle it correctly. We need to investigate this.
Regards

@charlotth
Copy link

Hi, please try the new release v1.0.2 !

@v01t
Copy link

v01t commented Mar 20, 2018

HI @tcharlot-datasweet,

thanks for the update, derivation aggregation works now, same for percentiles, with the following syntax in formula:

  • aggX_std_upper
  • aggX_std_lower
  • aggX_PERCENTILEVALUE

maybe it will be a good improvement (to cover all possible similar cases and functionality) in future to retrieve them in a formula like:
aggX[std_deviation_bounds.upper]
or
aggX[99] (for percentiles)

the reason is that for some of the aggregations elasticsearch return more fields (that currently inaccessible from kibana UI afaik), example with Standard Deviation, response bucket:
... "buckets": [ { "1": { "count": 3, "min": 909, "max": 1670, "avg": 1409.3333333333333, "sum": 4228, "sum_of_squares": 6334382, "variance": 125240.22222222232, "std_deviation": 353.89295305533045, "std_deviation_bounds": { "upper": 2117.119239443994, "lower": 701.5474272226724 } } ...

as you can see bucket beside std_deviation_bounds[] returns also variance, sum_of_squares and others that will be nice to have in the formula, with logic when aggX becoming array accessible from the formula retrieving of such values it is just a matter of proper naming and parentness, like: aggX[sum_of_squares] or aggX[std_deviation_bounds.lower]

I can try to look, maybe I can help with such implementation if you point me on a proper place to do so (to save time).

also, I can create dedicated "feature" issue if required as main subj resolved now.

Regards and thanks a lot for your work.

@charlotth
Copy link

Hi @v01t

Actually formula occurs on the array generated by kibana (tabify). This array is based on aggConfig object.
I didnt check but i doubt kibana retrieves the complete values.

For the formula syntax, i agree with you, it's clearer to write aggX[std_deviation]. But, the javascript evaluator doesnt understand this syntax. The following syntax aggX.std_deviation can be possible but in case of percentile values aggX.15will throw an error. That's why i used the following syntax aggX_15.

We will be happy if you want to contribute to this project :)

Regards

@itamarm10
Copy link
Contributor

This plugin is phenomenal! Thank you for your work.
I’m using version 1.1.0 with Kibana 5, and I’m having trouble using the percentile and standard deviation features. When I try to use them on a metric visualization, only “-“ appears.
Perhaps someone can further explain how to use this functionality or upload a screenshot?
Thank you so much!

@lfroment-datasweet
Copy link

Hi @itamarm10 ,

because those aggs (percentile and StDev) give you more than one values, you have to write a dedicated Formula input, following this syntax (examples below) :
aggX_std_upper
aggX_std_lower
aggX_PERCENTILEVALUE

percentiles_formula_agg

stdev_formula_agg

@itamarm10
Copy link
Contributor

Thank you very much for your quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants