org.encog.util.arrayutil
public class NormalizedField extends Object implements Serializable
Constructor and Description |
---|
NormalizedField()
Construct the object with a range of 1 and -1.
|
NormalizedField(double theNormalizedHigh,
double theNormalizedLow)
Construct the object.
|
NormalizedField(NormalizationAction theAction,
String theName)
Construct an object.
|
NormalizedField(NormalizationAction theAction,
String theName,
double ahigh,
double alow,
double nhigh,
double nlow)
Construct the field, with no defaults.
|
NormalizedField(String theName,
NormalizationAction theAction,
double high,
double low)
Construct the object.
|
Modifier and Type | Method and Description |
---|---|
void |
analyze(double d)
Analyze the specified value.
|
double |
deNormalize(double value)
Denormalize the specified value.
|
ClassItem |
determineClass(double[] data)
Determine what class the specified data belongs to.
|
String |
encodeHeaders()
Encode the headers used by this field.
|
String |
encodeSingleField(int classNumber)
Encode a single field.
|
void |
fixSingleValue()
Fix normalized fields that have a single value for the min/max.
|
NormalizationAction |
getAction() |
double |
getActualHigh() |
double |
getActualLow() |
List<ClassItem> |
getClasses() |
int |
getColumnsNeeded() |
Equilateral |
getEq() |
String |
getName() |
double |
getNormalizedHigh() |
double |
getNormalizedLow() |
void |
init()
Init any internal structures.
|
boolean |
isClassify() |
int |
lookup(String str)
Lookup the specified field.
|
void |
makeClass(NormalizationAction theAction,
int classFrom,
int classTo,
int high,
int low)
Make a field to hold a class.
|
void |
makeClass(NormalizationAction theAction,
String[] cls,
double high,
double low)
Create a field that will be used to hold a class.
|
void |
makePassThrough()
Make this a pass-through field.
|
double |
normalize(double value)
Normalize the specified value.
|
void |
setAction(NormalizationAction theAction)
Set the action for the field.
|
void |
setActualHigh(double theActualHigh)
Set the actual high for the field.
|
void |
setActualLow(double theActualLow)
Set the actual low for the field.
|
void |
setName(String theName)
Set the name of the field.
|
void |
setNormalizedHigh(double theNormalizedHigh)
Set the normalized high for the field.
|
void |
setNormalizedLow(double theNormalizedLow)
Set the normalized low for the field.
|
String |
toString() |
public NormalizedField()
public NormalizedField(double theNormalizedHigh, double theNormalizedLow)
theNormalizedHigh
- The normalized high.theNormalizedLow
- The normalized low.public NormalizedField(NormalizationAction theAction, String theName)
theAction
- The desired action.theName
- The name of this column.public NormalizedField(NormalizationAction theAction, String theName, double ahigh, double alow, double nhigh, double nlow)
theAction
- The normalization action to take.theName
- The name of this field.ahigh
- The actual high.alow
- The actual low.nhigh
- The normalized high.nlow
- The normalized low.public NormalizedField(String theName, NormalizationAction theAction, double high, double low)
theName
- The name of the field.theAction
- The action of the field.high
- The high end of the range for the field.low
- The low end of the range for the field.public final void analyze(double d)
d
- The value to analyze.public final double deNormalize(double value)
value
- The value to normalize.public final ClassItem determineClass(double[] data)
data
- The data to analyze.public final String encodeHeaders()
public final String encodeSingleField(int classNumber)
classNumber
- The class number to encode.public final void fixSingleValue()
public final NormalizationAction getAction()
public final double getActualHigh()
public final double getActualLow()
public final int getColumnsNeeded()
public final Equilateral getEq()
public final String getName()
public final double getNormalizedHigh()
public final double getNormalizedLow()
public final void init()
public final boolean isClassify()
public final int lookup(String str)
str
- The name of the field to lookup.public final void makeClass(NormalizationAction theAction, int classFrom, int classTo, int high, int low)
theAction
- The action to take.classFrom
- The beginning class item.classTo
- The ending class item.high
- The output high value.low
- The output low value.public final void makeClass(NormalizationAction theAction, String[] cls, double high, double low)
theAction
- The action for this field.cls
- The class items.high
- The output high value.low
- The output low value.public final void makePassThrough()
public final double normalize(double value)
value
- The value to normalize.public final void setAction(NormalizationAction theAction)
theAction
- The action for the field.public final void setActualHigh(double theActualHigh)
theActualHigh
- The actual high for the field.public final void setActualLow(double theActualLow)
theActualLow
- The theActual low for the field.public final void setName(String theName)
theName
- The name of the field.public final void setNormalizedHigh(double theNormalizedHigh)
theNormalizedHigh
- The normalized high for the field.public final void setNormalizedLow(double theNormalizedLow)
theNormalizedLow
- The normalized low for the field.Copyright © 2014. All Rights Reserved.