public class UnderSamplingByMaskingPreProcessor extends BaseUnderSamplingPreProcessor implements DataSetPreProcessor
ONLY masks belonging to the majority class are modified If a tbptt segment contains only majority class labels all time steps in that segment are masked. Can be overriden with donotMaskMinorityWindows() in which case 1 - target distribution % of time steps are masked
tbpttWindowSize
Constructor and Description |
---|
UnderSamplingByMaskingPreProcessor(double targetDist,
int windowSize)
The target distribution to approximate.
|
Modifier and Type | Method and Description |
---|---|
void |
overrideMinorityDefault()
Will change the default minority label from "1" to "0" and correspondingly the majority class from "0" to "1"
|
void |
preProcess(DataSet toPreProcess)
Pre process a dataset
|
adjustMasks, donotMaskAllMajorityWindows, donotMaskMinorityWindows
public UnderSamplingByMaskingPreProcessor(double targetDist, int windowSize)
targetDist
- windowSize
- Usually set to the size of the tbpttpublic void overrideMinorityDefault()
public void preProcess(DataSet toPreProcess)
DataSetPreProcessor
preProcess
in interface DataSetPreProcessor
toPreProcess
- the data set to pre processCopyright © 2017. All rights reserved.