|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.operator.generator.SpiralClusteringFunction
public class SpiralClusteringFunction
Generates a data set for two attributes. The data build two spiral functions around the origin up to a maximal radius.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface edu.udo.cs.yale.operator.generator.TargetFunction |
|---|
TargetFunction.FunctionException |
| Field Summary | |
|---|---|
private static double |
ANGLE_FACTOR
The angle factor. |
private static double |
ANGLE_OFFSET
The offset for the spiral angle. |
private double |
bound
The maximal radius of the spiral. |
private double |
currentLabel
The currently used label. |
private int |
currentNumber
The current number. |
private double |
currentPhi
The currently used angle phi. |
private double |
currentRadiusOffset
The current radius factor. |
private double |
deltaPhi
The angle delta which is added for each iteration. |
(package private) Attribute |
label
The label attribute. |
private static int |
NUMBER_OF_TURNS
The number of turns. |
private static double |
RADIUS_OFFSET
The radius factor for the second spiral. |
private int |
totalNumber
The maximal number of examples that will be created by this target function. |
| Constructor Summary | |
|---|---|
SpiralClusteringFunction()
|
|
| Method Summary | |
|---|---|
double |
calculate(double[] att)
Calculates the target function on arguments. |
double[] |
createArguments(int number,
RandomGenerator random)
Creates and returns a number of arguments. |
Attribute |
getLabel()
Returns the label attribute. |
void |
init(RandomGenerator random)
Does nothing. |
void |
setLowerArgumentBound(double lower)
Does nothing. |
void |
setTotalNumberOfAttributes(int number)
Does nothing. |
void |
setTotalNumberOfExamples(int number)
Sets the total number of examples. |
void |
setUpperArgumentBound(double upper)
Does nothing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int NUMBER_OF_TURNS
private static final double ANGLE_OFFSET
private static final double ANGLE_FACTOR
private static final double RADIUS_OFFSET
private double bound
private int totalNumber
private int currentNumber
private double currentPhi
private double deltaPhi
private double currentRadiusOffset
private double currentLabel
Attribute label
| Constructor Detail |
|---|
public SpiralClusteringFunction()
| Method Detail |
|---|
public void init(RandomGenerator random)
init in interface TargetFunctionpublic void setTotalNumberOfExamples(int number)
setTotalNumberOfExamples in interface TargetFunctionpublic void setTotalNumberOfAttributes(int number)
setTotalNumberOfAttributes in interface TargetFunctionpublic void setLowerArgumentBound(double lower)
setLowerArgumentBound in interface TargetFunctionpublic void setUpperArgumentBound(double upper)
setUpperArgumentBound in interface TargetFunctionpublic Attribute getLabel()
TargetFunction
getLabel in interface TargetFunction
public double calculate(double[] att)
throws TargetFunction.FunctionException
TargetFunction
calculate in interface TargetFunctionTargetFunction.FunctionException
public double[] createArguments(int number,
RandomGenerator random)
throws TargetFunction.FunctionException
TargetFunction
createArguments in interface TargetFunctionTargetFunction.FunctionException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||