Record Class TSNE
java.lang.Object
java.lang.Record
smile.manifold.TSNE
- Record Components:
cost- the objective function value.coordinates- the principal coordinates
- All Implemented Interfaces:
Serializable
The t-distributed stochastic neighbor embedding. The t-SNE is a nonlinear
dimensionality reduction technique that is particularly well suited
for embedding high-dimensional data into a space of two or three
dimensions, which can then be visualized in a scatter plot. Specifically,
it models each high-dimensional object by a two- or three-dimensional
point in such a way that similar objects are modeled by nearby points
and dissimilar objects are modeled by distant points.
The t-SNE algorithm comprises two main stages. First, t-SNE constructs a probability distribution over pairs of high-dimensional objects in such a way that similar objects have a high probability of being picked, whilst dissimilar points have an infinitesimal probability of being picked. Second, t-SNE defines a similar probability distribution over the points in the low-dimensional map, and it minimizes the Kullback–Leibler divergence between the two distributions with respect to the locations of the points in the map. Note that while the original algorithm uses the Euclidean distance between objects as the base of its similarity metric, this should be changed as appropriate.
References
- L.J.P. van der Maaten. Accelerating t-SNE using Tree-Based Algorithms. Journal of Machine Learning Research 15(Oct):3221-3245, 2014.
- L.J.P. van der Maaten and G.E. Hinton. Visualizing Non-Metric Similarities in Multiple Maps. Machine Learning 87(1):33-55, 2012.
- L.J.P. van der Maaten. Learning a Parametric Embedding by Preserving Local Structure. In Proceedings of the Twelfth International Conference on Artificial Intelligence & Statistics (AI-STATS), JMLR W&CP 5:384-391, 2009.
- L.J.P. van der Maaten and G.E. Hinton. Visualizing High-Dimensional Data Using t-SNE. Journal of Machine Learning Research 9(Nov):2579-2605, 2008.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionTSNE(double cost, double[][] coordinates) Creates an instance of aTSNErecord class. -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]Returns the value of thecoordinatesrecord component.doublecost()Returns the value of thecostrecord component.final booleanIndicates whether some other object is "equal to" this one.static TSNEfit(double[][] X) Fits t-SNE for given number of iterations.static TSNEfit(double[][] X, TSNE.Options options) Fits t-SNE for given number of iterations.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TSNE
public TSNE(double cost, double[][] coordinates) Creates an instance of aTSNErecord class.- Parameters:
cost- the value for thecostrecord componentcoordinates- the value for thecoordinatesrecord component
-
-
Method Details
-
fit
Fits t-SNE for given number of iterations.- Parameters:
X- the input data. If X is a square matrix, it is assumed to be the squared distance/dissimilarity matrix.- Returns:
- the model.
-
fit
Fits t-SNE for given number of iterations.- Parameters:
X- the input data. If X is a square matrix, it is assumed to be the squared distance/dissimilarity matrix.options- the hyperparameters.- Returns:
- the model.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
cost
-
coordinates
public double[][] coordinates()Returns the value of thecoordinatesrecord component.- Returns:
- the value of the
coordinatesrecord component
-