NeuralTSNE.TSNE.CostFunctions package
Submodules
NeuralTSNE.TSNE.CostFunctions.cost_functions module
- class CostFunctions(name)[source]View on GitHub
Bases:
object
Class containing cost functions for t-SNE.
- static kl_divergence(Y: Tensor, P: Tensor, params: dict[str, Any]) Tensor [source]View on GitHub
Calculates the Kullback-Leibler divergence.
- Parameters:
Y (torch.Tensor) – Embedding tensor.
P (torch.Tensor) – Conditional probability matrix.
- Returns:
Kullback-Leibler divergence.
- Return type:
torch.Tensor
Note
Calculates the Kullback-Leibler divergence between the true conditional probability matrix P and the conditional probability matrix Q based on the current embedding Y.