be.ac.ulb.mlg.utils
Class UniformDiscretizer

java.lang.Object
  extended by be.ac.ulb.mlg.utils.UniformDiscretizer
All Implemented Interfaces:
Discretizer

public class UniformDiscretizer
extends java.lang.Object
implements Discretizer

The UniformDiscretizer


Nested Class Summary
static class UniformDiscretizer.Mode
           
 
Constructor Summary
UniformDiscretizer(UniformDiscretizer.Mode mode, int range)
          Constructor of UniformDiscretizer which setup the mode and the range of discretization
 
Method Summary
 double[][] discretize(double[][] matrix)
          Transform value of a double matrix to integer but preserve the structure (double matrix)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniformDiscretizer

public UniformDiscretizer(UniformDiscretizer.Mode mode,
                          int range)
Constructor of UniformDiscretizer which setup the mode and the range of discretization

Parameters:
mode - The mode of discretization column/row wise or by using the whole matrix
range - The number of value between min/max values of each row/column
Method Detail

discretize

public double[][] discretize(double[][] matrix)
Description copied from interface: Discretizer
Transform value of a double matrix to integer but preserve the structure (double matrix)

Specified by:
discretize in interface Discretizer
Parameters:
matrix - The input matrix to be normalized
Returns:
The normalized matrix