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

[ML] Allow scientific notation for formatting very small actual and typical values #34115

Open
richcollier opened this issue Mar 28, 2019 · 2 comments
Labels
enhancement New value added to drive a business result Feature:Anomaly Detection ML anomaly detection :ml

Comments

@richcollier
Copy link

Kibana version:
6.6.2

Notice the typical column:

image

Here's the associated anomaly record:

    "hits" : [
      {
        "_index" : ".ml-anomalies-shared",
        "_type" : "doc",
        "_id" : "io_monitoring_record_1544950800000_900_0_906066770_33",
        "_score" : 0.0,
        "_source" : {
          "job_id" : "io_monitoring",
          "result_type" : "record",
          "probability" : 2.530814467762354E-230,
          "multi_bucket_impact" : -5.0,
          "record_score" : 98.3941490916286,
          "initial_record_score" : 98.3941490916286,
          "bucket_span" : 900,
          "detector_index" : 0,
          "is_interim" : false,
          "timestamp" : 1544950800000,
          "partition_field_name" : "source.keyword",
          "partition_field_value" : "xxxxxxx.xxxxxxx.com",
          "function" : "mean",
          "function_description" : "mean",
          "typical" : [
            1.0758673682845221E-12
          ],
          "actual" : [
            0.002499999944120646
          ],
          "field_name" : "value",
          "influencers" : [
            {
              "influencer_field_name" : "source.keyword",
              "influencer_field_values" : [
                "xxxxxxx.xxxxxxx.com"
              ]
            }
          ],
          "source.keyword" : [
            "xxxxxxx.xxxxxxx.com"
          ]
        }
      }
    ]
@richcollier richcollier added bug Fixes for quality problems that affect the customer experience Feature:ml-results legacy - do not use labels Mar 28, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@peteharverson
Copy link
Contributor

The actual and typical values are formatted according to the Kibana format that has been configured for the field from the corresponding index pattern. If no format has been specified for the particular index pattern field (on the index patterns page under the Kibana Management tab), it will use the number format, configured under Management - Advanced Settings, which defaults to 0,0.[000], which is what is happening in the screenshot above.

The number format uses the numeral.js format, but Kibana uses a fork of numeraljs, which unfortunately does not yet support the exponential format which is now provided by numeral.js. An enhancement request is open to add support for scientific format - see #5811.

So until exponential format is added to the fork of numeral.js, I don't believe there is much we can offer here, as I think using the Kibana-wide field formats offers more benefits than ML providing its own custom formatting. If you wanted to drop the comma separators, you could configure a format of 0 for that field in the index pattern to give e.g.

image

@peteharverson peteharverson changed the title [ML] Incorrect number formatting/rounding of "typical" values [ML] Allow scientific notation for formatting very small actual and typical values Apr 5, 2019
@peteharverson peteharverson added enhancement New value added to drive a business result and removed bug Fixes for quality problems that affect the customer experience labels Apr 5, 2019
@sophiec20 sophiec20 added Feature:Anomaly Detection ML anomaly detection and removed Feature:ml-results legacy - do not use labels Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Anomaly Detection ML anomaly detection :ml
Projects
None yet
Development

No branches or pull requests

5 participants