-
Notifications
You must be signed in to change notification settings - Fork 3
Noise Corruptions
Isabel edited this page May 12, 2023
·
15 revisions
| Parameters: | |
|---|---|
|
X_train: ndarray, dataframe or sparse matrix of shape (n_samples, n_features) The training input samples. Will be transformed to dataframe object (if it is not alredy) with column names from column_names property, or index values as names. Can contain the taget values if label_name is specified. |
|
|
y_train: ndarray, dataframe or sparse of shape (n_samples,) or (n_samples, n_outputs), deafult=None The training target values, labels in classification, real numbers in regression. Required if label_name is None and if it is not included in X_train as a feature. |
|
|
X_test: ndarray, dataframe or sparse matrix of shape (n_samples, n_features) The testing input samples. n_features must be equal for X_train and X_test, and in the same order. Will use column_names as specified in the column_names property, or indexes. Can contain the taget values if label_name is specified. |
|
|
y_test: ndarray, dataframe or sparse of shape (n_samples,) or (n_samples, n_outputs), deafult=None** The testing target values. Required if label_name is None and if it is not included in X_test as a feature. |
|
|
model: object An object which manages the estimation and decoding of a model. Must either provide a fit and predict method, or these will have to be specified in custom_train and custom_predict. |
|
|
score_func: str or callable. Scoring method as string, use sklearn.metrics.get_scorer_names to find available scorers. If callable score function (or loss function) required signature is either score_func(y_pred, y_true) or (model, y_pred, y_true). |
|
|
corruption_list: dict or list of dicts Dict of noise corruptions to be performed. The key is a string (or list of strings) corresponding to featuer name or index. Values are list of noise method and levels (where applicable). Pass a list of dicts to perform several noise corruptions. See <insert link to examples> for examples. |
|
|
column_names: list, deafult=None List of column names for input samples. Values deafults to index values if None. Not required if X_train is a dataframe with column names. |
|
|
label_name: str or int, deafult=None Column name or column index corresponding to the target values. Required if y_train or y_test are None. |
|
|
feature_importance_measure: {None, "eli5", "lime", "shap"}, deafult=None If None deafult is either coef_ or feature_importances_ attributes where applicable, or <link>permutation importance. Not available for models that use custom fit or predict methods. See further explanation of the other methods <link>here. |
|
|
random_state: int, RandomState instance or None, deafult=None Controls randomness in sampling and noise addition. Note: models with aspects of randomness in training or predicting are not affected by this property, and must be set on model initialization. |
|
|
plot: bool, deafult=True Determines wheter plots of feature importances, variance and score are shown. |
|
|
custom_train: callable, defult=None Callable with signature train_func(model, X, y). Must return trained model object. Not required if model object has fit method with signature fit(X, y). |
|
|
custom_predict: callable, deafult=None Callable with signature predict_func(model, X). Must return list, ndarray, tensor, or dataframe of same length as X. Not required if model object has predict method with signature predict(X). |
|
| Returns: | |
|
result: <link>Bunch or dict of such instances Dictionary-like object, with the following attributes: att1: typed ex att2: typed ex att3: typed ex |