Skip to content

Commit

Permalink
Update lib/scholar/linear/bayesian_ridge_regression.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Krsto Proroković <[email protected]>
  • Loading branch information
JoaquinIglesiasTurina and krstopro authored Apr 21, 2024
1 parent 52b2084 commit 4570fc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/scholar/linear/bayesian_ridge_regression.ex
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ while {{coef, rmse, alpha, lambda, iter = Nx.u64(0), has_converged = Nx.u8(0), s
{scalar * x, scalar * y}

_ ->
scale = sample_weights |> Nx.sqrt() |> Nx.make_diagonal()
scale = sample_weights |> Nx.sqrt() |> Nx.new_axis(1)
{Nx.dot(scale, x), Nx.dot(scale, y)}
end
end
Expand Down

0 comments on commit 4570fc5

Please sign in to comment.