public class Imputer extends Object implements InPlaceTransform
Imputer.NumericImputionMode
enum.Modifier and Type | Class and Description |
---|---|
static class |
Imputer.NumericImputionMode |
Modifier and Type | Field and Description |
---|---|
protected int[] |
cat_imputs
The values to impute for missing numeric columns
|
protected double[] |
numeric_imputs
The values to impute for missing numeric columns
|
Constructor and Description |
---|
Imputer(DataSet<?> data) |
Imputer(DataSet<?> data,
Imputer.NumericImputionMode mode) |
Imputer(Imputer toCopy)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
Imputer |
clone() |
void |
fit(DataSet d)
Fits this transform to the given dataset.
|
void |
mutableTransform(DataPoint dp)
Mutates the given data point.
|
boolean |
mutatesNominal()
By default returns
false . |
DataPoint |
transform(DataPoint dp)
Returns a new data point that is a transformation of the original data
point.
|
protected int[] cat_imputs
protected double[] numeric_imputs
public Imputer(DataSet<?> data)
public Imputer(DataSet<?> data, Imputer.NumericImputionMode mode)
public Imputer(Imputer toCopy)
toCopy
- the object to copypublic void fit(DataSet d)
DataTransform
FailedToFitException
exception may be
thrown.fit
in interface DataTransform
d
- the dataset to fir this transform topublic void mutableTransform(DataPoint dp)
InPlaceTransform
DataTransform.transform(jsat.classifiers.DataPoint)
.mutableTransform
in interface InPlaceTransform
dp
- the data point to alterpublic boolean mutatesNominal()
InPlaceTransform
false
. Only returns true if this transform
will mutableTransform the nominal feature values of a data point.mutatesNominal
in interface InPlaceTransform
true
if nominal feature values are mutated, false
otherwise.public DataPoint transform(DataPoint dp)
DataTransform
transform
in interface DataTransform
dp
- the data point to apply a transformation topublic Imputer clone()
clone
in interface DataTransform
clone
in class Object
Copyright © 2017. All rights reserved.