JJoeven

Exercises / ml

Majority baseline

majority(ys) returns the most common label. Print majority of [0, 0, 1, 0] and the accuracy of always predicting it on that list.

Live Pythonpython
Output
Run to execute this in your browser. Nothing is sent to a server.