edu.udo.cs.yale.operator.preprocessing.normalization
Class MinMaxNormalizationModel

java.lang.Object
  extended by edu.udo.cs.yale.operator.AbstractIOObject
      extended by edu.udo.cs.yale.operator.ResultObjectAdapter
          extended by edu.udo.cs.yale.operator.AbstractModel
              extended by edu.udo.cs.yale.operator.IOModel
                  extended by edu.udo.cs.yale.operator.preprocessing.normalization.MinMaxNormalizationModel
All Implemented Interfaces:
IOObject, Model, ResultObject, Saveable

public class MinMaxNormalizationModel
extends IOModel

A simple model which can be used to transform all regular attributes into a value range between the given min and max values.

Version:
$Id: MinMaxNormalizationModel.java,v 1.3 2006/09/30 00:05:31 ingomierswa Exp $
Author:
Ingo Mierswa

Field Summary
private  double max
          The maximum value for each attribute after normalization.
private  double min
          The minimum value for each attribute after normalization.
 
Constructor Summary
MinMaxNormalizationModel()
          Create a new model.
MinMaxNormalizationModel(double min, double max)
          Create a new normalization model.
 
Method Summary
 void apply(ExampleSet exampleSet)
          Performs the transformation.
 java.lang.String getName()
          Returns a nicer name.
 void readData(java.io.ObjectInputStream in)
          Reads the model data from the given stream.
 java.lang.String toString()
          Returns a string representation of this model.
 void writeData(java.io.ObjectOutputStream out)
          Writes the model data into the given stream.
 
Methods inherited from class edu.udo.cs.yale.operator.AbstractModel
equals, getExtension, getFileDescription, readModel, readModel, save, setParameter, writeModel, writeModel
 
Methods inherited from class edu.udo.cs.yale.operator.ResultObjectAdapter
addAction, getActions, getVisualisationComponent, toHTML, toResultString
 
Methods inherited from class edu.udo.cs.yale.operator.AbstractIOObject
copy, read, read, read, write, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.udo.cs.yale.operator.ResultObject
getActions, getVisualisationComponent, toResultString
 
Methods inherited from interface edu.udo.cs.yale.operator.IOObject
copy, write, write
 

Field Detail

min

private double min
The minimum value for each attribute after normalization.


max

private double max
The maximum value for each attribute after normalization.

Constructor Detail

MinMaxNormalizationModel

public MinMaxNormalizationModel()
Create a new model. Necessary for construction via reflection.


MinMaxNormalizationModel

public MinMaxNormalizationModel(double min,
                                double max)
Create a new normalization model.

Method Detail

apply

public void apply(ExampleSet exampleSet)
           throws OperatorException
Performs the transformation.

Throws:
OperatorException


getName

public java.lang.String getName()
Returns a nicer name. Necessary since this model is defined as inner class.

Specified by:
getName in interface ResultObject
Overrides:
getName in class ResultObjectAdapter


toString

public java.lang.String toString()
Returns a string representation of this model.

Overrides:
toString in class java.lang.Object


writeData

public void writeData(java.io.ObjectOutputStream out)
               throws java.io.IOException
Writes the model data into the given stream.

Specified by:
writeData in class AbstractModel
Throws:
java.io.IOException


readData

public void readData(java.io.ObjectInputStream in)
              throws java.io.IOException
Reads the model data from the given stream.

Specified by:
readData in class IOModel
Throws:
java.io.IOException



Copyright © 2001-2006