Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
You can write your own model using Python
Imagine you have a model of a specific device where you know some insights about it`s work. Lets say you monitor a solar panel. You know that the generation of energy at a specific moment depends on the sun. You have a model of sun shining. And you have noise and clouds. Lets make a pattern where you detect anomaly behavior.
We assume that you use Grafana for monitoring. We suggest to install https://github.com/CorpGlory/grafana-data-exporter for extracting data from dashboards.
And lets use Jupyter for designing your model.
Custom Model Class
First of all download analyzed dataset on jupyter and turn to it in notebook.
Add needed libs and modules from hastic analytics.
So, now you have CustomModel class, which has two main methods: fit and predict. Segments are passed to the method
fit, in which you can process labeled patterns, extract the necessary information and use it for prediction. The method
predictis used to analyze the whole dataset. Using the parameters and data of the first method, you can evaluate your time series, for example, look for anomalies, similar patterns or predict next values.
Select segments in any way you like. For example:
- Use the CustomModel and its methods to get the result!