DiscreteEstimatorSmoother

class scikit_weak.utils.DiscreteEstimatorSmoother(estimator, type='set', epsilon=1.0)

A class to transform a supervised learning problem into a weakly supervised one, based on the output of a classifier. It currently supports transformation to superset and fuzzy label learning. Note that DiscreteEstimatorSmoother does not implement the transform method: therefore, usage should be based on calling fit_transform.

Parameters
  • estimator (estimator class) – Base estimator objects to be fitted. Should support predict_proba

  • type – Type of weakly supervised labels to transform into

  • epsilon (float, default=1.0) – Parameter to select the minimum allowed label degree. Only used when type == ‘set’. Should be between 0 and 1

Variables

n_classes (int) – The number of unique classes in y

fit_transform(X, y)

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Xarray-like of shape (n_samples, n_features)

Input samples.

yarray-like of shape (n_samples,) or (n_samples, n_outputs), default=None

Target values (None for unsupervised transformations).

**fit_paramsdict

Additional fit parameters.

X_newndarray array of shape (n_samples, n_features_new)

Transformed array.