O
- Object type@Reference(authors="L. J. P. van der Maaten", title="Accelerating t-SNE using Tree-Based Algorithms", booktitle="Journal of Machine Learning Research 15", url="http://dl.acm.org/citation.cfm?id=2697068", bibkey="DBLP:journals/jmlr/Maaten14") @Priority(value=199) public class BarnesHutTSNE<O> extends TSNE<O>
For larger data sets, use an index to make finding the nearest neighbors faster, e.g. cover tree or k-d-tree.
Reference:
L. J. P. van der Maaten
Accelerating t-SNE using Tree-Based Algorithms
Journal of Machine Learning Research 15
Modifier and Type | Class and Description |
---|---|
static class |
BarnesHutTSNE.Parameterizer<O>
Parameterization class.
|
protected static class |
BarnesHutTSNE.QuadTree
Quad Tree for use in a Barnes-Hut approximation.
|
Modifier and Type | Field and Description |
---|---|
private static Logging |
LOG
Class logger.
|
protected static double |
PERPLEXITY_ERROR
Threshold for optimizing perplexity.
|
protected static int |
PERPLEXITY_MAXITER
Maximum number of iterations when optimizing perplexity.
|
private static double |
QUADTREE_MIN_RESOLUION
Minimum resolution of quadtree.
|
protected double |
sqtheta
(Squared) approximation quality threshold.
|
affinity, dim, EARLY_EXAGGERATION, EARLY_EXAGGERATION_ITERATIONS, finalMomentum, INITIAL_SOLUTION_SCALE, initialMomentum, iterations, learningRate, MIN_GAIN, MIN_QIJ, momentumSwitch, projectedDistances, random
KEEP_ID
ALGORITHM_ID
Constructor and Description |
---|
BarnesHutTSNE(AffinityMatrixBuilder<? super O> affinity,
int dim,
double finalMomentum,
double learningRate,
int maxIterations,
RandomFactory random,
boolean keep,
double theta)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
computeAttractiveForces(double[] attr,
AffinityMatrix pij,
double[][] sol) |
private void |
computeGradient(AffinityMatrix pij,
double[][] solution,
double[] grad) |
private double |
computeRepulsiveForces(double[] rep_i,
int off,
double[] sol_i,
BarnesHutTSNE.QuadTree node)
Compute the repulsive forces for a single point
|
TypeInformation[] |
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.
|
protected Logging |
getLogger()
Get the (STATIC) logger for this class.
|
protected void |
optimizetSNE(AffinityMatrix pij,
double[][] sol)
Perform the actual tSNE optimization.
|
Relation<DoubleVector> |
run(Database database,
Relation<O> relation) |
computeGradient, computeQij, randomInitialSolution, run, sqDist, updateSolution
removePreviousRelation
run
private static final Logging LOG
protected static final double PERPLEXITY_ERROR
We deliberately allow more error than with "slow" tSNE.
protected static final int PERPLEXITY_MAXITER
We deliberately allow more error than with "slow" tSNE.
private static final double QUADTREE_MIN_RESOLUION
protected double sqtheta
public BarnesHutTSNE(AffinityMatrixBuilder<? super O> affinity, int dim, double finalMomentum, double learningRate, int maxIterations, RandomFactory random, boolean keep, double theta)
affinity
- Affinity matrix builderdim
- Output dimensionalityfinalMomentum
- Final momentumlearningRate
- Learning ratemaxIterations
- Maximum number of iterationsrandom
- Random generatorkeep
- Keep the original data (or remove it)theta
- Theta parameterpublic Relation<DoubleVector> run(Database database, Relation<O> relation)
protected void optimizetSNE(AffinityMatrix pij, double[][] sol)
optimizetSNE
in class TSNE<O>
pij
- Sparse initial affinity matrixsol
- Solution output array (preinitialized)private void computeGradient(AffinityMatrix pij, double[][] solution, double[] grad)
private void computeAttractiveForces(double[] attr, AffinityMatrix pij, double[][] sol)
private double computeRepulsiveForces(double[] rep_i, int off, double[] sol_i, BarnesHutTSNE.QuadTree node)
rep_i
- Repulsive forces arrayoff
- Point offsetsol_i
- Solution vectornode
- Quad treepublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithm
getInputTypeRestriction
in interface Algorithm
getInputTypeRestriction
in class TSNE<O>
protected Logging getLogger()
AbstractAlgorithm
Copyright © 2019 ELKI Development Team. License information.