Linear Regression

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:26 AM on 6/25/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

19 Terms

1
New cards

Independent Variables in Linear Regression

Inputs - They can be categorical or continuous

2
New cards

Dependent Variables in Linear Regression

Target you’re predicting - must be continuous

3
New cards

What kind of Machine Learning problems can be solved using Linear Regression

CO2 emissions from engine specs

House Price from features

Life satisfaction from GDP

4
New cards

Simple Linear Regression

One independent variable, predicting CO2 emissions only using engine size

5
New cards

Multiple Linear Regression

More than one independent variable, predicting CO2 emissions using engine size, cylinders, and fuel consumption

6
New cards

What does it mean to ‘fit a line’ in Linear Regression

Finding a theta_0 and theta_1 that best represents the relationship between the independent and dependent variables across your scattered data points, the line that overall minimizes the error

7
New cards

Error in Linear Regression

actual y - predicted y for an instance, it’s the vertical distance between a data point and the fitted regression line

8
New cards

Mean Absolute Error (MAE)

Average of the absolute errors, simplest to interpret

9
New cards

Mean Squared Error (MSE)

Average of squared errors, penalizes large errors more, often used as the cost function

10
New cards

Root Mean Squared Error (RMSE)

Square root of MSE, same units as the target, the most popular/interpretable metric

11
New cards

Y

Vector of the actual targets

12
New cards

Theta

The parameter vector holding the bias theta_0 and feature weights theta_1.. theta_n

13
New cards

X

Feature matrix/vector for the instances

14
New cards

Why transpose theta

It let’s theta^T * x become a valid matrix multiplication, producing a single scalar prediction

15
New cards

Why is a column of all 1s (x0) added during linear regression

SO bias term theta_0 can be folded into the same matrix multiplication form as the other parameters

16
New cards

Deriving Normal Equation

Start from Cost function MSE written in vector/matrix form

Compute the squared residual by multiplying the residual vector by its own transpose

Take the derivative of this cost function with respect to theta

Set it to zero to find the minimum

Solve for theta (gives you the closed form result)

17
New cards

How to convert a table into a design matrix and use it in the Normal Equation

Take the table and add a new column x0 filled entirely with 1s for the intercept

Arrange all the feature columns into a matrix X where row is one instance’s full vector

Target column becomes the vector y

Plug the variables into theta_hat to solve for the parameter vector

18
New cards

Computational Complexity of the Normal Equation for Linear Regression

O(n³)

19
New cards

Weakness of using Normal Equation for Linear Regression

it scales poorly for large datasets because of the matrix inversion