Skip to content

Commit

Permalink
added tests for tsvd + bugfixed it
Browse files Browse the repository at this point in the history
  • Loading branch information
norm4nn committed Nov 1, 2024
1 parent 15662fa commit 0cbc4b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 41 deletions.
2 changes: 1 addition & 1 deletion lib/scholar/decomposition/truncated_svd.ex
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ defmodule Scholar.Decomposition.TruncatedSVD do
end

{u, sigma, vt} = randomized_svd(x, key, opts)
{_u, vt} = Scholar.Decomposition.Utils.flip_svd(u, vt)
{_u, vt} = Scholar.Decomposition.Utils.flip_svd(u, vt, false)

x_transformed = Nx.dot(x, Nx.transpose(vt))
explained_variance = Nx.variance(x_transformed, axes: [0])
Expand Down
40 changes: 0 additions & 40 deletions test/scholar/decomposition/truncated_svd_tests.exs

This file was deleted.

0 comments on commit 0cbc4b0

Please sign in to comment.