src.utils.ftransf.percentile_selector

Classes

PercentileSelector(**kwargs)

class src.utils.ftransf.percentile_selector.PercentileSelector(**kwargs)
Author:

Alberto M. Esmoris Pena

Class for transforming features by preserving only a given percentile of the highest scores for a particular task.

Variables:
  • percentile (int) – The percentage of features that must be selected given as an integer in [0, 100].

  • scoref (callable) – The score function f(F, y) to evaluate the features F to predict the values of y.

  • score_name (path) – The name of the score used for the evaluations.

  • sp – The internal percentile selection model.

static extract_ftransf_args(spec)

Extract the arguments to initialize/instantiate a PercentileSelector.

Parameters:

spec – The key-word specification containing the arguments.

Returns:

The arguments to initialize/instantiate a PercentileSelector.

__init__(**kwargs)

Initialize/instantiate a PercentileSelector.

Parameters:

kwargs – The attributes for the PercentileSelector.

transform(F, y=None, fnames=None, out_prefix=None)

The fundamental feature transform logic defining the percentile selector.

See FeatureTransformer and feature_transformer.FeatureTransformer.transform().