Method | Description | |
---|---|---|
CalculateCentroid ( IList |
Calculates the centroid for the given set of points. The centroid is a central position within a set of points that minimizes the sum of the squared distance between each of those points and the centroid. As such it can also be thought of as being an exemplar for a set of points. The centroid calculation is dependent on the distance metric, hence this method is defined on IDistanceMetric. For some distance metrics the centroid may not be a unique point, in those cases one of the possible centroids is returned. A centroid is used in k-means clustering to define the center of a cluster.
|
|
CalculateCentroidParallel ( IList |
Parallelized version of CalculateCentroid().
|
|
ManhattanDistanceMetric ( ) : System |
Constructs using default weightings for comparisons on matching and mismatching dimensions. Classical Manhattan Distance.
|
|
ManhattanDistanceMetric ( double matchDistanceCoeff, double mismatchDistanceCoeff, double mismatchDistanceConstant ) : System |
Constructs using the provided weightings for comparisons on matching and mismatching dimensions.
|
|
MeasureDistance ( |
Tests if the distance between two positions is less than some threshold. A simple way of implementing this method would be to calculate the distance between the two coordinates and test if it is less than the threshold. However, that approach requires that all of the elements in both CoordinateVectors be fully compared. We can improve performance in the general case by testing if the threshold has been passed after each vector element comparison thus allowing an early exit from the method for many calls. Further to this, we can begin comparing from the ends of the vectors where differences are most likely to occur.
|
|
MeasureDistance ( |
Measures the distance between two positions.
|
public CalculateCentroid ( IList |
||
coordList | IList |
|
return |
public CalculateCentroidParallel ( IList |
||
coordList | IList |
|
return |
public ManhattanDistanceMetric ( double matchDistanceCoeff, double mismatchDistanceCoeff, double mismatchDistanceConstant ) : System | ||
matchDistanceCoeff | double | A coefficient to applied to the distance obtained from two coordinates that both /// describe a position in a given dimension. |
mismatchDistanceCoeff | double | A coefficient applied to the distance obtained from two coordinates where only one of the coordinates describes /// a position in a given dimension. The other point is taken to be at position zero in that dimension. |
mismatchDistanceConstant | double | A constant that is added to the distance where only one of the coordinates describes a position in a given dimension. /// This adds extra emphasis to distance when comparing coordinates that exist in different dimensions. |
return | System |
public MeasureDistance ( |
||
p1 | ||
p2 | ||
threshold | double | |
return | bool |
public MeasureDistance ( |
||
p1 | ||
p2 | ||
return | double |