public class MVD extends Discretizer
This class implements the UCPD algorithm
Modifier and Type | Field and Description |
---|---|
protected int |
max
Maximum value.
|
protected int |
min
Minimum value.
|
protected int |
numBasicIntervals
Number of basic intervals.
|
classOfInstances, cutPoints, iClassIndex, realAttributes, realValues
Constructor and Description |
---|
MVD(InstanceSet _is,
int _numBasicIntervals,
double _alpha)
Constructor of the class
|
Modifier and Type | Method and Description |
---|---|
double |
chiSquare(int[][] contingencyTable)
Obtains the Chi square value of this node using the contigency table
|
protected void |
computeMaximumAndMinimumSupport(int[][] contingencyTable)
Finds the maximum and minimum supports of all groups
|
void |
discretizeAllAttributes()
Computes the cutpoints for each continuous variable
|
protected java.util.Vector |
discretizeAttribute(int attribute,
int[] values,
int begin,
int end)
Returns a vector with the discretized values
|
protected double |
expectedValue(int[][] contingencyTable,
int i,
int j)
Computes the expected value from the contingency table of this node
|
int |
maximumSupportDifference(int[][] contingencyTable)
Gets the maximum support difference
|
applyDiscretization, buildCutPoints, discretize, getCutPoint, getNumIntervals, sortValues
protected int numBasicIntervals
protected int min
protected int max
public MVD(InstanceSet _is, int _numBasicIntervals, double _alpha)
Constructor of the class
_is
- set of instances._numBasicIntervals
- number of basic intervals._alpha
- alpha parameter.protected java.util.Vector discretizeAttribute(int attribute, int[] values, int begin, int end)
Returns a vector with the discretized values
discretizeAttribute
in class Discretizer
attribute
- index of the attribute to discretizevalues
- not usedbegin
- not usedend
- not usedpublic void discretizeAllAttributes()
Computes the cutpoints for each continuous variable
protected double expectedValue(int[][] contingencyTable, int i, int j)
contingencyTable
- given contingency table.i
- the index of the rowj
- the index of the columnpublic double chiSquare(int[][] contingencyTable)
contingencyTable
- given contigency tablepublic int maximumSupportDifference(int[][] contingencyTable)
contingencyTable
- given contigency tableprotected void computeMaximumAndMinimumSupport(int[][] contingencyTable)
contingencyTable
- given contigency table