skclean.detectors.InstanceHardness

class skclean.detectors.InstanceHardness(classifiers=None, cv=None, n_jobs=1, random_state=None)

A set of classifiers are used to predict labels of each sample using cross-validation. conf_score of a sample is percentage classifiers that correctly predict it’s label. See [SMGC14] for details.

Parameters
  • classifiers (list, default=None) – Classifiers used to predict sample labels. If None, four classifiers are used: GaussianNB, DecisionTreeClassifier, KNeighborsClassifier and LogisticRegression.

  • cv (int, cross-validation generator or an iterable, default=None) – If None, uses 5-fold stratified k-fold if int, no of folds to use in stratified k-fold

  • n_jobs (int, default=1) – No of parallel cpu cores to use

  • random_state (int, default=None) – Set this value for reproducibility

Methods

__init__([classifiers, cv, n_jobs, random_state])

Initialize self.

detect(X, y)

fit_transform(X[, y])

Fit to data, then transform it.

get_params([deep])

Get parameters for this estimator.

set_params(**params)

Set the parameters of this estimator.

transform(X)

Attributes

DEFAULT_CLFS