Callbacks

class openTSNE.callbacks.Callback[source]
__call__(iteration, error, embedding)[source]

This is the main method called from the optimization.

Parameters:
  • iteration (int) – The current iteration number.
  • error (float) – The current KL divergence of the given embedding.
  • embedding (TSNEEmbedding) – The current t-SNE embedding.
Returns:

stop_optimization – If this value is set to True, the optimization will be interrupted.

Return type:

bool

optimization_about_to_start()[source]

This is called at the beginning of the optimization procedure.

class openTSNE.callbacks.ErrorLogger[source]

Basic error logger.

This logger prints out basic information about the optimization. These include the iteration number, error and how much time has elapsed from the previous callback invocation.