Class UnderSamplingByMaskingMultiDataSetPreProcessor
- java.lang.Object
-
- org.nd4j.linalg.dataset.api.preprocessor.classimbalance.BaseUnderSamplingPreProcessor
-
- org.nd4j.linalg.dataset.api.preprocessor.classimbalance.UnderSamplingByMaskingMultiDataSetPreProcessor
-
- All Implemented Interfaces:
MultiDataSetPreProcessor
public class UnderSamplingByMaskingMultiDataSetPreProcessor extends BaseUnderSamplingPreProcessor implements MultiDataSetPreProcessor
-
-
Field Summary
-
Fields inherited from class org.nd4j.linalg.dataset.api.preprocessor.classimbalance.BaseUnderSamplingPreProcessor
tbpttWindowSize
-
-
Constructor Summary
Constructors Constructor Description UnderSamplingByMaskingMultiDataSetPreProcessor(Map<Integer,Double> targetDist, int windowSize)
The target distribution to approximate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
overrideMinorityDefault(int index)
Will change the default minority label from "1" to "0" and correspondingly the majority class from "0" to "1" for the label at the index specifiedvoid
preProcess(MultiDataSet multiDataSet)
Preprocess the MultiDataSet-
Methods inherited from class org.nd4j.linalg.dataset.api.preprocessor.classimbalance.BaseUnderSamplingPreProcessor
adjustMasks, donotMaskAllMajorityWindows, donotMaskMinorityWindows
-
-
-
-
Constructor Detail
-
UnderSamplingByMaskingMultiDataSetPreProcessor
public UnderSamplingByMaskingMultiDataSetPreProcessor(Map<Integer,Double> targetDist, int windowSize)
The target distribution to approximate. Valid values are between (0,0.5].- Parameters:
targetDist
- Key is index of label in multidataset to apply preprocessor. Value is the target dist for that index.windowSize
- Usually set to the size of the tbptt
-
-
Method Detail
-
overrideMinorityDefault
public void overrideMinorityDefault(int index)
Will change the default minority label from "1" to "0" and correspondingly the majority class from "0" to "1" for the label at the index specified
-
preProcess
public void preProcess(MultiDataSet multiDataSet)
Description copied from interface:MultiDataSetPreProcessor
Preprocess the MultiDataSet- Specified by:
preProcess
in interfaceMultiDataSetPreProcessor
-
-