@Deprecated public class LegacyTsne extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
LegacyTsne.Builder
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
protected org.nd4j.linalg.learning.AdaGrad |
adaGrad
Deprecated.
|
protected double |
finalMomentum
Deprecated.
|
protected org.nd4j.linalg.api.ndarray.INDArray |
gains
Deprecated.
|
protected double |
initialMomentum
Deprecated.
|
protected IterationListener |
iterationListener
Deprecated.
|
protected double |
learningRate
Deprecated.
|
protected static org.slf4j.Logger |
log
Deprecated.
|
protected int |
maxIter
Deprecated.
|
protected double |
minGain
Deprecated.
|
protected double |
momentum
Deprecated.
|
protected boolean |
normalize
Deprecated.
|
protected double |
perplexity
Deprecated.
|
protected static org.nd4j.linalg.io.ClassPathResource |
r
Deprecated.
|
protected double |
realMin
Deprecated.
|
protected int |
stopLyingIteration
Deprecated.
|
protected int |
switchMomentumIteration
Deprecated.
|
protected double |
tolerance
Deprecated.
|
protected boolean |
useAdaGrad
Deprecated.
|
protected boolean |
usePca
Deprecated.
|
protected org.nd4j.linalg.api.ndarray.INDArray |
y
Deprecated.
|
protected org.nd4j.linalg.api.ndarray.INDArray |
yIncs
Deprecated.
|
Constructor and Description |
---|
LegacyTsne()
Deprecated.
|
LegacyTsne(int maxIter,
double realMin,
double initialMomentum,
double finalMomentum,
double momentum,
int switchMomentumIteration,
boolean normalize,
boolean usePca,
int stopLyingIteration,
double tolerance,
double learningRate,
boolean useAdaGrad,
double perplexity,
double minGain)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
org.nd4j.linalg.api.ndarray.INDArray |
calculate(org.nd4j.linalg.api.ndarray.INDArray X,
int nDims,
double perplexity)
Deprecated.
|
org.nd4j.linalg.api.ndarray.INDArray |
computeGaussianPerplexity(org.nd4j.linalg.api.ndarray.INDArray d,
double u)
Deprecated.
Convert data to probability
co-occurrences (aka calculating the kernel)
|
org.nd4j.linalg.api.ndarray.INDArray |
diag(org.nd4j.linalg.api.ndarray.INDArray ds)
Deprecated.
|
IterationListener |
getIterationListener()
Deprecated.
|
org.nd4j.linalg.api.ndarray.INDArray |
getY()
Deprecated.
|
org.nd4j.linalg.api.ndarray.INDArray |
getYGradient(int n,
org.nd4j.linalg.api.ndarray.INDArray PQ,
org.nd4j.linalg.api.ndarray.INDArray qu)
Deprecated.
|
protected Pair<Double,org.nd4j.linalg.api.ndarray.INDArray> |
gradient(org.nd4j.linalg.api.ndarray.INDArray p)
Deprecated.
|
Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> |
hBeta(org.nd4j.linalg.api.ndarray.INDArray d,
double beta)
Deprecated.
Computes a gaussian kernel
given a vector of squared distance distances
|
void |
plot(org.nd4j.linalg.api.ndarray.INDArray matrix,
int nDims,
List<String> labels)
Deprecated.
Plot tsne (write the coordinates file)
|
void |
plot(org.nd4j.linalg.api.ndarray.INDArray matrix,
int nDims,
List<String> labels,
String path)
Deprecated.
Plot tsne
|
void |
setIterationListener(IterationListener iterationListener)
Deprecated.
|
void |
setY(org.nd4j.linalg.api.ndarray.INDArray y)
Deprecated.
|
void |
step(org.nd4j.linalg.api.ndarray.INDArray p,
int i)
Deprecated.
An individual iteration
|
protected int maxIter
protected double realMin
protected double initialMomentum
protected double finalMomentum
protected double minGain
protected double momentum
protected int switchMomentumIteration
protected boolean normalize
protected boolean usePca
protected int stopLyingIteration
protected double tolerance
protected double learningRate
protected org.nd4j.linalg.learning.AdaGrad adaGrad
protected boolean useAdaGrad
protected double perplexity
protected org.nd4j.linalg.api.ndarray.INDArray gains
protected org.nd4j.linalg.api.ndarray.INDArray yIncs
protected org.nd4j.linalg.api.ndarray.INDArray y
protected transient IterationListener iterationListener
protected static org.nd4j.linalg.io.ClassPathResource r
protected static final org.slf4j.Logger log
public LegacyTsne()
public LegacyTsne(int maxIter, double realMin, double initialMomentum, double finalMomentum, double momentum, int switchMomentumIteration, boolean normalize, boolean usePca, int stopLyingIteration, double tolerance, double learningRate, boolean useAdaGrad, double perplexity, double minGain)
public Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> hBeta(org.nd4j.linalg.api.ndarray.INDArray d, double beta)
d
- the databeta
- public org.nd4j.linalg.api.ndarray.INDArray computeGaussianPerplexity(org.nd4j.linalg.api.ndarray.INDArray d, double u)
d
- the data to convertu
- the perplexity of the modelpublic org.nd4j.linalg.api.ndarray.INDArray calculate(org.nd4j.linalg.api.ndarray.INDArray X, int nDims, double perplexity)
X
- nDims
- perplexity
- protected Pair<Double,org.nd4j.linalg.api.ndarray.INDArray> gradient(org.nd4j.linalg.api.ndarray.INDArray p)
public org.nd4j.linalg.api.ndarray.INDArray getYGradient(int n, org.nd4j.linalg.api.ndarray.INDArray PQ, org.nd4j.linalg.api.ndarray.INDArray qu)
public void step(org.nd4j.linalg.api.ndarray.INDArray p, int i)
p
- the probabilities that certain points
are near each otheri
- the iteration (primarily for debugging purposes)public void plot(org.nd4j.linalg.api.ndarray.INDArray matrix, int nDims, List<String> labels) throws IOException
matrix
- the matrix to plotnDims
- the number of dimensionslabels
- IOException
public void plot(org.nd4j.linalg.api.ndarray.INDArray matrix, int nDims, List<String> labels, String path) throws IOException
matrix
- the matrix to plotnDims
- the numberlabels
- path
- the path to writeIOException
public org.nd4j.linalg.api.ndarray.INDArray getY()
public void setY(org.nd4j.linalg.api.ndarray.INDArray y)
public IterationListener getIterationListener()
public void setIterationListener(IterationListener iterationListener)
public org.nd4j.linalg.api.ndarray.INDArray diag(org.nd4j.linalg.api.ndarray.INDArray ds)
Copyright © 2016. All Rights Reserved.