|
|||||||||
| 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.ConstantGenerator
public class ConstantGenerator
Generates a constant attribute. The format is "const[value]()" for
the FeatureGenerationOperator
operator.
| Field Summary | |
|---|---|
private double |
constant
|
private java.lang.String |
constantString
|
static java.lang.String |
FUNCTION_NAME
|
| Fields inherited from class edu.udo.cs.yale.generator.FeatureGenerator |
|---|
resultAttributes, SELECTION_MODE_ALL, SELECTION_MODE_RESTRICTIVE |
| Constructor Summary | |
|---|---|
ConstantGenerator()
|
|
ConstantGenerator(double constant)
|
|
| Method Summary | |
|---|---|
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. |
Attribute[] |
getInputAttributes()
Returns an array of Attributes where the length is the arity of the generator, [i] is the attribute type of the i-th argument. |
java.util.List<Attribute[]> |
getInputCandidates(ExampleSet exampleSet,
int maxDepth,
java.lang.String[] functions)
Returns all compatible input attribute arrays for this generator from the given example set as list. |
Attribute[] |
getOutputAttributes(ExampleTable input)
Returns the generated attributes types. |
FeatureGenerator |
newInstance()
Subclasses must implement this method so that a new instance of this generator class is returned. |
void |
setArguments(Attribute[] args)
Sets the arguments (indices) used in future generate(...) |
void |
setFunction(java.lang.String functionName)
Sets the function name. |
java.lang.String |
toString()
|
| Methods inherited from class edu.udo.cs.yale.generator.FeatureGenerator |
|---|
argumentsSet, checkCompatibility, createGeneratorForFunction, equals, generateAll, getArgument, getExampleTable, getSelectionMode, selectGenerator, 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 constant
private java.lang.String constantString
| Constructor Detail |
|---|
public ConstantGenerator()
public ConstantGenerator(double constant)
| Method Detail |
|---|
public void setArguments(Attribute[] args)
FeatureGenerator
setArguments in class FeatureGeneratorpublic FeatureGenerator newInstance()
FeatureGenerator
newInstance in class FeatureGeneratorpublic java.lang.String getFunction()
FeatureGenerator
getFunction in class FeatureGeneratorpublic void setFunction(java.lang.String functionName)
FeatureGenerator
setFunction in class FeatureGeneratorpublic Attribute[] getInputAttributes()
FeatureGenerator
getInputAttributes in class FeatureGeneratorpublic Attribute[] getOutputAttributes(ExampleTable input)
FeatureGenerator
getOutputAttributes in class FeatureGenerator
public java.util.List<Attribute[]> getInputCandidates(ExampleSet exampleSet,
int maxDepth,
java.lang.String[] functions)
getInputCandidates in class FeatureGenerator
public void generate(DataRow data)
throws GenerationException
FeatureGenerator
generate in class FeatureGeneratorGenerationExceptionpublic java.lang.String toString()
toString in class FeatureGenerator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||