You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is to track the development of the new Orion class.
The Orion class is responsible for handling the MLBlocks Pipelines that provide the central anomaly detection functionality in Orion.
Overall, the Orion class:
Provides simple user-facing abstractions
fit/detect
save/load
evaluate
Hides away the interaction with other systems
MLBlocks Pipelines
Pipeline Selection and Tuning (future?)
This should be the class public interface:
classOrion:
def__init__(self,
pipeline: Union[str, dict, MLPipeline] =DEFAULT_PIPELINE,
hyperparameters: dict=None):
passdeffit(self, data: DataFrame):
"""Fit the pipeline to the given data. Args: data (DataFrame): Input data, passed as a ``pandas.DataFrame`` containing exactly two columns: timestamp and value. """passdefdetect(self, data: DataFrame,
visualization: bool=True) ->DataFrame:
"""Detect anomalies in the given data.. If ``visualization=True``, also return the visualization outputs from the MLPipeline object. Args: data (DataFrame): Input data, passed as a ``pandas.DataFrame`` containing exactly two columns: timestamp and value. visualization (bool): If ``True``, also capture the ``visualization`` named output from the ``MLPipeline`` and return it as a second output. Returns: DataFrame or tuple: If visualization is ``False``, it returns the events DataFrame. If visualization is ``True``, it returns a tuple containing the events DataFrame followed by the visualization outputs dict. """passdeffit_detect(self, data):
"""Fit the pipeline to pipeline and detect anomalies. This method is functionally equivalent to calling `fit(data)` and later on `detect(data)` but with the difference that here the `MLPipeline` is called only once, using its `fit` method, and the output is directly captured without having to execute the whole pipeline again during the `predict` phase. If ``visualization=True``, also return the visualization outputs from the MLPipeline object. Args: data (DataFrame): Input data, passed as a ``pandas.DataFrame`` containing exactly two columns: timestamp and value. visualization (bool): If ``True``, also capture the ``visualization`` named output from the ``MLPipeline`` and return it as a second output. Returns: DataFrame or tuple: If visualization is ``False``, it returns the events DataFrame. If visualization is ``True``, it returns a tuple containing the events DataFrame followed by the visualization outputs dict. """passdefsave(self, path):
"""Save this object using pickle. Args: path (str): Path to the file where the serialization of this object will be stored. """pass@classmethoddefload(cls, path) ->Orion:
"""Load an Orion instance from a pickle file. Args: path (str): Path to the file where the instance has been previously serialized. """passdefevaluate(cls, data: DataFrame, truth: DataFrame,
metrics: List[str] =DEFAULT_METRICS) ->Series:
"""Evaluate the performance against a ground truth. Args: data (DataFrame): Input data, passed as a ``pandas.DataFrame`` containing exactly two columns: timestamp and value. truth (DataFrame): Ground truth passed as a ``pandas.DataFrame`` containing two columns: start and stop. metrics (list): List of metrics to used passed as a list of strings. If not given, it defaults to all the Orion metrics. Returns: Series: ``pandas.Series`` containing one element for each metric applied, with the metric name as index. """pass
The text was updated successfully, but these errors were encountered:
This issue is to track the development of the new Orion class.
The Orion class is responsible for handling the MLBlocks Pipelines that provide the central anomaly detection functionality in Orion.
Overall, the Orion class:
This should be the class public interface:
The text was updated successfully, but these errors were encountered: