weka.classifiers.trees.j48Consolidated
public class C45ConsolidatedModelSelection extends weka.classifiers.trees.j48.C45ModelSelection
Modifier and Type | Field and Description |
---|---|
protected weka.classifiers.trees.j48.ModelSelection |
m_toSelectModelToConsolidate
The model selection method to consolidate.
|
private static long |
serialVersionUID
for serialization
|
Constructor and Description |
---|
C45ConsolidatedModelSelection(int minNoObj,
weka.core.Instances allData,
boolean useMDLcorrection,
boolean doNotMakeSplitPointActualValue)
Initializes the split selection method with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
private double |
consolidateSplitPoint(int mostVotedAtt,
int[] attIndexVector,
double[] splitPointVector,
weka.core.Instances data)
Calculates the median of the split points related to 'mostVotedAtt' attribute, if this is numerical
(MAX_VALUE otherwise).
|
weka.classifiers.trees.j48.ClassifierSplitModel |
selectModel(weka.core.Instances data,
weka.core.Instances[] samplesVector)
Selects Consolidated-type split based on C4.5 for the given dataset.
|
private static final long serialVersionUID
protected weka.classifiers.trees.j48.ModelSelection m_toSelectModelToConsolidate
public C45ConsolidatedModelSelection(int minNoObj, weka.core.Instances allData, boolean useMDLcorrection, boolean doNotMakeSplitPointActualValue)
minNoObj
- minimum number of instances that have to occur in at least two
subsets induced by splitallData
- FULL training dataset (necessary for
selection of split points).public weka.classifiers.trees.j48.ClassifierSplitModel selectModel(weka.core.Instances data, weka.core.Instances[] samplesVector) throws java.lang.Exception
data
- the data to train the classifier withsamplesVector
- the vector of samplesjava.lang.Exception
- if something goes wrongprivate final double consolidateSplitPoint(int mostVotedAtt, int[] attIndexVector, double[] splitPointVector, weka.core.Instances data)
mostVotedAtt
- the most voted attribute (index)attIndexVector
- Vector storing the chosen attribute to split in each samplesplitPointVector
- Vector storing the split point to use to split, if numerical, in each sampledata
- the training sample. Only to know if mostVotedAtt is numerical