FunctionRacerProblemsRace

Share Right

Beginnerscikit-learnPython

truth holds the real labels and guess what a model predicted. Return the accuracy: the share of predictions that are right.

Example 1

truth [1,0,1,1]
guess [1,0,0,1]
returns 0.75

Three of the four predictions match.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More scikit-learn problems