API Reference

This is the API Reference documentation of the package, including modules, classes and functions.

conmo.experiments

This is the main submodule of the package and it is the responsible of create the intermediary directories of the experiment and take care of creating and executing the configured pipeline.

experiment.Experiment(pipelines, analytics)

experiment.Pipeline(dataset, splitter, ...)

conmo.datasets

The conmo.datasets submodule takes care of downloading the dataset and parsing it to the Conmo’s format.

datasets.dataset.Dataset(name)

Abstract base class for a Dataset.

datasets.dataset.RemoteDataset(url, ...)

Abstract base class for a RemoteDataset (downloadable).

datasets.dataset.LocalDataset(path)

Abstract base class for a LocalDataset (loadable).

datasets.MarsScienceLaboratoryMission(channel)

datasets.SoilMoistureActivePassiveSatellite(channel)

datasets.ServerMachineDataset(subdataset)

datasets.NASATurbofanDegradation(subdataset)

datasets.BatteriesDataset(path, chemistry, ...)

This is a dataset obtained from measurements of certain types of degradation of three types of batteries. Since it belongs to the local datasets, to launch any experiment with it, it must be stored on disk with the following directory structure: - DTW-Li-ion-Diagnosis - data : Data and labels for the three types of batteries are stored here. - mat: - LFP: - diagnosis: - V.mat - test: - V_references.mat - x_test_0.mat - x_test_1.mat - x_test_2.mat - x_test_3.mat - y_test.mat - NCA: - diagnosis - test - NMC: - The same as NCA and LFP - Q.mat.

conmo.splitters

Once the dataset has been loaded, it is necessary to separate the training and test parts. The conmo.splitters submodule permits generate new splitters or use predefined ones from the Scikit-Learn library.

splitters.splitter.Splitter()

splitters.SklearnSplitter(splitter[, groups])

conmo.preprocesses

The aim of the conmo.preprocesses submodule is to apply a series of transformations to the data set before it is used as input to the algorithms. Several types of preprocesses implemented are usually used in time series anomaly detection problems.

preprocesses.preprocess.Preprocess()

Abstract base class for a Preprocess.

preprocesses.preprocess.ExtendedPreprocess(...)

Specific class to implement preprocessing which consists of applying certain transformations on some columns of the dataset.

preprocesses.Binarizer(to_data, to_labels, ...)

preprocesses.CustomPreprocess(fn)

Core class used to implement self-created preprocess.

preprocesses.RULImputation(threshold)

preprocesses.SavitzkyGolayFilter(to_data, ...)

preprocesses.SklearnPreprocess(to_data, ...)

Class used to wrap existing preprocess in the Scikit-Learn library.

conmo.algorithms

The conmo.algorithms submodule contains everything related to algorithms in Conmo, from abstract classes to introduce new algorithms in Conmo to implementations of some of the algorithms used in the example experiments.

algorithms.algorithm.Algorithm()

algorithms.algorithm.AnomalyDetectionThresholdBasedAlgorithm(...)

algorithms.algorithm.AnomalyDetectionClassBasedAlgorithm()

algorithms.PCAMahalanobis([n_components, ...])

algorithms.OneClassSVM([kernel, degree, ...])

algorithms.KerasAutoencoder([encoding_dim, ...])

algorithms.PretrainedRandomForest(pretrained)

algorithms.PretrainedMultilayerPerceptron(...)

algorithms.PretrainedCNN1D(pretrained, input_len)

conmo.metrics

The conmo.metrics submodule contains everything necessary to add new ways of measuring the effectiveness of the implemented algorithms. Accuracy and RMSPE are currently implemented.

metrics.metric.Metric()

metrics.Accuracy([normalize])

metrics.RMSPE([normalize])