Package elki.index.tree.betula.features
Interface ClusterFeature
-
- All Superinterfaces:
AsClusterFeature,FeatureVector<java.lang.Number>,NumberVector,SpatialComparable
- All Known Implementing Classes:
BIRCHCF,VIIFeature,VVIFeature,VVVFeature
public interface ClusterFeature extends AsClusterFeature, NumberVector
Interface for basic ClusteringFeature functions- Since:
- 0.8.0
- Author:
- Andreas Lang
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceClusterFeature.Factory<F extends ClusterFeature>Cluster feature factory
-
Field Summary
-
Fields inherited from interface elki.data.FeatureVector
TYPE
-
Fields inherited from interface elki.data.NumberVector
ATTRIBUTE_SEPARATOR, FIELD, FIELD_1D, FIELD_2D, VARIABLE_LENGTH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddToStatistics(NumberVector nv)Add NumberVector to CFvoidaddToStatistics(ClusterFeature other)Add other CF to CFdoublecentroid(int d)Returns the mean of the specified dimension.double[][]covariance()returns the covariance matrixdefault doubledoubleValue(int dimension)Returns the value in the specified dimension as double.default ClusterFeaturegetCF()Get as clustering feature.intgetWeight()Return the weightdefault longlongValue(int dimension)Returns the value in the specified dimension as long.voidresetStatistics()Resets all statistics of CFdoublesumdev()Returns the total sum of Deviations.doublevariance()Returns the total variance.doublevariance(int d)Returns the variance in the specified dimension.-
Methods inherited from interface elki.data.FeatureVector
getDimensionality, toString
-
Methods inherited from interface elki.data.NumberVector
byteValue, floatValue, getMax, getMin, getValue, intValue, shortValue, toArray
-
Methods inherited from interface elki.data.spatial.SpatialComparable
getDimensionality
-
-
-
-
Method Detail
-
addToStatistics
void addToStatistics(NumberVector nv)
Add NumberVector to CF- Parameters:
nv- NumberVector
-
addToStatistics
void addToStatistics(ClusterFeature other)
Add other CF to CF- Parameters:
other- other CF
-
resetStatistics
void resetStatistics()
Resets all statistics of CF
-
getWeight
int getWeight()
Return the weight- Returns:
- weight of CF
-
centroid
double centroid(int d)
Returns the mean of the specified dimension.- Parameters:
d- dimension- Returns:
- mean of this dimension
-
doubleValue
default double doubleValue(int dimension)
Description copied from interface:NumberVectorReturns the value in the specified dimension as double.Note: this might seem redundant with respect to
getValue(dim).doubleValue(), but usually this is much more efficient due to boxing/unboxing cost.- Specified by:
doubleValuein interfaceNumberVector- Parameters:
dimension- the desired dimension, where 0 ≤ dimension <this.getDimensionality()- Returns:
- the value in the specified dimension
-
longValue
default long longValue(int dimension)
Description copied from interface:NumberVectorReturns the value in the specified dimension as long.Note: this might seem redundant with respect to
getValue(dim).longValue(), but usually this is much more efficient due to boxing/unboxing cost.- Specified by:
longValuein interfaceNumberVector- Parameters:
dimension- the desired dimension, where 0 ≤ dimension <this.getDimensionality()- Returns:
- the value in the specified dimension
-
variance
double variance()
Returns the total variance.- Returns:
- variance.
-
sumdev
double sumdev()
Returns the total sum of Deviations.- Returns:
- Sum of Deviations.
-
variance
double variance(int d)
Returns the variance in the specified dimension.- Parameters:
d- dimension- Returns:
- variance in this dimension.
-
covariance
double[][] covariance()
returns the covariance matrix- Returns:
- covariance
-
getCF
default ClusterFeature getCF()
Description copied from interface:AsClusterFeatureGet as clustering feature.- Specified by:
getCFin interfaceAsClusterFeature- Returns:
- Clustering feature
-
-