org.encog.app.analyst.script.normalize
public class AnalystField extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MIN_EQ_CLASSES
Minimum classes for encode using equilateral.
|
Constructor and Description |
---|
AnalystField()
Construct the object with a range of 1 and -1.
|
AnalystField(AnalystField field)
Construct an analyst field.
|
AnalystField(double theNormalizedHigh,
double theNormalizedLow)
Construct the object.
|
AnalystField(NormalizationAction theAction,
String theName)
Construct an object.
|
AnalystField(NormalizationAction theAction,
String theName,
double ahigh,
double alow,
double nhigh,
double nlow)
Construct the field, with no defaults.
|
AnalystField(String theName,
NormalizationAction theAction,
double high,
double low)
Construct an analyst field to use.
|
Modifier and Type | Method and Description |
---|---|
void |
addRawHeadings(StringBuilder line,
String prefix,
CSVFormat format)
Add headings for a raw file.
|
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.
|
ClassItem |
determineClass(int pos,
double[] data)
Determine the class using part of an array.
|
int |
determineMode(EncogAnalyst analyst)
Determine the mode, this is the class item that has the most instances.
|
double[] |
encode(double d) |
double[] |
encode(int classNumber)
Encode the class.
|
double[] |
encode(String str)
Encode the string to numeric form.
|
double[] |
encodeEquilateral(int classNumber)
Perform an equilateral encode.
|
ClassItem |
findClass(int index) |
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() |
int |
getTimeSlice() |
void |
init()
Init any internal structures.
|
boolean |
isClassify() |
boolean |
isIgnored() |
boolean |
isInput() |
boolean |
isOutput() |
int |
lookup(String str)
Lookup the specified field.
|
void |
makeClass(NormalizationAction theAction,
int classFrom,
int classTo,
int high,
int low)
Make the classes based on numbers.
|
void |
makeClass(NormalizationAction theAction,
String[] cls,
double high,
double low)
Make the classes using names.
|
void |
makePassThrough()
Make this a pass-through field.
|
double |
normalize(double value)
Normalize the specified value.
|
void |
setAction(NormalizationAction theAction)
Set the theAction 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.
|
void |
setOutput(boolean b)
Set if this is an output field.
|
void |
setTimeSlice(int theTimeSlice) |
String |
toString() |
public static final int MIN_EQ_CLASSES
public AnalystField()
public AnalystField(AnalystField field)
field
- The field to clone.public AnalystField(double theNormalizedHigh, double theNormalizedLow)
theNormalizedHigh
- The normalized high.theNormalizedLow
- The normalized low.public AnalystField(NormalizationAction theAction, String theName)
theAction
- The desired action.theName
- The name of this column.public AnalystField(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 AnalystField(String theName, NormalizationAction theAction, double high, double low)
theName
- The name of the field.theAction
- The action to use.high
- The high value.low
- The low value.public void addRawHeadings(StringBuilder line, String prefix, CSVFormat format)
line
- The line to write the raw headings to.prefix
- The prefix to place.format
- The format to use.public void analyze(double d)
d
- The value to analyze.public double deNormalize(double value)
value
- The value to normalize.public ClassItem determineClass(double[] data)
data
- The data to analyze.public ClassItem determineClass(int pos, double[] data)
pos
- The position to begin.data
- The array to check.public double[] encode(int classNumber)
classNumber
- The class number.public double[] encode(String str)
str
- The string to encode.public double[] encodeEquilateral(int classNumber)
classNumber
- The class number.public void fixSingleValue()
public NormalizationAction getAction()
public double getActualHigh()
public double getActualLow()
public int getColumnsNeeded()
public Equilateral getEq()
public String getName()
public double getNormalizedHigh()
public double getNormalizedLow()
public int getTimeSlice()
public void init()
public boolean isClassify()
public final boolean isIgnored()
public boolean isInput()
public boolean isOutput()
public int lookup(String str)
str
- The name of the field to lookup.public void makeClass(NormalizationAction theAction, int classFrom, int classTo, int high, int low)
theAction
- The action.classFrom
- The starting class.classTo
- The ending class.high
- The high value.low
- The low value.public void makeClass(NormalizationAction theAction, String[] cls, double high, double low)
theAction
- The action to use.cls
- The class names.high
- The high value.low
- The low value.public void makePassThrough()
public double normalize(double value)
value
- The value to normalize.public void setAction(NormalizationAction theAction)
theAction
- The action for the field.public void setActualHigh(double theActualHigh)
theActualHigh
- The actual high for the field.public void setActualLow(double theActualLow)
theActualLow
- The actual low for the field.public void setName(String theName)
theName
- The name of the field.public void setNormalizedHigh(double theNormalizedHigh)
theNormalizedHigh
- The normalized high for the field.public void setNormalizedLow(double theNormalizedLow)
theNormalizedLow
- The normalized low for the field.public void setOutput(boolean b)
b
- True, if this is output.public void setTimeSlice(int theTimeSlice)
theTimeSlice
- the timeSlice to setpublic int determineMode(EncogAnalyst analyst)
analyst
- The Encog analyst.public double[] encode(double d)
public ClassItem findClass(int index)
Copyright © 2014. All Rights Reserved.