summaryrefslogtreecommitdiff
path: root/elki/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/ProgressiveEigenPairFilter.java
diff options
context:
space:
mode:
authorErich Schubert <erich@debian.org>2016-02-13 17:05:40 +0100
committerAndrej Shadura <andrewsh@debian.org>2019-03-09 22:30:47 +0000
commitdefdc6d2d24cb1cefca77aa63ca6c436a8f3672c (patch)
treea017235849736e0a0ea8a2b28de23f46dc47b082 /elki/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/ProgressiveEigenPairFilter.java
parentaee1a6e43bd1a264226de31eadf10003c46d47c6 (diff)
parent0a055548ae9f9d5c639bb29ca32e0fd88de37c1d (diff)
Import Debian changes 0.7.1-1
elki (0.7.1-1) unstable; urgency=low * New upstream release (mostly bug fixes) * Drop patches included upstream * Build-dep on default-jdk instead of openjdk7-jdk (Closes: #814163)
Diffstat (limited to 'elki/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/ProgressiveEigenPairFilter.java')
-rw-r--r--elki/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/ProgressiveEigenPairFilter.java45
1 files changed, 23 insertions, 22 deletions
diff --git a/elki/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/ProgressiveEigenPairFilter.java b/elki/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/ProgressiveEigenPairFilter.java
index 16b6d72e..242c00f4 100644
--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/ProgressiveEigenPairFilter.java
+++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/pca/ProgressiveEigenPairFilter.java
@@ -46,48 +46,44 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.DoubleParameter;
* gives better results when clusters of different dimensionality exist, since
* different percentage alpha levels might be appropriate for different
* dimensionalities.
- *
+ *
* Example calculations of alpha levels:
- *
+ *
* In a 3D space, a progressive alpha value of 0.5 equals:
- *
+ *
* - 1D subspace: 50 % + 1/3 of remainder = 0.667
- *
+ *
* - 2D subspace: 50 % + 2/3 of remainder = 0.833
- *
+ *
* In a 4D space, a progressive alpha value of 0.5 equals:
- *
+ *
* - 1D subspace: 50% + 1/4 of remainder = 0.625
- *
+ *
* - 2D subspace: 50% + 2/4 of remainder = 0.750
- *
+ *
* - 3D subspace: 50% + 3/4 of remainder = 0.875
- *
+ *
* Reasoning why this improves over PercentageEigenPairFilter:
- *
+ *
* In a 100 dimensional space, a single Eigenvector representing over 85% of the
* total variance is highly significant, whereas the strongest 85 Eigenvectors
* together will by definition always represent at least 85% of the variance.
* PercentageEigenPairFilter can thus not be used with these parameters and
* detect both dimensionalities correctly.
- *
+ *
* The second parameter introduced here, walpha, serves a different function: It
* prevents the eigenpair filter to use a statistically weak Eigenvalue just to
* reach the intended level, e.g. 84% + 1% >= 85% when 1% is statistically very
* weak.
- *
+ *
* @author Erich Schubert
- *
+ * @since 0.2
+ *
*/
@Title("Progressive Eigenpair Filter")
@Description("Sorts the eigenpairs in decending order of their eigenvalues and returns the first eigenpairs, whose sum of eigenvalues explains more than the a certain percentage of the unexpected variance, where the percentage increases with subspace dimensionality.")
public class ProgressiveEigenPairFilter implements EigenPairFilter {
/**
- * Parameter progressive alpha.
- */
- public static final OptionID EIGENPAIR_FILTER_PALPHA = new OptionID("pca.filter.progressivealpha", "The share (0.0 to 1.0) of variance that needs to be explained by the 'strong' eigenvectors." + "The filter class will choose the number of strong eigenvectors by this share.");
-
- /**
* The default value for alpha.
*/
public static final double DEFAULT_PALPHA = 0.5;
@@ -110,7 +106,7 @@ public class ProgressiveEigenPairFilter implements EigenPairFilter {
/**
* Constructor.
- *
+ *
* @param palpha palpha
* @param walpha walpha
*/
@@ -177,13 +173,18 @@ public class ProgressiveEigenPairFilter implements EigenPairFilter {
/**
* Parameterization class.
- *
+ *
* @author Erich Schubert
- *
+ *
* @apiviz.exclude
*/
public static class Parameterizer extends AbstractParameterizer {
/**
+ * Parameter progressive alpha.
+ */
+ public static final OptionID EIGENPAIR_FILTER_PALPHA = new OptionID("pca.filter.progressivealpha", "The share (0.0 to 1.0) of variance that needs to be explained by the 'strong' eigenvectors." + "The filter class will choose the number of strong eigenvectors by this share.");
+
+ /**
* The threshold for strong eigenvectors: the strong eigenvectors explain a
* portion of at least alpha of the total variance.
*/
@@ -204,7 +205,7 @@ public class ProgressiveEigenPairFilter implements EigenPairFilter {
palpha = palphaP.getValue();
}
- DoubleParameter walphaP = new DoubleParameter(WeakEigenPairFilter.EIGENPAIR_FILTER_WALPHA, DEFAULT_WALPHA);
+ DoubleParameter walphaP = new DoubleParameter(WeakEigenPairFilter.Parameterizer.EIGENPAIR_FILTER_WALPHA, DEFAULT_WALPHA);
walphaP.addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE);
if(config.grab(walphaP)) {
walpha = walphaP.getValue();