|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.math.linearalgebra.pca.CovarianceMatrixBuilder<V,D>
de.lmu.ifi.dbs.elki.math.linearalgebra.pca.WeightedCovarianceMatrixBuilder<V,D>
V
- Vector class to useD
- Distance type@Title(value="Weighted Covariance Matrix / PCA") @Description(value="A PCA modification by using weights while building the covariance matrix, to obtain more stable results") @Reference(authors="H.-P. Kriegel, P. Kr\u00f6ger, E. Schubert, A. Zimek", title="A General Framework for Increasing the Robustness of PCA-based Correlation Clustering Algorithms", booktitle="Proceedings of the 20th International Conference on Scientific and Statistical Database Management (SSDBM), Hong Kong, China, 2008", url="http://dx.doi.org/10.1007/978-3-540-69497-7_27") public class WeightedCovarianceMatrixBuilder<V extends NumberVector<V,?>,D extends NumberDistance<D,?>>
CovarianceMatrixBuilder
with weights.
This builder uses a weight function to weight points differently during build
a covariance matrix. Covariance can be canonically extended with weights, as
shown in the article
A General Framework for Increasing the Robustness of PCA-Based Correlation
Clustering Algorithms Hans-Peter Kriegel and Peer Kröger and Erich
Schubert and Arthur Zimek In: Proc. 20th Int. Conf. on Scientific and
Statistical Database Management (SSDBM), 2008, Hong Kong Lecture Notes in
Computer Science 5069, Springer
Field Summary | |
---|---|
static OptionID |
WEIGHT_ID
OptionID for WEIGHT_PARAM |
private ObjectParameter<WeightFunction> |
WEIGHT_PARAM
Parameter to specify the weight function to use in weighted PCA, must implement WeightFunction
. |
private DistanceFunction<V,DoubleDistance> |
weightDistance
Holds the distance function used for weight calculation |
WeightFunction |
weightfunction
Holds the weight function. |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
WeightedCovarianceMatrixBuilder(Parameterization config)
Constructor, adhering to Parameterizable |
Method Summary | |
---|---|
private double[][] |
finishCovarianceMatrix(double[] sums,
double[][] squares,
double weightsum)
Finish the Covariance matrix in array "squares". |
Matrix |
processIds(Collection<Integer> ids,
Database<V> database)
Weighted Covariance Matrix for a set of IDs. |
Matrix |
processQueryResults(Collection<DistanceResultPair<D>> results,
Database<V> database,
int k)
Compute Covariance Matrix for a QueryResult Collection By default it will just collect the ids and run processIds |
Methods inherited from class de.lmu.ifi.dbs.elki.math.linearalgebra.pca.CovarianceMatrixBuilder |
---|
processDatabase, processQueryResults |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final OptionID WEIGHT_ID
WEIGHT_PARAM
private final ObjectParameter<WeightFunction> WEIGHT_PARAM
WeightFunction
.
Key: -pca.weight
public WeightFunction weightfunction
private DistanceFunction<V extends NumberVector<V,?>,DoubleDistance> weightDistance
Constructor Detail |
---|
public WeightedCovarianceMatrixBuilder(Parameterization config)
Parameterizable
config
- ParameterizationMethod Detail |
---|
public Matrix processIds(Collection<Integer> ids, Database<V> database)
processIds
in class CovarianceMatrixBuilder<V extends NumberVector<V,?>,D extends NumberDistance<D,?>>
ids
- a collection of idsdatabase
- the database used
public Matrix processQueryResults(Collection<DistanceResultPair<D>> results, Database<V> database, int k)
processQueryResults
in class CovarianceMatrixBuilder<V extends NumberVector<V,?>,D extends NumberDistance<D,?>>
results
- a collection of QueryResultsdatabase
- the database usedk
- number of elements to process
private double[][] finishCovarianceMatrix(double[] sums, double[][] squares, double weightsum)
sums
- Sums of values.squares
- Sums of squares. Contents are destroyed and replaced with
Covariance Matrix!weightsum
- Sum of weights.
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |