Skip to content

Instantly share code, notes, and snippets.

@PyDataBlog
Created August 29, 2020 16:20
Show Gist options
  • Select an option

  • Save PyDataBlog/3d7b3d7cf1c4fc83ab4e3deb4987c35e to your computer and use it in GitHub Desktop.

Select an option

Save PyDataBlog/3d7b3d7cf1c4fc83ab4e3deb4987c35e to your computer and use it in GitHub Desktop.
"""
Check the accuracy between predicted values (Ŷ) and the true values(Y).
"""
function assess_accuracy(Ŷ , Y)
@assert size(Ŷ) == size(Y)
return sum((Ŷ .> 0.5) .== Y) / length(Y)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment