logai.analysis package
Submodules
logai.analysis.anomaly_detector module
- class logai.analysis.anomaly_detector.AnomalyDetectionConfig(algo_name: str = 'one_class_svm', algo_params: object | None = None, custom_params: object | None = None)
Bases:
Config
Config class for AnomalyDetector.
- Parameters:
algo_name – The algorithm name.
algo_params – The algorithm parameters.
custom_params – Additional customized parameters.
- algo_name: str
- algo_params: object
- custom_params: object
- classmethod from_dict(config_dict)
Loads a config from a config dict.
- Parameters:
config_dict – The config parameters in a dict.
- class logai.analysis.anomaly_detector.AnomalyDetector(config: AnomalyDetectionConfig)
Bases:
object
- fit(log_features: DataFrame)
Trains an anomaly detection given the training dataset.
- Parameters:
log_features – The training dataset.
- predict(log_features: DataFrame) DataFrame
Predicts anomalies given the test dataset.
- Parameters:
log_features – The test dataset.
- Returns:
A pandas dataframe containing the prediction results.
logai.analysis.clustering module
- class logai.analysis.clustering.Clustering(config: ClusteringConfig)
Bases:
object
Clustering Application class defines log clustering workflow. It includes which algorithm to use.
- fit(log_features: DataFrame)
Fit method of Clustering algorithm, to train on the given log features data.
- Parameters:
log_features – The training log features data.
- predict(log_features: DataFrame) Series
Predict method of Clustering algorithm, to run inference on given test log features.
- Parameters:
log_features – The test log features data.
- Returns:
The cluster output (label).
- class logai.analysis.clustering.ClusteringConfig(algo_name: str = 'dbscan', algo_params: object | None = None, custom_params: object | None = None)
Bases:
Config
Config class for Clustering algorithms.
- Parameters:
algo_name – The algorithm name.
algo_params – The algorithm parameters.
custom_params – Additional customized parameters.
- algo_name: str
- algo_params: object
- custom_params: object
- classmethod from_dict(config_dict)
Loads a config from a config dict.
- Parameters:
config_dict – The config parameters in a dict.
logai.analysis.nn_anomaly_detector module
- class logai.analysis.nn_anomaly_detector.NNAnomalyDetector(config: AnomalyDetectionConfig)
Bases:
object
- fit(train_data: ForecastNNVectorizedDataset, dev_data: ForecastNNVectorizedDataset)
Trains an anomaly detection given the training and validation datasets.
- Parameters:
train_data – The training dataset.
dev_data – The validation dataset
- predict(test_data: ForecastNNVectorizedDataset)
Predicts anomalies given the test dataset.
- Parameters:
test_data – The test dataset.
- Returns:
A pandas dataframe containing the prediction results.