qdtsne
A quick and dirty t-SNE C++ library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
qdtsne::Status< num_dim_, Index_, Float_ > Class Template Reference

Status of the t-SNE iterations. More...

#include <Status.hpp>

Public Member Functions

int iteration () const
 
int max_iterations () const
 
size_t num_observations () const
 
void run (Float_ *Y, int limit)
 
void run (Float_ *Y)
 

Detailed Description

template<int num_dim_, typename Index_, typename Float_>
class qdtsne::Status< num_dim_, Index_, Float_ >

Status of the t-SNE iterations.

Template Parameters
num_dim_Number of dimensions in the t-SNE embedding.
Index_Integer type for the neighbor indices.
Float_Floating-point type for the distances.

This class holds the precomputed structures required to perform the t-SNE iterations. Instances should not be constructed directly but instead created by initialize().

Member Function Documentation

◆ iteration()

template<int num_dim_, typename Index_ , typename Float_ >
int qdtsne::Status< num_dim_, Index_, Float_ >::iteration ( ) const
inline
Returns
The number of iterations performed on this object so far.

◆ max_iterations()

template<int num_dim_, typename Index_ , typename Float_ >
int qdtsne::Status< num_dim_, Index_, Float_ >::max_iterations ( ) const
inline
Returns
The maximum number of iterations. This can be modified to run() the algorithm for more iterations.

◆ num_observations()

template<int num_dim_, typename Index_ , typename Float_ >
size_t qdtsne::Status< num_dim_, Index_, Float_ >::num_observations ( ) const
inline
Returns
The number of observations in the dataset.

◆ run() [1/2]

template<int num_dim_, typename Index_ , typename Float_ >
void qdtsne::Status< num_dim_, Index_, Float_ >::run ( Float_ Y)
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_iter(). If iteration() is already greater than max_iter(), this method is a no-op.

Parameters
[in,out]YPointer 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.

◆ run() [2/2]

template<int num_dim_, typename Index_ , typename Float_ >
void qdtsne::Status< num_dim_, Index_, Float_ >::run ( Float_ Y,
int  limit 
)
inline

Run the algorithm to the specified number of iterations. This can be invoked repeatedly with increasing limit to run the algorithm incrementally.

Parameters
[in,out]YPointer 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.
limitNumber 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.

The documentation for this class was generated from the following file: