Missing Data Imputer#

In the real world, it is common to have data with missing values here and there. The Missing Data Imputer replaces missing value placeholder values with a guess based on a given guessing Strategy.

Interfaces: Transformer, Stateful

Data Type Compatibility: Categorical, Continuous


# Param Default Type Description
1 placeholder '?' string or numeric The placeholder value that denotes a missing value.
2 continuous strategy Mean object The guessing strategy to employ for continuous feature columns.
3 categorical strategy K Most Frequent object The guessing strategy to employ for categorical feature columns.

Additional Methods#

This transformer does not have any additional methods.


use Rubix\ML\Transformers\MissingDataImputer;
use Rubix\ML\Other\Strategies\Percentile;
use Rubix\ML\Other\Strategies\Prior;

$transformer = new MissingDataImputer('?', new Percentile(0.61), new Prior());