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 Chapter 6's dataset, which column is the independent variable and which is the dependent variable?
The dependent variable is the one whose value depends on the other, the one we want to predict.
For each of the two metrics in section 6.9, say whether a higher or a lower value is better, and what a perfect fit would score.
MSE measures errors, while R² measures how much of the variation is explained.
What does Mean Squared Error (MSE) measure?
Read the name backwards: errors, squared, then the mean.
The chapter's salary model has an R² score of about 0.98. What does that tell us?
R² is about explaining variation, not about counting correct answers.
Apply the whole chapter workflow to a new dataset without libraries. Five flats have sizes of 50, 60, 80, 100 and 120 square metres and prices of 30, 36, 45, 58 and 66 lakh rupees. Fit a least-squares line, predict the price of a 90-square-metre flat, and report the MSE and R² on the training data.
Reuse the summary's script and change only the two lists and the input you predict for.
Add one unusual employee to the chapter's data: 6 years of experience but a salary of only 40,000. Refit the line and compare the slope, intercept, MSE and R² with the original five people. What does this show about small datasets?
Write one function that fits the line and returns all four numbers, then call it on both versions of the data.
6 more questions in this section. Enroll free to practise them all.
Enroll free