Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
In the chapter's example, what is the feature (input) and what is the label (output)? What values can the label take?
The label is the column the model is asked to predict.
How many of the ten students passed, and what is the pass rate?
Count the 1s in the Passed column.
What kind of machine learning problem is this example?
Count how many different values the Passed column can take.
Between which study times does the decision boundary of this data lie?
Find the last 0 and the first 1 in the Passed column.
Train the plain-Python logistic regression from the lesson twice with the same settings (5000 rounds, learning rate 0.1): once on the clean ten students, and once with two messy students added (4 hours and passed, 7 hours and failed). Compare w, b, the boundary and the probabilities at 3, 4.5, 5.5, 7 and 9 hours. What changes, and why?
Wrap the training loop in a function train(xs, ys) so you can call it on both datasets.
A school wants to offer extra tutoring to anyone who is not clearly on track to pass. Using w = 2 and b = −11, compare the predictions for 4, 5, 6 and 7 hours at the usual threshold of 0.5 and at a stricter threshold of 0.8. Which student changes, and when would the stricter threshold be the better choice?
The threshold does not change the probabilities, only where you draw the line between the two classes.
6 more questions in this section. Enroll free to practise them all.
Enroll free