Skip to content

Commit 78d0a49

Browse files
authored
Update predict-home-prices-with-python-and-linear-regression.mdx
1 parent cc38659 commit 78d0a49

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

projects/predict-home-prices-with-python-and-linear-regression/predict-home-prices-with-python-and-linear-regression.mdx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ header: https://raw.githubusercontent.com/codedex-io/projects/main/projects/pred
88
bannerImage: https://raw.githubusercontent.com/codedex-io/projects/main/projects/predict-home-prices-with-python-and-linear-regression/header.png
99
published: live
1010
readTime: 60
11-
prerequisites: Python fundamentals
11+
prerequisites: Python, NumPy, Pandas
1212
versions: Anaconda Online
13+
courses:
14+
- numpy
15+
- pandas
16+
- machine-learning
1317
tags:
1418
- intermediate
1519
- python
@@ -21,10 +25,10 @@ Have you ever wanted to know how much an apartment or house costs to rent or own
2125

2226
Machine learning is a major field that lets computers take in data and learn patterns to make predictions and decisions. We will be using Python to learn about one of the fundamentals of predictive modeling in machine learning and, more specifically, linear regression. To help us out, we will use a few data science libraries:
2327

24-
- Scikit-learn
25-
- Pandas
2628
- NumPy
29+
- Pandas
2730
- Matplotlib
31+
- Scikit-learn
2832

2933
## Linear Regression
3034

@@ -34,7 +38,7 @@ In this tutorial, we will create a linear regression model to predict house pric
3438

3539
<img
3640
src="https://raw.githubusercontent.com/codedex-io/projects/main/projects/predict-home-prices-with-python-and-linear-regression/data.gif"
37-
alt="Data Set for House Size and Price"
41+
alt="Dataset for House Size and Price"
3842
/>
3943

4044
## Getting Set Up with Anaconda
@@ -57,7 +61,7 @@ Next, sign into your account to get to the homepage. Then, select "Launch Notebo
5761
Libraries! Gotta love 'em. In this tutorial, we will be using the following Python libraries for data analysis, data visualization, and machine learning:
5862

5963
- 🔢 [NumPy](https://numpy.org) offers a robust foundation for numerical operations and data analysis.
60-
- 📖 [Pandas](https://pandas.pydata.org/) lets you to analyze, clean, explore, and manipulate data from different sources.
64+
- 🐼 [Pandas](https://pandas.pydata.org/) lets you to analyze, clean, explore, and manipulate data from different sources.
6165
- 📈 [Matplotlib](https://matplotlib.org) transforms your data into compelling visuals like 2D graphs and bar charts.
6266
- 🤖 [Scikit-learn](https://scikit-learn.org), commonly known as Sklearn, provides a user-friendly interface for all kinds of machine learning.
6367

@@ -72,7 +76,7 @@ After launching Notebook on Anaconda, open a new project:
7276

7377
## Getting Started
7478

75-
In this tutorial, we will be using a [data set](https://drive.google.com/file/d/1cNtzy7IwR753aXvpaYQRuEoxMfUNnYHl/view?usp=sharing) that compares house size and house prices of properties recently sold in Brooklyn's Dumbo neighborhood to predict the cost of houses based on size.
79+
In this tutorial, we will be using a [dataset](https://drive.google.com/file/d/1cNtzy7IwR753aXvpaYQRuEoxMfUNnYHl/view?usp=sharing) that compares house size and house prices of properties recently sold in Brooklyn's Dumbo neighborhood to predict the cost of houses based on size.
7680

7781
**Note:** This data was gathered from [Zillow](https://bit.ly/3Sawp7f).
7882

@@ -94,7 +98,7 @@ For a quick refresher, we imported the following libraries:
9498
- `train_test_split` from `sklearn.model_selection` for training and testing the model.
9599
- The `LinearRegression` class from `sklearn.linear_model` for implementing linear regression.
96100

97-
Next, let's import some data. You will need to download the [data set](https://drive.google.com/file/d/1cNtzy7IwR753aXvpaYQRuEoxMfUNnYHl/view?usp=sharing) and upload it to Anaconda.
101+
Next, let's import some data. You will need to download the [dataset](https://drive.google.com/file/d/1cNtzy7IwR753aXvpaYQRuEoxMfUNnYHl/view?usp=sharing) and upload it to Anaconda.
98102

99103
<img
100104
src="https://raw.githubusercontent.com/codedex-io/projects/main/projects/predict-home-prices-with-python-and-linear-regression/file.png"
@@ -140,7 +144,7 @@ Now that we have extracted our data and plotted on a graph, it's time for the li
140144

141145
A [train-test](https://en.wikipedia.org/wiki/Training,_validation,_and_test_data_sets) splits the generated data into training and testing sets using the `train_test_split()` function from Sklearn.
142146

143-
The train test split is a model validation procedure commonly used in predictive machine learning to simulate how a model will work with new/unknown data. It is commonly used with large data sets or when you need a quick estimate.
147+
The train test split is a model validation procedure commonly used in predictive machine learning to simulate how a model will work with new/unknown data. It is commonly used with large datasets or when you need a quick estimate.
144148

145149
Let's now add the following:
146150

@@ -199,7 +203,7 @@ With our `plt` object, we use a scatter plot to visualize the actual and predict
199203

200204
That's it, you have now officially trained and visualized a predictive modeling algorithm!
201205

202-
To take your skills to the next level, consider sourcing data and utilizing linear regression for visualization. [Kaggle](https://www.kaggle.com/) is a great place to find data sets that have already been proven but you can also import any data. You can use linear regression to predict so many things:
206+
To take your skills to the next level, consider sourcing data and utilizing linear regression for visualization. [Kaggle](https://www.kaggle.com/) is a great place to find datasets that have already been proven but you can also import any data. You can use linear regression to predict so many things:
203207

204208
- Video game sales based on reviews.
205209
- Social media engagement based on follower growth.

0 commit comments

Comments
 (0)