O - Vector type@Reference(authors="G. Hinton, S. Roweis", title="Stochastic Neighbor Embedding", booktitle="Advances in Neural Information Processing Systems 15", url="http://papers.nips.cc/paper/2276-stochastic-neighbor-embedding", bibkey="DBLP:conf/nips/HintonR02") public class PerplexityAffinityMatrixBuilder<O> extends GaussianAffinityMatrixBuilder<O>
Reference:
 G. Hinton, S. Roweis
 Stochastic Neighbor Embedding
 Advances in Neural Information Processing Systems 15
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
PerplexityAffinityMatrixBuilder.Parameterizer<O>
Parameterization class. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected DistanceFunction<? super O> | 
distanceFunction
Input distance function. 
 | 
private static Logging | 
LOG
Class logger. 
 | 
protected static double | 
MIN_PIJ
Minimum value for pij entries (even when duplicate) 
 | 
protected double | 
perplexity
Perplexity. 
 | 
protected static double | 
PERPLEXITY_ERROR
Threshold for optimizing perplexity. 
 | 
protected static int | 
PERPLEXITY_MAXITER
Maximum number of iterations when optimizing perplexity. 
 | 
sigma| Constructor and Description | 
|---|
PerplexityAffinityMatrixBuilder(DistanceFunction<? super O> distanceFunction,
                               double perplexity)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
<T extends O> | 
computeAffinityMatrix(Relation<T> relation,
                     double initialScale)
Compute the affinity matrix. 
 | 
protected static double | 
computePi(int i,
         double[] dist_i,
         double[] pij_i,
         double perplexity,
         double logPerp)
Compute row pij[i], using binary search on the kernel bandwidth sigma to
 obtain the desired perplexity. 
 | 
protected static double[][] | 
computePij(double[][] dist,
          double perplexity,
          double initialScale)
Compute the pij from the distance matrix. 
 | 
protected static double | 
estimateInitialBeta(double[] dist_i,
                   double perplexity)
Estimate beta from the distances in a row. 
 | 
TypeInformation | 
getInputTypeRestriction()
Supported input data. 
 | 
buildDistanceMatrix, computeHprivate static final Logging LOG
protected static final double PERPLEXITY_ERROR
protected static final int PERPLEXITY_MAXITER
protected static final double MIN_PIJ
protected DistanceFunction<? super O> distanceFunction
protected double perplexity
public PerplexityAffinityMatrixBuilder(DistanceFunction<? super O> distanceFunction, double perplexity)
distanceFunction - Distance functionperplexity - Perplexitypublic <T extends O> AffinityMatrix computeAffinityMatrix(Relation<T> relation, double initialScale)
AffinityMatrixBuildercomputeAffinityMatrix in interface AffinityMatrixBuilder<O>computeAffinityMatrix in class GaussianAffinityMatrixBuilder<O>T - Relation typerelation - Data relationinitialScale - initial scaleprotected static double[][] computePij(double[][] dist,
                                       double perplexity,
                                       double initialScale)
dist - Distance matrix.perplexity - Desired perplexityinitialScale - Initial scaleprotected static double computePi(int i,
                                  double[] dist_i,
                                  double[] pij_i,
                                  double perplexity,
                                  double logPerp)
i - Current pointdist_i - Distance matrix row pij[i]pij_i - Output rowperplexity - Desired perplexitylogPerp - Log of desired perplexityprotected static double estimateInitialBeta(double[] dist_i,
                                            double perplexity)
dist_i - Distancesperplexity - Desired perplexitypublic TypeInformation getInputTypeRestriction()
getInputTypeRestriction in interface AffinityMatrixBuilder<O>getInputTypeRestriction in class GaussianAffinityMatrixBuilder<O>Copyright © 2019 ELKI Development Team. License information.