Created
July 29, 2022 14:03
-
-
Save lucifermorningstar1305/e51a07e4b62e6345eeb3884270167826 to your computer and use it in GitHub Desktop.
Evaluating model performance in Julia
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yhat = MLJ.predict(tree, coerce(X[test, :], Continuous)) | |
# To calculate the log-loss or binary cross entropy of our classification algorithm | |
println("Log-Loss on the Test Set : $(log_loss(yhat, coerce(y[test], Multiclass)) |> mean)") | |
# To calculate the accuracy of our classification algorithm | |
println("Accuracy on the Test Set : $(accuracy(mode.(yhat), coerce(y[test], Multiclass)))") | |
# To generate the Confusion Matrix of our Classification algorithm | |
ConfusionMatrix()(mode.(yhat), coerce(y[test], Multiclass)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment