Skip to content

Commit

Permalink
🎨 Fix slightly NCA
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshoku committed Mar 1, 2020
1 parent 6099cd6 commit d485140
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def optimize_components(x, y, n_features, n_components)
dold = 0.0
optimizer.each do |prm|
res = prm
puts "[NeighbourhoodComponentAnalysis] Loss after #{res[:n_iter]} epochs: #{n_samples - res[:fnc]}" if @params[:verbose]
puts "[NeighbourhoodComponentAnalysis] The value of objective function after #{res[:n_iter]} epochs: #{x.shape[0] - res[:fnc]}" if @params[:verbose]
break if (fold - res[:fnc]).abs <= @params[:tol] && (dold - res[:jcb]).abs <= @params[:tol]
fold = res[:fnc]
dold = res[:jcb]
Expand Down

0 comments on commit d485140

Please sign in to comment.