Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

class proficloud.ml.SomReconstructionError.SomReconstructionErrorModel
Anchor
proficloud.ml.SomReconstructionError.SomReconstructionErrorModel
proficloud.ml.SomReconstructionError.SomReconstructionErrorModel

Bases: proficloud.ml.AbstractModel.AbstractModelClass

Self-Organizing Map model with reconstruction error anomaly detection. https://www.sciencedirect.com/science/article/pii/S221282711830307X

static load
Anchor
proficloud.ml.SomReconstructionError.SomReconstructionErrorModel.load
proficloud.ml.SomReconstructionError.SomReconstructionErrorModel.load
(file_name)

Load model from json file.

Parameters:

file_name (str) – Source file name.

Returns:

Model instance

Return type:

AbstractModelClass

predict(data, n_jobs=None)

This is the method to predict a whole dataset. The data parameter is the dataframe to use. Must be implemented by Model.

Parameters:

data (pandas.DataFrame) – Dataframe to evaluate

Returns:

Returns list with an entry for each row of the dataframe.

Return type:

list

predict_raw = None

Parameter for prediction. if True reconstruction error is returned. If false, output > 0 marks an anomaly.

predict_sample(sample)

This is the method to predict a single sample. The sample parameter is sample to predict. Must be implemented by Model.

Parameters:

sample (pandas.Series / numpy.array) – Single sample to predict

Returns:

Returns prediction for sample

Return type:

any

save(file_name)

Save model to json.

Parameters:

file_name (str) – Target file name.

scaler = None

Data scaling, created during training. Used to scale data to range [0,1].

signal_names = None

Signal names

som = None

Self-Organizing Map neural network

summary()

A summary method for the model

Returns:

Summary text

Return type:

str

threshold = None

Threshold for anomaly detection. Calculated from training data.

train(data)

This is the method to train the model. The data parameter is the dataframe to use. Must be implemented by Model.

Parameters:

data (pandas.DataFrame) – Dataframe to train the model.

Returns:

Does not return. Throw on exception during training.

Return type:

void

training_epochs = None

Hyperparameter, number of training epochs

training_learning_rate = None

Hyperparameter, Initial learning rate

training_side_length = None

Hyperparameter, side length of SOM (x and y are equal)

...