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 GaussianAffinityMatrixBuilder<O> extends java.lang.Object implements AffinityMatrixBuilder<O>
Reference:
G. Hinton, S. Roweis
Stochastic Neighbor Embedding
Advances in Neural Information Processing Systems 15
Modifier and Type | Class and Description |
---|---|
static class |
GaussianAffinityMatrixBuilder.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 |
sigma
Kernel bandwidth sigma.
|
Constructor and Description |
---|
GaussianAffinityMatrixBuilder(DistanceFunction<? super O> distanceFunction,
double sigma)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected double[][] |
buildDistanceMatrix(ArrayDBIDs ids,
DistanceQuery<?> dq)
Build a distance matrix of squared distances.
|
<T extends O> |
computeAffinityMatrix(Relation<T> relation,
double initialScale)
Compute the affinity matrix.
|
protected static double |
computeH(int i,
double[] dist_i,
double[] pij_i,
double mbeta)
Compute H (observed perplexity) for row i, and the row pij_i.
|
protected static double[][] |
computePij(double[][] dist,
double sigma,
double initialScale)
Compute the pij from the distance matrix.
|
TypeInformation |
getInputTypeRestriction()
Supported input data.
|
private static final Logging LOG
protected static final double MIN_PIJ
protected DistanceFunction<? super O> distanceFunction
protected double sigma
public GaussianAffinityMatrixBuilder(DistanceFunction<? super O> distanceFunction, double sigma)
distanceFunction
- Distance functionsigma
- Gaussian kernel bandwidthpublic <T extends O> AffinityMatrix computeAffinityMatrix(Relation<T> relation, double initialScale)
AffinityMatrixBuilder
computeAffinityMatrix
in interface AffinityMatrixBuilder<O>
T
- Relation typerelation
- Data relationinitialScale
- initial scaleprotected double[][] buildDistanceMatrix(ArrayDBIDs ids, DistanceQuery<?> dq)
ids
- DBIDsdq
- Distance queryprotected static double[][] computePij(double[][] dist, double sigma, double initialScale)
dist
- Distance matrix.sigma
- Kernel bandwidth sigmainitialScale
- Initial scaleprotected static double computeH(int i, double[] dist_i, double[] pij_i, double mbeta)
i
- Current point i (entry i will be ignored)dist_i
- Distance matrix row (input)pij_i
- Row pij[i] (output)mbeta
- -1. / (2 * sigma * sigma)
public TypeInformation getInputTypeRestriction()
getInputTypeRestriction
in interface AffinityMatrixBuilder<O>
Copyright © 2019 ELKI Development Team. License information.