watcher.decision_engine.scoring.dummy_scorer
Modulewatcher.decision_engine.scoring.dummy_scorer
Module¶watcher.decision_engine.scoring.dummy_scorer.
DummyScorer
(config)[source]¶Bases: watcher.decision_engine.scoring.base.ScoringEngine
Sample Scoring Engine implementing simplified workload classification.
Typically a scoring engine would be implemented using machine learning techniques. For example, for workload classification problem the solution could consist of the following steps:
This class is a greatly very simplified version of the above model. The goal is to provide an example how such class could be implemented and used in Watcher, without adding additional dependencies like machine learning frameworks (which can be quite heavy) or over-complicating it’s internal implementation, which can distract from looking at the overall picture.
That said, this class implements a workload classification “manually” (in plain python code) and is not intended to be used in production.
calculate_score
(features)[source]¶Arbitrary algorithm calculating the score.
It demonstrates how to parse the input data (features) and serialize the results. It detects the workload type based on the metrics and also returns the probabilities of each workload detection (again, the arbitrary values are returned, just for demonstration how the “real” machine learning algorithm could work. For example, the Gradient Boosting Machine from H2O framework is using exactly the same format: http://www.h2o.ai/verticals/algos/gbm/
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.