public class SingleLinkCluster extends AlgorithmCompareList
bestCluster, bestIndexes, datasetbestEval, evalMetricconfig, mathCompare, valueType| Constructor and Description |
|---|
SingleLinkCluster(FunctionMetric thisEvalMetric)
Create a new empty instance of SingleLinkCluster.
|
SingleLinkCluster(java.lang.String thisValueType,
FunctionMetric thisEvalMetric)
Create a new instance of SingleLinkCluster.
|
| Modifier and Type | Method and Description |
|---|---|
ReplySet |
evaluate(MetricDataset compareWith)
Calculate the closest dataset from the input list to the parameter dataset.
|
protected void |
initialise()
Initialise the function values, setting the config parameters or other.
|
distance, getBestCluster, getBestIndexes, getDataset, resetValues, setDatasetgetBestEvaluationcheckValueType, createFunction, createFunction, createFunction, getConfigParams, innerObject, isLegalNumber, setConfigParams, setEvaluator, setValueTypepublic SingleLinkCluster(FunctionMetric thisEvalMetric) throws java.lang.Exception
thisEvalMetric - the distance function.java.lang.Exception - any error.public SingleLinkCluster(java.lang.String thisValueType,
FunctionMetric thisEvalMetric)
throws java.lang.Exception
thisValueType - the type of object being evaluated.thisEvalMetric - the distance function.java.lang.Exception - any error.protected void initialise()
initialise in class AlgorithmCompareListpublic ReplySet evaluate(MetricDataset compareWith) throws java.lang.Exception
evaluate in interface FunctionDefevaluate in class FunctioncompareWith - stores a list of datasets to compare with, as specified above. Each values in
the compareWith list is a MetricValue and its data object should be another dataset.
If it is not, then a dataset is created with the object as a single value.compareWith list that is measured to be closest to this one.
You can use ((Integer)ReplySet.getValue()).intValue() to retrieve the index.
Indexes for the closest points in the two datasets can be retrieved from the getBestIndexes method.java.lang.Exception - any error.