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 interface
ClusterFeature.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 void
addToStatistics(NumberVector nv)
Add NumberVector to CFvoid
addToStatistics(ClusterFeature other)
Add other CF to CFdouble
centroid(int d)
Returns the mean of the specified dimension.double[][]
covariance()
returns the covariance matrixdefault double
doubleValue(int dimension)
Returns the value in the specified dimension as double.default ClusterFeature
getCF()
Get as clustering feature.int
getWeight()
Return the weightdefault long
longValue(int dimension)
Returns the value in the specified dimension as long.void
resetStatistics()
Resets all statistics of CFdouble
sumdev()
Returns the total sum of Deviations.double
variance()
Returns the total variance.double
variance(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:NumberVector
Returns 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:
doubleValue
in 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:NumberVector
Returns 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:
longValue
in 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:AsClusterFeature
Get as clustering feature.- Specified by:
getCF
in interfaceAsClusterFeature
- Returns:
- Clustering feature
-
-