Skip to content

Improve SelectByTargetMeanPerformance functionality #296

Description

@solegalli

Idea:

Create predictor class TargetMeanPrediction or similar name with methods fit and predict.

  • Fit - learns transformation
  • predict - returns the mean target value per observation

Output:

  • This transformer will automatically output the mean value of the target per category if variable is categorical (we have an encoder for this).
  • If variable is numerical, it will first discretize it (we have discretizers for this, equal width and frequency, user selects) and then replace by the target mean.

The reason to create a predictor class is that then, we can use it with cross_validate and cross_val_score, in the main selector function.

Things to consider:

Then we need to re-code the class SelectByTargetMeanPerformance to call our predictor, and use it with cross-validate to return the important features. The advantage of using corss_validate is not just the cross_validation, which offers a less biased score, but it also allows the use of other metrics, not just roc and r2 as what we have at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priorityneed to be looked at next

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions