...
- 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
(file_name)Anchor proficloud.ml.SomReconstructionError.SomReconstructionErrorModel.load proficloud.ml.SomReconstructionError.SomReconstructionErrorModel.load Load model from json file.
Parameters: file_name (str) – Source file name.
Returns: Model instance
Return type:
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
= NoneParameter 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
= NoneData scaling, created during training. Used to scale data to range [0,1].
signal_names
= NoneSignal names
som
= NoneSelf-Organizing Map neural network
summary
()A summary method for the model
Returns: Summary text
Return type: str
threshold
= NoneThreshold 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
= NoneHyperparameter, number of training epochs
training_learning_rate
= NoneHyperparameter, Initial learning rate
training_side_length
= NoneHyperparameter, side length of SOM (x and y are equal)
- static
...