public class GiniFunction extends SplitFunction
Constructor and Description |
---|
GiniFunction(int numOfFeatures,
Random random)
Constructs a Gini function (initialize it)
|
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(Instance instance)
Evaluate a single instance based on the current
state of the split function
|
void |
init(Instances data,
ArrayList<Integer> indices)
Create split function based on Gini coefficient
|
SplitFunction |
newInstance() |
public GiniFunction(int numOfFeatures, Random random)
numOfFeatures
- number of features to userandom
- random number generatorpublic void init(Instances data, ArrayList<Integer> indices)
init
in class SplitFunction
data
- original dataindices
- indices of the samples to usepublic boolean evaluate(Instance instance)
evaluate
in class SplitFunction
instance
- sample to evaluatepublic SplitFunction newInstance()
newInstance
in class SplitFunction
Copyright © 2015–2021 Fiji. All rights reserved.