Skip to content

Commit

Permalink
Less confusing name
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangnrd committed Dec 4, 2024
1 parent 0a7b233 commit 7b0a96d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/tutorials/logistic_regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ julia> max_idx = [x[1] for x in argmax(custom_y_onehot; dims=1)]
Now we can write a function that calculates the indices of the maximum element in each column, and maps them to a class name.

```jldoctest logistic_regression
julia> function custom_onecold(custom_y_onehot)
max_idx = [x[1] for x in argmax(custom_y_onehot; dims=1)]
vec(classes[max_idx])
julia> function custom_onecold(y)
max_idx = [x[1] for x in argmax(y; dims=1)]
return vec(classes[max_idx])
end;
julia> custom_onecold(custom_y_onehot)
Expand Down

0 comments on commit 7b0a96d

Please sign in to comment.