Package elki.index.tree.betula.features
Class VVVFeature
- java.lang.Object
-
- elki.index.tree.betula.features.VVVFeature
-
- All Implemented Interfaces:
FeatureVector<java.lang.Number>,NumberVector,SpatialComparable,AsClusterFeature,ClusterFeature
public class VVVFeature extends java.lang.Object implements ClusterFeature
Clustering Feature of stable BIRCH with covariance instead of variance- Since:
- 0.8.0
- Author:
- Andreas Lang
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVVVFeature.FactoryFactory for making cluster features.
-
Field Summary
Fields Modifier and Type Field Description (package private) double[]meanmean(package private) intnNumber of objects(package private) double[][]ssdSum of Squared Deviations.-
Fields inherited from interface elki.data.FeatureVector
TYPE
-
Fields inherited from interface elki.data.NumberVector
ATTRIBUTE_SEPARATOR, FIELD, FIELD_1D, FIELD_2D, VARIABLE_LENGTH
-
-
Constructor Summary
Constructors Constructor Description VVVFeature(int dimensionality)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToStatistics(NumberVector nv)Add NumberVector to CFvoidaddToStatistics(ClusterFeature other)Add other CF to CFvoidaddToStatistics(VVVFeature other)doublecentroid(int i)Returns the mean of the specified dimension.double[][]covariance()returns the covariance matrixintgetDimensionality()The dimensionality of the vector space where of this FeatureVector of V is an element.intgetWeight()Return the weightvoidresetStatistics()Resets all statistics of CFdoublesumdev()Returns the total sum of Deviations.double[]toArray()Returns a double array copy of this vector.doublevariance()Returns the total variance.doublevariance(int d)Returns the variance in the specified dimension.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.index.tree.betula.features.ClusterFeature
doubleValue, getCF, longValue
-
Methods inherited from interface elki.data.FeatureVector
toString
-
Methods inherited from interface elki.data.NumberVector
byteValue, floatValue, getMax, getMin, getValue, intValue, shortValue
-
-
-
-
Method Detail
-
addToStatistics
public void addToStatistics(NumberVector nv)
Description copied from interface:ClusterFeatureAdd NumberVector to CF- Specified by:
addToStatisticsin interfaceClusterFeature- Parameters:
nv- NumberVector
-
addToStatistics
public void addToStatistics(ClusterFeature other)
Description copied from interface:ClusterFeatureAdd other CF to CF- Specified by:
addToStatisticsin interfaceClusterFeature- Parameters:
other- other CF
-
addToStatistics
public void addToStatistics(VVVFeature other)
-
resetStatistics
public void resetStatistics()
Description copied from interface:ClusterFeatureResets all statistics of CF- Specified by:
resetStatisticsin interfaceClusterFeature
-
centroid
public double centroid(int i)
Description copied from interface:ClusterFeatureReturns the mean of the specified dimension.- Specified by:
centroidin interfaceClusterFeature- Parameters:
i- dimension- Returns:
- mean of this dimension
-
variance
public double variance()
Description copied from interface:ClusterFeatureReturns the total variance.- Specified by:
variancein interfaceClusterFeature- Returns:
- variance.
-
sumdev
public double sumdev()
Description copied from interface:ClusterFeatureReturns the total sum of Deviations.- Specified by:
sumdevin interfaceClusterFeature- Returns:
- Sum of Deviations.
-
variance
public double variance(int d)
Description copied from interface:ClusterFeatureReturns the variance in the specified dimension.- Specified by:
variancein interfaceClusterFeature- Parameters:
d- dimension- Returns:
- variance in this dimension.
-
covariance
public double[][] covariance()
Description copied from interface:ClusterFeaturereturns the covariance matrix- Specified by:
covariancein interfaceClusterFeature- Returns:
- covariance
-
getDimensionality
public int getDimensionality()
Description copied from interface:FeatureVectorThe dimensionality of the vector space where of this FeatureVector of V is an element.- Specified by:
getDimensionalityin interfaceFeatureVector<java.lang.Number>- Specified by:
getDimensionalityin interfaceSpatialComparable- Returns:
- the number of dimensions of this FeatureVector of V
-
getWeight
public int getWeight()
Description copied from interface:ClusterFeatureReturn the weight- Specified by:
getWeightin interfaceClusterFeature- Returns:
- weight of CF
-
toArray
public double[] toArray()
Description copied from interface:NumberVectorReturns a double array copy of this vector.- Specified by:
toArrayin interfaceNumberVector- Returns:
- Copy as
double[]
-
-