|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.app.analyst.script.normalize.AnalystField
public class AnalystField
Holds a field to be analyzed.
| Field Summary | |
|---|---|
static int |
MIN_EQ_CLASSES
Minimum classes for encode using equilateral. |
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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(int classNumber)
Encode the class. |
double[] |
encode(String str)
Encode the string to numeric form. |
double[] |
encodeEquilateral(int classNumber)
Perform an equilateral encode. |
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MIN_EQ_CLASSES
| Constructor Detail |
|---|
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.| Method Detail |
|---|
public final 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 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 ClassItem determineClass(int pos,
double[] data)
pos - The position to begin.data - The array to check.
public final double[] encode(int classNumber)
classNumber - The class number.
public final double[] encode(String str)
str - The string to encode.
public final double[] encodeEquilateral(int classNumber)
classNumber - The class number.
public final void fixSingleValue()
public final NormalizationAction getAction()
public final double getActualHigh()
public final double getActualLow()
public final List<ClassItem> getClasses()
public final int getColumnsNeeded()
public final Equilateral getEq()
public final String getName()
public final double getNormalizedHigh()
public final double getNormalizedLow()
public final int getTimeSlice()
public final void init()
public final boolean isClassify()
public final boolean isIgnored()
public final boolean isInput()
public final boolean isOutput()
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.classFrom - The starting class.classTo - The ending class.high - The high value.low - The low value.
public final 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 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 actual 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.public final void setOutput(boolean b)
b - True, if this is output.public final void setTimeSlice(int theTimeSlice)
theTimeSlice - the timeSlice to setpublic final String toString()
toString in class Objectpublic int determineMode(EncogAnalyst analyst)
analyst -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||