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.
Using the lesson's model marks = 10 × hours + 25, how many marks does it predict for a student who studies 4.5 hours?
Multiply the hours by the slope, then add the intercept.
In this example, which value is the feature (input) and which is the label (output)? Why is the task called regression?
The label is the correct answer that comes with each training example.
In the model marks = 10 × hours + 25, what does the slope of 10 tell us?
Compare the marks for 2 hours and 3 hours.
What does the lesson's model predict for a student who studies 6 hours?
Multiply by the slope, then add the intercept.
For the noisy marks [38, 41, 58, 62, 76] (hours 1 to 5), compare two lines: the least-squares line, and a line drawn through only the first and last students. Which has the smaller total squared error, and why?
Write one function that adds up the squared errors for any slope and intercept, then call it for both lines.
Turn the model around. A student wants 90 marks: using marks = 10 × hours + 25, how many hours should they plan to study? Write code that answers this for targets of 60, 75, 90 and 100 marks, and flags any answer outside the hours the model learned from.
Rearrange the line's equation so that hours is on its own.
6 more questions in this section. Enroll free to practise them all.
Enroll free