aakr package¶
Module contents¶
-
class
aakr.
AAKR
(metric='euclidean', bw=1.0, modified=False, penalty=None, n_jobs=- 1)[source]¶ Bases:
sklearn.base.TransformerMixin
,sklearn.base.BaseEstimator
Auto Associative Kernel Regression.
- Parameters
metric (str, default='euclidean') – Metric for calculating kernel distances, see available metrics from sklearn.metrics.pairwise_distances.
bw (float, default=1.0) – Gaussian Radial Basis Function (RBF) bandwith parameter.
modified (bool, default=False) – Whether to use the modified version of AAKR (see reference [2]). The modified version reduces the contribution provided by those signals which are expected to be subject to the abnormal conditions.
penalty (array-like or list of shape (n_features, 1) or None, default=None) – Penalty vector for the modified AAKR - only used when parameter modified=True. If modified AAKR used and penalty=None, penalty vector is automatically determined.
n_jobs (int, default=-1) – The number of jobs to run in parallel.
-
X_
¶ Historical normal condition examples given as an array.
- Type
ndarray of shape (n_samples, n_features)
References
- 1
Chevalier R., Provost D., and Seraoui R., 2009, “Assessment of Statistical and Classification Models For Monitoring EDF’s Assets”, Sixth American Nuclear Society International Topical Meeting on Nuclear Plant Instrumentation.
- 2
Baraldi P., Di Maio F., Turati P., Zio E., 2014, “A modified Auto Associative Kernel Regression method for robust signal reconstruction in nuclear power plant components”, European Safety and Reliability Conference ESREL.
Methods
fit
(X[, y])Fit normal condition examples.
fit_transform
(X[, y])Fit to data, then transform it.
get_params
([deep])Get parameters for this estimator.
partial_fit
(X[, y])Fit more normal condition examples.
set_params
(**params)Set the parameters of this estimator.
transform
(X)Transform given array into expected values in normal conditions.
-
fit
(X, y=None)[source]¶ Fit normal condition examples.
- Parameters
X (array-like of shape (n_samples, n_features)) – Training examples from normal conditions.
y (None) – Not required, exists only for compability purposes.
- Returns
self – Returns self.
- Return type
object
-
fit_transform
(X, y=None, **fit_params)¶ Fit to data, then transform it.
Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.
- Parameters
X (array-like of shape (n_samples, n_features)) – Input samples.
y (array-like of shape (n_samples,) or (n_samples, n_outputs), default=None) – Target values (None for unsupervised transformations).
**fit_params (dict) – Additional fit parameters.
- Returns
X_new – Transformed array.
- Return type
ndarray array of shape (n_samples, n_features_new)
-
get_params
(deep=True)¶ Get parameters for this estimator.
- Parameters
deep (bool, default=True) – If True, will return the parameters for this estimator and contained subobjects that are estimators.
- Returns
params – Parameter names mapped to their values.
- Return type
dict
-
partial_fit
(X, y=None)[source]¶ Fit more normal condition examples.
- Parameters
X (array-like of shape (n_samples, n_features)) – Training examples from normal conditions.
y (None) – Not required, exists only for compability purposes.
- Returns
self – Returns self.
- Return type
object
-
set_params
(**params)¶ Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as
Pipeline
). The latter have parameters of the form<component>__<parameter>
so that it’s possible to update each component of a nested object.- Parameters
**params (dict) – Estimator parameters.
- Returns
self – Estimator instance.
- Return type
estimator instance
-
transform
(X)[source]¶ Transform given array into expected values in normal conditions.
- Parameters
X (array-like of shape (n_samples, n_features)) – The input samples.
- Returns
X_nc – Expected values in normal conditions for each sample and feature.
- Return type
ndarray of shape (n_samples, n_features)