From 4568237cbf01841b65f1784e5f9ac357b8a27013 Mon Sep 17 00:00:00 2001 From: Art Wild Date: Sun, 6 Mar 2022 15:57:37 -0500 Subject: [PATCH] updated readme & fixed function call for julia compatibility --- README.md | 1 + src/tsne.jl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e4980bf..3a9715e 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ - Hessian Eigenmaps (HLLE) - Laplacian Eigenmaps (LEM) - Local tangent space alignment (LTSA) +- t-Distributed Stochastic Neighborhood Embedding (t-SNE) ## Installation diff --git a/src/tsne.jl b/src/tsne.jl index 3df21b9..f315236 100644 --- a/src/tsne.jl +++ b/src/tsne.jl @@ -33,7 +33,7 @@ function perplexities(D::AbstractMatrix{T}, p::Real=30; P = zeros(T, size(D)) βs = zeros(T, n) Ĥ = log(p) # desired entropy - for (i, Dᵢ) in pairs(eachcol(D)) + for (i, Dᵢ) in enumerate(eachcol(D)) Pᵢ = @view P[:,i] β = 1 # precision β = 1/σ² βmax, βmin = Inf, 0