Зміст курсу

Linear Regression with Python

## Linear Regression with Python

4. Choosing The Best Model

# Predict Prices Using Two Features

For this challenge, the same housing dataset will be used. However, now it has two features: age and area of the house (columns `age`

and `square_feet`

).

Your task is to build a Multiple Linear Regression model using the `OLS`

class. Also, you will print the summary table to look at the p-values of each feature.

Завдання

- Assign the
`'age'`

and`'square_feet'`

columns of`df`

to`X`

. - Preprocess the
`X`

for the`OLS`

's class constructor. - Build and train the model using the
`OLS`

class. - Preprocess the
`X_new`

array the same as`X`

. - Predict the target for
`X_new`

. - Print the model's summary table.

If you did everything right, you got the p-values close to zero. That means all our features are significant for the model.

Все було зрозуміло?

# Predict Prices Using Two Features

For this challenge, the same housing dataset will be used. However, now it has two features: age and area of the house (columns `age`

and `square_feet`

).

Your task is to build a Multiple Linear Regression model using the `OLS`

class. Also, you will print the summary table to look at the p-values of each feature.

Завдання

- Assign the
`'age'`

and`'square_feet'`

columns of`df`

to`X`

. - Preprocess the
`X`

for the`OLS`

's class constructor. - Build and train the model using the
`OLS`

class. - Preprocess the
`X_new`

array the same as`X`

. - Predict the target for
`X_new`

. - Print the model's summary table.

If you did everything right, you got the p-values close to zero. That means all our features are significant for the model.

Все було зрозуміло?