Package elki.index.tree.betula.features
Class VVIFeature
- java.lang.Object
-
- elki.index.tree.betula.features.VVIFeature
-
- All Implemented Interfaces:
FeatureVector<java.lang.Number>
,NumberVector
,SpatialComparable
,AsClusterFeature
,ClusterFeature
public class VVIFeature extends java.lang.Object implements ClusterFeature
Clustering Feature of stable BIRCH with variance per dimension- Since:
- 0.8.0
- Author:
- Andreas Lang
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VVIFeature.Factory
Factory for making cluster features.
-
Field Summary
Fields Modifier and Type Field Description (package private) double[]
mean
mean(package private) int
n
Number of objects(package private) double[]
ssd
Sum 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 VVIFeature(int dimensionality)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToStatistics(NumberVector nv)
Add NumberVector to CFvoid
addToStatistics(ClusterFeature other)
Add other CF to CFvoid
addToStatistics(VVIFeature other)
double
centroid(int i)
Returns the mean of the specified dimension.double[][]
covariance()
returns the covariance matrixint
getDimensionality()
The dimensionality of the vector space where of this FeatureVector of V is an element.int
getWeight()
Return the weightvoid
resetStatistics()
Resets all statistics of CFdouble
sumdev()
Returns the total sum of Deviations.double
sumOfSquaredDev(int i)
Sum of Squared Deviations.double[]
toArray()
Returns a double array copy of this vector.double
variance()
Returns the total variance.double
variance(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:ClusterFeature
Add NumberVector to CF- Specified by:
addToStatistics
in interfaceClusterFeature
- Parameters:
nv
- NumberVector
-
addToStatistics
public void addToStatistics(ClusterFeature other)
Description copied from interface:ClusterFeature
Add other CF to CF- Specified by:
addToStatistics
in interfaceClusterFeature
- Parameters:
other
- other CF
-
addToStatistics
public void addToStatistics(VVIFeature other)
-
resetStatistics
public void resetStatistics()
Description copied from interface:ClusterFeature
Resets all statistics of CF- Specified by:
resetStatistics
in interfaceClusterFeature
-
centroid
public double centroid(int i)
Description copied from interface:ClusterFeature
Returns the mean of the specified dimension.- Specified by:
centroid
in interfaceClusterFeature
- Parameters:
i
- dimension- Returns:
- mean of this dimension
-
variance
public double variance()
Description copied from interface:ClusterFeature
Returns the total variance.- Specified by:
variance
in interfaceClusterFeature
- Returns:
- variance.
-
sumdev
public double sumdev()
Description copied from interface:ClusterFeature
Returns the total sum of Deviations.- Specified by:
sumdev
in interfaceClusterFeature
- Returns:
- Sum of Deviations.
-
variance
public double variance(int d)
Description copied from interface:ClusterFeature
Returns the variance in the specified dimension.- Specified by:
variance
in interfaceClusterFeature
- Parameters:
d
- dimension- Returns:
- variance in this dimension.
-
covariance
public double[][] covariance()
Description copied from interface:ClusterFeature
returns the covariance matrix- Specified by:
covariance
in interfaceClusterFeature
- Returns:
- covariance
-
sumOfSquaredDev
public double sumOfSquaredDev(int i)
Sum of Squared Deviations.- Returns:
- Sum of Squared Deviations.
-
getDimensionality
public int getDimensionality()
Description copied from interface:FeatureVector
The dimensionality of the vector space where of this FeatureVector of V is an element.- Specified by:
getDimensionality
in interfaceFeatureVector<java.lang.Number>
- Specified by:
getDimensionality
in interfaceSpatialComparable
- Returns:
- the number of dimensions of this FeatureVector of V
-
getWeight
public int getWeight()
Description copied from interface:ClusterFeature
Return the weight- Specified by:
getWeight
in interfaceClusterFeature
- Returns:
- weight of CF
-
toArray
public double[] toArray()
Description copied from interface:NumberVector
Returns a double array copy of this vector.- Specified by:
toArray
in interfaceNumberVector
- Returns:
- Copy as
double[]
-
-