|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAlgorithm
AlgorithmLBG
public class AlgorithmLBG
implements the LBG algorithm
Constructor Summary | |
---|---|
AlgorithmLBG()
|
Method Summary | |
---|---|
void |
classify(java.util.Vector guesses)
Classifies the data sets based on the k-means iterative algorithm |
MyPoint |
clusterDeviation(java.util.Vector cluster,
MyPoint mean)
Calculates the standard deviation of the cluster |
void |
computeBinaryDeviates(java.util.Vector decisionRegions)
Computes the binary deviates after each iteraion |
void |
computeMeans(java.util.Vector decisionRegions)
Computes the binary deviates after each iteraion |
int |
displayClusterError(int closest,
java.util.Vector cluster,
int id)
Finds the datapoints in error, for all datasets |
void |
generatePool()
Collects all the data points together |
int |
getClosestSet(MyPoint mean)
Determines the closest data sets to the cluster |
java.util.Vector<MyPoint> |
getDecisionRegion(java.util.Vector<MyPoint> vec)
Computes the k-mean decision region - nearest neighbor algorithm |
boolean |
initialize()
Overrides the initialize() method in the base class. |
void |
outputDecisionRegion()
Displays the decision regoin on output panel |
void |
run()
Implementation of the run function from the Runnable interface. |
Methods inherited from class Algorithm |
---|
computeMeans, disableControl, enableControl, nextStep, prevStep, scaleToFitData, setDataPoints, setInputPanel, setOutputPanel, setProcessBox |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AlgorithmLBG()
Method Detail |
---|
public boolean initialize()
initialize
in class Algorithm
public void run()
run
in interface java.lang.Runnable
run
in class Algorithm
public void generatePool()
public int getClosestSet(MyPoint mean)
mean
- mean point of the cluster
public int displayClusterError(int closest, java.util.Vector cluster, int id)
closest
- Variable can be int values 1-4. Marks which
set of data is closestcluster
- Stores the points of a clusterid
- ID number
public void computeBinaryDeviates(java.util.Vector decisionRegions)
decisionRegions
- region: classified data setspublic void computeMeans(java.util.Vector decisionRegions)
decisionRegions
- region: classified data setspublic MyPoint clusterDeviation(java.util.Vector cluster, MyPoint mean)
cluster
- cluster of data pointsmean
- mean of the cluster
MyPoint
public void classify(java.util.Vector guesses)
guesses
- stored data sets from the classificationpublic java.util.Vector<MyPoint> getDecisionRegion(java.util.Vector<MyPoint> vec)
vec
- vector of initial guesses
public void outputDecisionRegion()
OutputPanel
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |