public class AlgorithmLBG extends Algorithm
Constructor and Description |
---|
AlgorithmLBG() |
Modifier and Type | Method and Description |
---|---|
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.
|
computeMeans, disableControl, enableControl, nextStep, prevStep, scaleToFitData, setDataPoints, setInputPanel, setOutputPanel, setProcessBox
public boolean initialize()
initialize
in class Algorithm
public void run()
public void generatePool()
public int getClosestSet(MyPoint mean)
mean
- mean point of the clusterpublic 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 numberpublic 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 clusterMyPoint
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 guessespublic void outputDecisionRegion()
OutputPanel