logai.algorithms package

Subpackages

Submodules

logai.algorithms.algo_interfaces module

class logai.algorithms.algo_interfaces.AnomalyDetectionAlgo

Bases: ABC

Interface for clustering algorithms

abstract fit(log_features: DataFrame)
abstract predict(log_features: DataFrame) Series
class logai.algorithms.algo_interfaces.CategoricalEncodingAlgo

Bases: ABC

Interface for categorical encoders

abstract fit_transform(log_attributes: DataFrame) DataFrame
class logai.algorithms.algo_interfaces.ClusteringAlgo

Bases: ABC

Interface for clustering algorithms

abstract fit(log_features: DataFrame)
abstract predict(log_features: DataFrame)
class logai.algorithms.algo_interfaces.FeatureExtractionAlgo

Bases: ABC

Interface for feature extraction algorithms

abstract extract()
class logai.algorithms.algo_interfaces.NNAnomalyDetectionAlgo

Bases: ABC

abstract fit(train_data, dev_data: LogRecordObject)
abstract predict(test_data: LogRecordObject)
class logai.algorithms.algo_interfaces.ParsingAlgo

Bases: ABC

Interface for parsing algorithms.

abstract fit(loglines: Series)

fit parsing algorithm with input

Parameters:

loglines – pd.Series of loglines as input

Returns:

pd.Dataframe

abstract parse(loglines: Series) DataFrame

parse loglines :param loglines: pd.Series of loglines to parse :return: pd.Dataframe of parsed results [“loglines”, “parsed_loglines”, “parameter_list”].

class logai.algorithms.algo_interfaces.VectorizationAlgo

Bases: ABC

Interface for logline vectorization algorithms

abstract fit(loglines: Series)

fit vectorizor with input. :param loglines: :return:

abstract transform(loglines: Series) DataFrame

transform given loglines into vectors. :param loglines: :return:

logai.algorithms.factory module

class logai.algorithms.factory.AlgorithmFactory

Bases: object

The singleton factory class for all the supported algorithms.

get_algorithm(task, name, config)

Gets a algorithm instance given an algorithm name and a config instance.

Parameters:
  • task – The task name.

  • name – The algorithm name.

  • config – The config instance.

get_algorithm_class(task, name)

Gets the corresponding algorithm class given an algorithm name.

Parameters:
  • task – The task name.

  • name – The algorithm name.

get_config(task, name, config_dict)

Gets a configuration instance given an algorithm name and a config dict.

Parameters:
  • task – The task name.

  • name – The algorithm name.

  • config_dict – The config dictionary.

get_config_class(task, name)

Gets the corresponding configuration class given an algorithm name.

Parameters:
  • task – The task name.

  • name – The algorithm name.

instance = <logai.algorithms.factory.AlgorithmFactory object>
classmethod register(task, name, config_class)

Registers the algorithm name and the configuration class for an algorithm class.

Parameters:
  • task – The task name, e.g., detection, clustering

  • name – The algorithm name(s).

  • config_class – The configuration class.

classmethod unregister(task, name)

Unregisters a registered algorithm.

Parameters:
  • task – The task name.

  • name – The algorithm name.

Module contents