public class GiniImpurityMeasureCalculator extends ImpurityMeasureCalculator<GiniImpurityMeasure>
useIdx
Constructor and Description |
---|
GiniImpurityMeasureCalculator(Map<Double,Integer> lbEncoder,
boolean useIdx)
Constructs a new instance of Gini impurity measure calculator.
|
Modifier and Type | Method and Description |
---|---|
StepFunction<GiniImpurityMeasure>[] |
calculate(DecisionTreeData data,
TreeFilter filter,
int depth)
Calculates all impurity measures required required to find a best split and returns them as an array of
StepFunction (for every column). |
columnsCount, getFeatureValue, getFeatureValues, getLabelValue, rowsCount
public GiniImpurityMeasureCalculator(Map<Double,Integer> lbEncoder, boolean useIdx)
lbEncoder
- Label encoder which defines integer value for every label class.useIdx
- Use index while calculate.public StepFunction<GiniImpurityMeasure>[] calculate(DecisionTreeData data, TreeFilter filter, int depth)
StepFunction
(for every column).calculate
in class ImpurityMeasureCalculator<GiniImpurityMeasure>
data
- Features and labels.StepFunction
(for every column).
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024