0
0
ML Pythonprogramming~5 mins

First ML prediction (linear regression) in ML Python - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is linear regression in simple terms?
Linear regression is a way to find a straight line that best fits a set of points. It helps predict one value based on another by drawing a line through the data.
Click to reveal answer
beginner
What does the 'prediction' mean in linear regression?
Prediction means using the line equation to guess the output value for a new input. For example, if the line is y = 2x + 1, and x=3, the prediction is y=7.
Click to reveal answer
beginner
What are the main parts of a linear regression model?
The main parts are the slope (how steep the line is) and the intercept (where the line crosses the y-axis). Together, they form the equation y = slope * x + intercept.
Click to reveal answer
intermediate
How do we measure if a linear regression model is good?
We check how close the predicted points are to the real points. One way is to look at the loss, like mean squared error, which shows the average squared difference between predicted and real values.
Click to reveal answer
beginner
What is the role of training data in linear regression?
Training data is the set of known input and output pairs used to find the best line. The model learns the slope and intercept from this data to make predictions.
Click to reveal answer
What does the slope in a linear regression model represent?
AThe number of data points used
BThe starting point of the line on the x-axis
CThe error between predicted and actual values
DHow much y changes for a change in x
If the linear regression equation is y = 3x + 2, what is the predicted y when x = 4?
A8
B14
C10
D12
What is the purpose of training a linear regression model?
ATo calculate the prediction error
BTo test the model on new data
CTo find the best slope and intercept for the data
DTo collect more data points
Which metric is commonly used to measure error in linear regression?
AMean Squared Error
BAccuracy
CPrecision
DRecall
What does the intercept in a linear regression model tell us?
AThe predicted value when x is zero
BThe steepness of the line
CThe error of the model
DThe number of features
Explain how a linear regression model makes a prediction for a new input value.
Describe the role of training data in building a linear regression model.