|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.generator.FeatureGenerator
edu.udo.cs.yale.generator.SingularNumericalGenerator
edu.udo.cs.yale.generator.NormalizationGenerator
public class NormalizationGenerator
Creates the normalized value of all input attributes, i.e. calculates
(value - min) / (max - min) for normalization between 0 and 1 and (value -
min) / (max - min) * (MAX - MIN) + MIN for normalization between MIN and MAX.
| Field Summary | |
|---|---|
static java.lang.String |
FUNCTION_NAME
|
private double |
max
|
private double |
min
|
| Fields inherited from class edu.udo.cs.yale.generator.FeatureGenerator |
|---|
resultAttributes, SELECTION_MODE_ALL, SELECTION_MODE_RESTRICTIVE |
| Constructor Summary | |
|---|---|
NormalizationGenerator()
Creates a new normalization generator. |
|
NormalizationGenerator(double min,
double max)
Creates a new normalization operator which normalizes the values between min and max. |
|
| Method Summary | |
|---|---|
double |
calculateValue(double value)
Subclasses have to implement this method to calculate the function result. |
void |
generate(DataRow data)
Generates the new attribute values for the example e and returns the new attribute values as doubles. |
java.lang.String |
getFunction()
Sets the function name. |
FeatureGenerator |
newInstance()
Subclasses must implement this method so that a new instance of this generator class is returned. |
void |
setFunction(java.lang.String name)
Sets the function name. |
| Methods inherited from class edu.udo.cs.yale.generator.SingularNumericalGenerator |
|---|
getInputAttributes, getInputCandidates, getOutputAttributes, toString |
| Methods inherited from class edu.udo.cs.yale.generator.FeatureGenerator |
|---|
argumentsSet, checkCompatibility, createGeneratorForFunction, equals, generateAll, getArgument, getExampleTable, getSelectionMode, selectGenerator, setArguments, setExampleTable, setSelectionMode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FUNCTION_NAME
private double min
private double max
| Constructor Detail |
|---|
public NormalizationGenerator()
public NormalizationGenerator(double min,
double max)
| Method Detail |
|---|
public FeatureGenerator newInstance()
FeatureGenerator
newInstance in class FeatureGeneratorpublic double calculateValue(double value)
SingularNumericalGenerator
calculateValue in class SingularNumericalGenerator
public void generate(DataRow data)
throws GenerationException
FeatureGenerator
generate in class SingularNumericalGeneratorGenerationExceptionpublic void setFunction(java.lang.String name)
FeatureGenerator
setFunction in class FeatureGeneratorpublic java.lang.String getFunction()
FeatureGenerator
getFunction in class FeatureGenerator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||