qdtsne
Quick and dirty t-SNE in C++
|
Status of the t-SNE iterations. More...
#include <Status.hpp>
Public Member Functions | |
int | iteration () const |
int | max_iterations () const |
Index_ | num_observations () const |
void | run (Float_ *const Y, const int limit) |
void | run (Float_ *const Y) |
Float_ | cost (const Float_ *const Y) |
Status of the t-SNE iterations.
num_dim_ | Number of dimensions in the t-SNE embedding. |
Index_ | Integer type of the observation indices. |
Float_ | Floating-point type of the neighbor distances and output embedding. |
This class holds the precomputed structures required to perform the t-SNE iterations. Instances should not be constructed directly but instead created by initialize()
.
|
inline |
[in] | Y | Pointer to a array containing a column-major matrix with number of rows and columns equal to num_dim_ and num_observations() , respectively. This should contain the location of each observation. |
This method is not const
as it re-uses some of the pre-allocated buffers in the Status
object for efficiency. Calling cost()
at any time will not affect the results of subsequent calls to run()
.
This method does not consider any exaggeration of the conditional probabilities for iterations at or before Options::early_exaggeration_iterations
. That is, all probabilities used here will not be exaggerated, regardless of the iteration.
|
inline |
|
inline |
Options::max_iterations
.
|
inline |
|
inline |
Run the algorithm to the maximum number of iterations. If run()
has already been invoked with an iteration limit, this method will only perform the remaining iterations required for iteration()
to reach max_iterations()
. If iteration()
is already greater than max_iterations()
, this method is a no-op.
[in,out] | Y | Pointer to a array containing a column-major matrix with number of rows and columns equal to num_dim_ and num_observations() , respectively. Each row corresponds to a dimension of the embedding while each column corresponds to an observation. On input, this should contain the initial location of each observation; on output, it is updated to the t-SNE location at the maximum number of iterations. |
|
inline |
Run the algorithm to the specified number of iterations. This can be invoked repeatedly with increasing limit
to run the algorithm incrementally.
[in,out] | Y | Pointer to a array containing a column-major matrix with number of rows and columns equal to num_dim_ and num_observations() , respectively. Each row corresponds to a dimension of the embedding while each column corresponds to an observation. On input, this should contain the initial location of each observation; on output, it is updated to the t-SNE location at the specified number of iterations. |
limit | Number of iterations to run up to. The actual number of iterations performed will be the difference between limit and iteration() , i.e., iteration() will be equal to limit on completion. limit may be greater than max_iterations() , to run the algorithm for more iterations than specified during construction of this Status object. |