jBNC Toolbox

jbnc.discretize
Class EntropyDiscretizer

java.lang.Object
  extended byjbnc.discretize.EntropyDiscretizer

public final class EntropyDiscretizer
extends java.lang.Object

Implements entropy based discretisation algotithm by
U.M. Fayyad and K.B Irani "Multi-interval discretizationn of contnous-valued attributes for classification learning", In Proc. Thirtheenth International Joint Conference on Artificial Intelligence, Chambery, France. Morgan Kauffman, pp. 1022-1027, 1993.

Discretization process maps a continuous value into a fixed set of partitions. Partitioning is uniquely described by a set of partition boundaries. A first partition corresponds to interval from negative infinity to first partition point (inclusively). Second partition streaches from first boundary point (exclusively) to second boundary point (inclusively). And so on. Last partition streaches from last boundary point (exclusively) to positive infinity.

This disretization algorithm is intended for discetization of attributes as a preprocessing step for a classification. It requires knowledge of a class for each case (nstance) used to build discretizer. A discretizer is build for each attribute separately.

To create a discretizer use method buildDiscretizer(). To applay the discretizer use method discretize().


Constructor Summary
EntropyDiscretizer()
           
 
Method Summary
 void buildDiscretizer(Case[] cases)
          Performs construction of the discretizer for a set of cases (class + continous attribute pairs).
 int discretize(double v)
          Discretize single continous value.
 double[] getPartitionBoundaries()
          Return array representing partition boundaries.
 java.lang.String[] getPartitionNames()
          Return symbolic names describing discretization partitions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntropyDiscretizer

public EntropyDiscretizer()
Method Detail

buildDiscretizer

public void buildDiscretizer(Case[] cases)
Performs construction of the discretizer for a set of cases (class + continous attribute pairs).

Parameters:
cases - training data for creation of a discretizer.

discretize

public int discretize(double v)
Discretize single continous value. A discretizer must be build before calling this method.

Parameters:
v - value to discretize.
Returns:
label of a discretizer value.

getPartitionBoundaries

public double[] getPartitionBoundaries()
Return array representing partition boundaries. The first partition corresponds to interval from negative infinity to first partition point (inclusively). The second partition streaches from first boundary point (exclusively) to second boundary point (inclusively). And so on. The last partition streaches from last boundary point (exclusively) to positive infinity.

Returns:
Array representing partition boundaries.

getPartitionNames

public java.lang.String[] getPartitionNames()
Return symbolic names describing discretization partitions. Number of partitions is one more than number of partition boundaries.

Returns:
Names describing discretization partitions.
See Also:
getPartitionBoundaries()

SourceForge.net Logo