umappp
A C++ library for UMAP
Loading...
Searching...
No Matches
umappp::Status< Index_, Float_ > Class Template Reference

Status of the UMAP optimization iterations. More...

#include <Status.hpp>

Public Member Functions

std::size_t num_dimensions () const
 
int epoch () const
 
int num_epochs () const
 
Index_ num_observations () const
 
void run (Float_ *const embedding, int epoch_limit)
 
void run (Float_ *const embedding)
 

Detailed Description

template<typename Index_, typename Float_>
class umappp::Status< Index_, Float_ >

Status of the UMAP optimization iterations.

Template Parameters
Index_Integer type of the neighbor indices.
Float_Floating-point type of the distances.

Instances of this class should not be constructed directly, but instead returned by initialize().

Member Function Documentation

◆ epoch()

template<typename Index_ , typename Float_ >
int umappp::Status< Index_, Float_ >::epoch ( ) const
inline
Returns
Current epoch, i.e., the number of epochs that have already been performed by run().

◆ num_dimensions()

template<typename Index_ , typename Float_ >
std::size_t umappp::Status< Index_, Float_ >::num_dimensions ( ) const
inline
Returns
Number of dimensions of the embedding.

◆ num_epochs()

template<typename Index_ , typename Float_ >
int umappp::Status< Index_, Float_ >::num_epochs ( ) const
inline
Returns
Total number of epochs that can be performed by run(). This is typically determined by the value of Options::num_epochs used in initialize().

◆ num_observations()

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

◆ run() [1/2]

template<typename Index_ , typename Float_ >
void umappp::Status< Index_, Float_ >::run ( Float_ *const embedding)
inline

The status of the algorithm and the coordinates in embedding() are updated after completing num_epochs().

Parameters
[in,out]embeddingPointer to an array containing a column-major matrix where rows are dimensions and columns are observations. On input, this should contain the embeddings at the current epoch (epoch()), and on output, this should contain the embedding at num_epochs(). Typically, this should be the same array that was used in initialize().

◆ run() [2/2]

template<typename Index_ , typename Float_ >
void umappp::Status< Index_, Float_ >::run ( Float_ *const embedding,
int epoch_limit )
inline

The status of the algorithm and the coordinates in embedding() are updated to the specified number of epochs.

Parameters
[in,out]embeddingPointer to an array containing a column-major matrix where rows are dimensions and columns are observations. On input, this should contain the embeddings at the current epoch (epoch()), and on output, this should contain the embedding at epoch_limit. Typically, this should be the same array that was used in initialize().
epoch_limitNumber of epochs to run to. The actual number of epochs performed is equal to the difference between epoch_limit and epoch(). epoch_limit should be not less than epoch() and be no greater than the maximum number of epochs specified in num_epochs().

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