Skip to content

Instantly share code, notes, and snippets.

@Faiza-K
Last active October 27, 2022 09:39
Show Gist options
  • Save Faiza-K/bb23213d6f0423dd24be7c39003210f0 to your computer and use it in GitHub Desktop.
Save Faiza-K/bb23213d6f0423dd24be7c39003210f0 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": " <a href=\"https://www.bigdatauniversity.com\"><img src = \"https://ibm.box.com/shared/static/ugcqz6ohbvff804xp84y4kqnvvk3bq1g.png\" width = 300, align = \"center\"></a>\n\n<h1 align=center><font size = 5>Data Analysis with Python</font></h1>"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "# House Sales in King County, USA"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "This dataset contains house sale prices for King County, which includes Seattle. It includes homes sold between May 2014 and May 2015."
},
{
"cell_type": "markdown",
"metadata": {},
"source": "<b>id</b> :a notation for a house\n\n<b> date</b>: Date house was sold\n\n\n<b>price</b>: Price is prediction target\n\n\n<b>bedrooms</b>: Number of Bedrooms/House\n\n\n<b>bathrooms</b>: Number of bathrooms/bedrooms\n\n<b>sqft_living</b>: square footage of the home\n\n<b>sqft_lot</b>: square footage of the lot\n\n\n<b>floors</b> :Total floors (levels) in house\n\n\n<b>waterfront</b> :House which has a view to a waterfront\n\n\n<b>view</b>: Has been viewed\n\n\n<b>condition</b> :How good the condition is Overall\n\n<b>grade</b>: overall grade given to the housing unit, based on King County grading system\n\n\n<b>sqft_above</b> :square footage of house apart from basement\n\n\n<b>sqft_basement</b>: square footage of the basement\n\n<b>yr_built</b> :Built Year\n\n\n<b>yr_renovated</b> :Year when house was renovated\n\n<b>zipcode</b>:zip code\n\n\n<b>lat</b>: Latitude coordinate\n\n<b>long</b>: Longitude coordinate\n\n<b>sqft_living15</b> :Living room area in 2015(implies-- some renovations) This might or might not have affected the lotsize area\n\n\n<b>sqft_lot15</b> :lotSize area in 2015(implies-- some renovations)"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "You will require the following libraries "
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": "import pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport seaborn as sns\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import StandardScaler,PolynomialFeatures\n%matplotlib inline"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "# 1.0 Importing the Data "
},
{
"cell_type": "markdown",
"metadata": {},
"source": " Load the csv: "
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": "file_name='https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/coursera/project/kc_house_data_NaN.csv'\ndf=pd.read_csv(file_name)"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "\nwe use the method <code>head</code> to display the first 5 columns of the dataframe."
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>Unnamed: 0</th>\n <th>id</th>\n <th>date</th>\n <th>price</th>\n <th>bedrooms</th>\n <th>bathrooms</th>\n <th>sqft_living</th>\n <th>sqft_lot</th>\n <th>floors</th>\n <th>waterfront</th>\n <th>...</th>\n <th>grade</th>\n <th>sqft_above</th>\n <th>sqft_basement</th>\n <th>yr_built</th>\n <th>yr_renovated</th>\n <th>zipcode</th>\n <th>lat</th>\n <th>long</th>\n <th>sqft_living15</th>\n <th>sqft_lot15</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>0</td>\n <td>7129300520</td>\n <td>20141013T000000</td>\n <td>221900.0</td>\n <td>3.0</td>\n <td>1.00</td>\n <td>1180</td>\n <td>5650</td>\n <td>1.0</td>\n <td>0</td>\n <td>...</td>\n <td>7</td>\n <td>1180</td>\n <td>0</td>\n <td>1955</td>\n <td>0</td>\n <td>98178</td>\n <td>47.5112</td>\n <td>-122.257</td>\n <td>1340</td>\n <td>5650</td>\n </tr>\n <tr>\n <th>1</th>\n <td>1</td>\n <td>6414100192</td>\n <td>20141209T000000</td>\n <td>538000.0</td>\n <td>3.0</td>\n <td>2.25</td>\n <td>2570</td>\n <td>7242</td>\n <td>2.0</td>\n <td>0</td>\n <td>...</td>\n <td>7</td>\n <td>2170</td>\n <td>400</td>\n <td>1951</td>\n <td>1991</td>\n <td>98125</td>\n <td>47.7210</td>\n <td>-122.319</td>\n <td>1690</td>\n <td>7639</td>\n </tr>\n <tr>\n <th>2</th>\n <td>2</td>\n <td>5631500400</td>\n <td>20150225T000000</td>\n <td>180000.0</td>\n <td>2.0</td>\n <td>1.00</td>\n <td>770</td>\n <td>10000</td>\n <td>1.0</td>\n <td>0</td>\n <td>...</td>\n <td>6</td>\n <td>770</td>\n <td>0</td>\n <td>1933</td>\n <td>0</td>\n <td>98028</td>\n <td>47.7379</td>\n <td>-122.233</td>\n <td>2720</td>\n <td>8062</td>\n </tr>\n <tr>\n <th>3</th>\n <td>3</td>\n <td>2487200875</td>\n <td>20141209T000000</td>\n <td>604000.0</td>\n <td>4.0</td>\n <td>3.00</td>\n <td>1960</td>\n <td>5000</td>\n <td>1.0</td>\n <td>0</td>\n <td>...</td>\n <td>7</td>\n <td>1050</td>\n <td>910</td>\n <td>1965</td>\n <td>0</td>\n <td>98136</td>\n <td>47.5208</td>\n <td>-122.393</td>\n <td>1360</td>\n <td>5000</td>\n </tr>\n <tr>\n <th>4</th>\n <td>4</td>\n <td>1954400510</td>\n <td>20150218T000000</td>\n <td>510000.0</td>\n <td>3.0</td>\n <td>2.00</td>\n <td>1680</td>\n <td>8080</td>\n <td>1.0</td>\n <td>0</td>\n <td>...</td>\n <td>8</td>\n <td>1680</td>\n <td>0</td>\n <td>1987</td>\n <td>0</td>\n <td>98074</td>\n <td>47.6168</td>\n <td>-122.045</td>\n <td>1800</td>\n <td>7503</td>\n </tr>\n </tbody>\n</table>\n<p>5 rows \u00d7 22 columns</p>\n</div>",
"text/plain": " Unnamed: 0 id date price bedrooms bathrooms \\\n0 0 7129300520 20141013T000000 221900.0 3.0 1.00 \n1 1 6414100192 20141209T000000 538000.0 3.0 2.25 \n2 2 5631500400 20150225T000000 180000.0 2.0 1.00 \n3 3 2487200875 20141209T000000 604000.0 4.0 3.00 \n4 4 1954400510 20150218T000000 510000.0 3.0 2.00 \n\n sqft_living sqft_lot floors waterfront ... grade sqft_above \\\n0 1180 5650 1.0 0 ... 7 1180 \n1 2570 7242 2.0 0 ... 7 2170 \n2 770 10000 1.0 0 ... 6 770 \n3 1960 5000 1.0 0 ... 7 1050 \n4 1680 8080 1.0 0 ... 8 1680 \n\n sqft_basement yr_built yr_renovated zipcode lat long \\\n0 0 1955 0 98178 47.5112 -122.257 \n1 400 1951 1991 98125 47.7210 -122.319 \n2 0 1933 0 98028 47.7379 -122.233 \n3 910 1965 0 98136 47.5208 -122.393 \n4 0 1987 0 98074 47.6168 -122.045 \n\n sqft_living15 sqft_lot15 \n0 1340 5650 \n1 1690 7639 \n2 2720 8062 \n3 1360 5000 \n4 1800 7503 \n\n[5 rows x 22 columns]"
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "df.head()"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "#### Question 1 \nDisplay the data types of each column using the attribute dtype, then take a screenshot and submit it, include your code in the image. "
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "Unnamed: 0 int64\nid int64\ndate object\nprice float64\nbedrooms float64\nbathrooms float64\nsqft_living int64\nsqft_lot int64\nfloors float64\nwaterfront int64\nview int64\ncondition int64\ngrade int64\nsqft_above int64\nsqft_basement int64\nyr_built int64\nyr_renovated int64\nzipcode int64\nlat float64\nlong float64\nsqft_living15 int64\nsqft_lot15 int64\ndtype: object"
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "df.dtypes\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "We use the method describe to obtain a statistical summary of the dataframe."
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>Unnamed: 0</th>\n <th>id</th>\n <th>price</th>\n <th>bedrooms</th>\n <th>bathrooms</th>\n <th>sqft_living</th>\n <th>sqft_lot</th>\n <th>floors</th>\n <th>waterfront</th>\n <th>view</th>\n <th>...</th>\n <th>grade</th>\n <th>sqft_above</th>\n <th>sqft_basement</th>\n <th>yr_built</th>\n <th>yr_renovated</th>\n <th>zipcode</th>\n <th>lat</th>\n <th>long</th>\n <th>sqft_living15</th>\n <th>sqft_lot15</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>count</th>\n <td>21613.00000</td>\n <td>2.161300e+04</td>\n <td>2.161300e+04</td>\n <td>21600.000000</td>\n <td>21603.000000</td>\n <td>21613.000000</td>\n <td>2.161300e+04</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>...</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n </tr>\n <tr>\n <th>mean</th>\n <td>10806.00000</td>\n <td>4.580302e+09</td>\n <td>5.400881e+05</td>\n <td>3.372870</td>\n <td>2.115736</td>\n <td>2079.899736</td>\n <td>1.510697e+04</td>\n <td>1.494309</td>\n <td>0.007542</td>\n <td>0.234303</td>\n <td>...</td>\n <td>7.656873</td>\n <td>1788.390691</td>\n <td>291.509045</td>\n <td>1971.005136</td>\n <td>84.402258</td>\n <td>98077.939805</td>\n <td>47.560053</td>\n <td>-122.213896</td>\n <td>1986.552492</td>\n <td>12768.455652</td>\n </tr>\n <tr>\n <th>std</th>\n <td>6239.28002</td>\n <td>2.876566e+09</td>\n <td>3.671272e+05</td>\n <td>0.926657</td>\n <td>0.768996</td>\n <td>918.440897</td>\n <td>4.142051e+04</td>\n <td>0.539989</td>\n <td>0.086517</td>\n <td>0.766318</td>\n <td>...</td>\n <td>1.175459</td>\n <td>828.090978</td>\n <td>442.575043</td>\n <td>29.373411</td>\n <td>401.679240</td>\n <td>53.505026</td>\n <td>0.138564</td>\n <td>0.140828</td>\n <td>685.391304</td>\n <td>27304.179631</td>\n </tr>\n <tr>\n <th>min</th>\n <td>0.00000</td>\n <td>1.000102e+06</td>\n <td>7.500000e+04</td>\n <td>1.000000</td>\n <td>0.500000</td>\n <td>290.000000</td>\n <td>5.200000e+02</td>\n <td>1.000000</td>\n <td>0.000000</td>\n <td>0.000000</td>\n <td>...</td>\n <td>1.000000</td>\n <td>290.000000</td>\n <td>0.000000</td>\n <td>1900.000000</td>\n <td>0.000000</td>\n <td>98001.000000</td>\n <td>47.155900</td>\n <td>-122.519000</td>\n <td>399.000000</td>\n <td>651.000000</td>\n </tr>\n <tr>\n <th>25%</th>\n <td>5403.00000</td>\n <td>2.123049e+09</td>\n <td>3.219500e+05</td>\n <td>3.000000</td>\n <td>1.750000</td>\n <td>1427.000000</td>\n <td>5.040000e+03</td>\n <td>1.000000</td>\n <td>0.000000</td>\n <td>0.000000</td>\n <td>...</td>\n <td>7.000000</td>\n <td>1190.000000</td>\n <td>0.000000</td>\n <td>1951.000000</td>\n <td>0.000000</td>\n <td>98033.000000</td>\n <td>47.471000</td>\n <td>-122.328000</td>\n <td>1490.000000</td>\n <td>5100.000000</td>\n </tr>\n <tr>\n <th>50%</th>\n <td>10806.00000</td>\n <td>3.904930e+09</td>\n <td>4.500000e+05</td>\n <td>3.000000</td>\n <td>2.250000</td>\n <td>1910.000000</td>\n <td>7.618000e+03</td>\n <td>1.500000</td>\n <td>0.000000</td>\n <td>0.000000</td>\n <td>...</td>\n <td>7.000000</td>\n <td>1560.000000</td>\n <td>0.000000</td>\n <td>1975.000000</td>\n <td>0.000000</td>\n <td>98065.000000</td>\n <td>47.571800</td>\n <td>-122.230000</td>\n <td>1840.000000</td>\n <td>7620.000000</td>\n </tr>\n <tr>\n <th>75%</th>\n <td>16209.00000</td>\n <td>7.308900e+09</td>\n <td>6.450000e+05</td>\n <td>4.000000</td>\n <td>2.500000</td>\n <td>2550.000000</td>\n <td>1.068800e+04</td>\n <td>2.000000</td>\n <td>0.000000</td>\n <td>0.000000</td>\n <td>...</td>\n <td>8.000000</td>\n <td>2210.000000</td>\n <td>560.000000</td>\n <td>1997.000000</td>\n <td>0.000000</td>\n <td>98118.000000</td>\n <td>47.678000</td>\n <td>-122.125000</td>\n <td>2360.000000</td>\n <td>10083.000000</td>\n </tr>\n <tr>\n <th>max</th>\n <td>21612.00000</td>\n <td>9.900000e+09</td>\n <td>7.700000e+06</td>\n <td>33.000000</td>\n <td>8.000000</td>\n <td>13540.000000</td>\n <td>1.651359e+06</td>\n <td>3.500000</td>\n <td>1.000000</td>\n <td>4.000000</td>\n <td>...</td>\n <td>13.000000</td>\n <td>9410.000000</td>\n <td>4820.000000</td>\n <td>2015.000000</td>\n <td>2015.000000</td>\n <td>98199.000000</td>\n <td>47.777600</td>\n <td>-121.315000</td>\n <td>6210.000000</td>\n <td>871200.000000</td>\n </tr>\n </tbody>\n</table>\n<p>8 rows \u00d7 21 columns</p>\n</div>",
"text/plain": " Unnamed: 0 id price bedrooms bathrooms \\\ncount 21613.00000 2.161300e+04 2.161300e+04 21600.000000 21603.000000 \nmean 10806.00000 4.580302e+09 5.400881e+05 3.372870 2.115736 \nstd 6239.28002 2.876566e+09 3.671272e+05 0.926657 0.768996 \nmin 0.00000 1.000102e+06 7.500000e+04 1.000000 0.500000 \n25% 5403.00000 2.123049e+09 3.219500e+05 3.000000 1.750000 \n50% 10806.00000 3.904930e+09 4.500000e+05 3.000000 2.250000 \n75% 16209.00000 7.308900e+09 6.450000e+05 4.000000 2.500000 \nmax 21612.00000 9.900000e+09 7.700000e+06 33.000000 8.000000 \n\n sqft_living sqft_lot floors waterfront view \\\ncount 21613.000000 2.161300e+04 21613.000000 21613.000000 21613.000000 \nmean 2079.899736 1.510697e+04 1.494309 0.007542 0.234303 \nstd 918.440897 4.142051e+04 0.539989 0.086517 0.766318 \nmin 290.000000 5.200000e+02 1.000000 0.000000 0.000000 \n25% 1427.000000 5.040000e+03 1.000000 0.000000 0.000000 \n50% 1910.000000 7.618000e+03 1.500000 0.000000 0.000000 \n75% 2550.000000 1.068800e+04 2.000000 0.000000 0.000000 \nmax 13540.000000 1.651359e+06 3.500000 1.000000 4.000000 \n\n ... grade sqft_above sqft_basement yr_built \\\ncount ... 21613.000000 21613.000000 21613.000000 21613.000000 \nmean ... 7.656873 1788.390691 291.509045 1971.005136 \nstd ... 1.175459 828.090978 442.575043 29.373411 \nmin ... 1.000000 290.000000 0.000000 1900.000000 \n25% ... 7.000000 1190.000000 0.000000 1951.000000 \n50% ... 7.000000 1560.000000 0.000000 1975.000000 \n75% ... 8.000000 2210.000000 560.000000 1997.000000 \nmax ... 13.000000 9410.000000 4820.000000 2015.000000 \n\n yr_renovated zipcode lat long sqft_living15 \\\ncount 21613.000000 21613.000000 21613.000000 21613.000000 21613.000000 \nmean 84.402258 98077.939805 47.560053 -122.213896 1986.552492 \nstd 401.679240 53.505026 0.138564 0.140828 685.391304 \nmin 0.000000 98001.000000 47.155900 -122.519000 399.000000 \n25% 0.000000 98033.000000 47.471000 -122.328000 1490.000000 \n50% 0.000000 98065.000000 47.571800 -122.230000 1840.000000 \n75% 0.000000 98118.000000 47.678000 -122.125000 2360.000000 \nmax 2015.000000 98199.000000 47.777600 -121.315000 6210.000000 \n\n sqft_lot15 \ncount 21613.000000 \nmean 12768.455652 \nstd 27304.179631 \nmin 651.000000 \n25% 5100.000000 \n50% 7620.000000 \n75% 10083.000000 \nmax 871200.000000 \n\n[8 rows x 21 columns]"
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "df.describe()"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "# 2.0 Data Wrangling"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "#### Question 2 \nDrop the columns <code>\"id\"</code> and <code>\"Unnamed: 0\"</code> from axis 1 using the method <code>drop()</code>, then use the method <code>describe()</code> to obtain a statistical summary of the data. Take a screenshot and submit it, make sure the inplace parameter is set to <code>True</code>"
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>price</th>\n <th>bedrooms</th>\n <th>bathrooms</th>\n <th>sqft_living</th>\n <th>sqft_lot</th>\n <th>floors</th>\n <th>waterfront</th>\n <th>view</th>\n <th>condition</th>\n <th>grade</th>\n <th>sqft_above</th>\n <th>sqft_basement</th>\n <th>yr_built</th>\n <th>yr_renovated</th>\n <th>zipcode</th>\n <th>lat</th>\n <th>long</th>\n <th>sqft_living15</th>\n <th>sqft_lot15</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>count</th>\n <td>2.161300e+04</td>\n <td>21600.000000</td>\n <td>21603.000000</td>\n <td>21613.000000</td>\n <td>2.161300e+04</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n <td>21613.000000</td>\n </tr>\n <tr>\n <th>mean</th>\n <td>5.400881e+05</td>\n <td>3.372870</td>\n <td>2.115736</td>\n <td>2079.899736</td>\n <td>1.510697e+04</td>\n <td>1.494309</td>\n <td>0.007542</td>\n <td>0.234303</td>\n <td>3.409430</td>\n <td>7.656873</td>\n <td>1788.390691</td>\n <td>291.509045</td>\n <td>1971.005136</td>\n <td>84.402258</td>\n <td>98077.939805</td>\n <td>47.560053</td>\n <td>-122.213896</td>\n <td>1986.552492</td>\n <td>12768.455652</td>\n </tr>\n <tr>\n <th>std</th>\n <td>3.671272e+05</td>\n <td>0.926657</td>\n <td>0.768996</td>\n <td>918.440897</td>\n <td>4.142051e+04</td>\n <td>0.539989</td>\n <td>0.086517</td>\n <td>0.766318</td>\n <td>0.650743</td>\n <td>1.175459</td>\n <td>828.090978</td>\n <td>442.575043</td>\n <td>29.373411</td>\n <td>401.679240</td>\n <td>53.505026</td>\n <td>0.138564</td>\n <td>0.140828</td>\n <td>685.391304</td>\n <td>27304.179631</td>\n </tr>\n <tr>\n <th>min</th>\n <td>7.500000e+04</td>\n <td>1.000000</td>\n <td>0.500000</td>\n <td>290.000000</td>\n <td>5.200000e+02</td>\n <td>1.000000</td>\n <td>0.000000</td>\n <td>0.000000</td>\n <td>1.000000</td>\n <td>1.000000</td>\n <td>290.000000</td>\n <td>0.000000</td>\n <td>1900.000000</td>\n <td>0.000000</td>\n <td>98001.000000</td>\n <td>47.155900</td>\n <td>-122.519000</td>\n <td>399.000000</td>\n <td>651.000000</td>\n </tr>\n <tr>\n <th>25%</th>\n <td>3.219500e+05</td>\n <td>3.000000</td>\n <td>1.750000</td>\n <td>1427.000000</td>\n <td>5.040000e+03</td>\n <td>1.000000</td>\n <td>0.000000</td>\n <td>0.000000</td>\n <td>3.000000</td>\n <td>7.000000</td>\n <td>1190.000000</td>\n <td>0.000000</td>\n <td>1951.000000</td>\n <td>0.000000</td>\n <td>98033.000000</td>\n <td>47.471000</td>\n <td>-122.328000</td>\n <td>1490.000000</td>\n <td>5100.000000</td>\n </tr>\n <tr>\n <th>50%</th>\n <td>4.500000e+05</td>\n <td>3.000000</td>\n <td>2.250000</td>\n <td>1910.000000</td>\n <td>7.618000e+03</td>\n <td>1.500000</td>\n <td>0.000000</td>\n <td>0.000000</td>\n <td>3.000000</td>\n <td>7.000000</td>\n <td>1560.000000</td>\n <td>0.000000</td>\n <td>1975.000000</td>\n <td>0.000000</td>\n <td>98065.000000</td>\n <td>47.571800</td>\n <td>-122.230000</td>\n <td>1840.000000</td>\n <td>7620.000000</td>\n </tr>\n <tr>\n <th>75%</th>\n <td>6.450000e+05</td>\n <td>4.000000</td>\n <td>2.500000</td>\n <td>2550.000000</td>\n <td>1.068800e+04</td>\n <td>2.000000</td>\n <td>0.000000</td>\n <td>0.000000</td>\n <td>4.000000</td>\n <td>8.000000</td>\n <td>2210.000000</td>\n <td>560.000000</td>\n <td>1997.000000</td>\n <td>0.000000</td>\n <td>98118.000000</td>\n <td>47.678000</td>\n <td>-122.125000</td>\n <td>2360.000000</td>\n <td>10083.000000</td>\n </tr>\n <tr>\n <th>max</th>\n <td>7.700000e+06</td>\n <td>33.000000</td>\n <td>8.000000</td>\n <td>13540.000000</td>\n <td>1.651359e+06</td>\n <td>3.500000</td>\n <td>1.000000</td>\n <td>4.000000</td>\n <td>5.000000</td>\n <td>13.000000</td>\n <td>9410.000000</td>\n <td>4820.000000</td>\n <td>2015.000000</td>\n <td>2015.000000</td>\n <td>98199.000000</td>\n <td>47.777600</td>\n <td>-121.315000</td>\n <td>6210.000000</td>\n <td>871200.000000</td>\n </tr>\n </tbody>\n</table>\n</div>",
"text/plain": " price bedrooms bathrooms sqft_living sqft_lot \\\ncount 2.161300e+04 21600.000000 21603.000000 21613.000000 2.161300e+04 \nmean 5.400881e+05 3.372870 2.115736 2079.899736 1.510697e+04 \nstd 3.671272e+05 0.926657 0.768996 918.440897 4.142051e+04 \nmin 7.500000e+04 1.000000 0.500000 290.000000 5.200000e+02 \n25% 3.219500e+05 3.000000 1.750000 1427.000000 5.040000e+03 \n50% 4.500000e+05 3.000000 2.250000 1910.000000 7.618000e+03 \n75% 6.450000e+05 4.000000 2.500000 2550.000000 1.068800e+04 \nmax 7.700000e+06 33.000000 8.000000 13540.000000 1.651359e+06 \n\n floors waterfront view condition grade \\\ncount 21613.000000 21613.000000 21613.000000 21613.000000 21613.000000 \nmean 1.494309 0.007542 0.234303 3.409430 7.656873 \nstd 0.539989 0.086517 0.766318 0.650743 1.175459 \nmin 1.000000 0.000000 0.000000 1.000000 1.000000 \n25% 1.000000 0.000000 0.000000 3.000000 7.000000 \n50% 1.500000 0.000000 0.000000 3.000000 7.000000 \n75% 2.000000 0.000000 0.000000 4.000000 8.000000 \nmax 3.500000 1.000000 4.000000 5.000000 13.000000 \n\n sqft_above sqft_basement yr_built yr_renovated zipcode \\\ncount 21613.000000 21613.000000 21613.000000 21613.000000 21613.000000 \nmean 1788.390691 291.509045 1971.005136 84.402258 98077.939805 \nstd 828.090978 442.575043 29.373411 401.679240 53.505026 \nmin 290.000000 0.000000 1900.000000 0.000000 98001.000000 \n25% 1190.000000 0.000000 1951.000000 0.000000 98033.000000 \n50% 1560.000000 0.000000 1975.000000 0.000000 98065.000000 \n75% 2210.000000 560.000000 1997.000000 0.000000 98118.000000 \nmax 9410.000000 4820.000000 2015.000000 2015.000000 98199.000000 \n\n lat long sqft_living15 sqft_lot15 \ncount 21613.000000 21613.000000 21613.000000 21613.000000 \nmean 47.560053 -122.213896 1986.552492 12768.455652 \nstd 0.138564 0.140828 685.391304 27304.179631 \nmin 47.155900 -122.519000 399.000000 651.000000 \n25% 47.471000 -122.328000 1490.000000 5100.000000 \n50% 47.571800 -122.230000 1840.000000 7620.000000 \n75% 47.678000 -122.125000 2360.000000 10083.000000 \nmax 47.777600 -121.315000 6210.000000 871200.000000 "
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "# Remove two columns \ndf.drop([\"id\",\"Unnamed: 0\"], axis= 1, inplace = True)\n\ndf.describe()"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "we can see we have missing values for the columns <code> bedrooms</code> and <code> bathrooms </code>"
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "number of NaN values for the column bedrooms : 13\nnumber of NaN values for the column bathrooms : 10\n"
}
],
"source": "print(\"number of NaN values for the column bedrooms :\", df['bedrooms'].isnull().sum())\nprint(\"number of NaN values for the column bathrooms :\", df['bathrooms'].isnull().sum())\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "\nWe can replace the missing values of the column <code>'bedrooms'</code> with the mean of the column <code>'bedrooms' </code> using the method replace. Don't forget to set the <code>inplace</code> parameter top <code>True</code>"
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": "mean=df['bedrooms'].mean()\ndf['bedrooms'].replace(np.nan,mean, inplace=True)"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "\nWe also replace the missing values of the column <code>'bathrooms'</code> with the mean of the column <code>'bedrooms' </codse> using the method replace.Don't forget to set the <code> inplace </code> parameter top <code> Ture </code>"
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": "mean=df['bathrooms'].mean()\ndf['bathrooms'].replace(np.nan,mean, inplace=True)"
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "number of NaN values for the column bedrooms : 0\nnumber of NaN values for the column bathrooms : 0\n"
}
],
"source": "print(\"number of NaN values for the column bedrooms :\", df['bedrooms'].isnull().sum())\nprint(\"number of NaN values for the column bathrooms :\", df['bathrooms'].isnull().sum())"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "# 3.0 Exploratory data analysis"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "#### Question 3\nUse the method value_counts to count the number of houses with unique floor values, use the method .to_frame() to convert it to a dataframe.\n"
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>floors</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>1.0</th>\n <td>10680</td>\n </tr>\n <tr>\n <th>2.0</th>\n <td>8241</td>\n </tr>\n <tr>\n <th>1.5</th>\n <td>1910</td>\n </tr>\n <tr>\n <th>3.0</th>\n <td>613</td>\n </tr>\n <tr>\n <th>2.5</th>\n <td>161</td>\n </tr>\n <tr>\n <th>3.5</th>\n <td>8</td>\n </tr>\n </tbody>\n</table>\n</div>",
"text/plain": " floors\n1.0 10680\n2.0 8241\n1.5 1910\n3.0 613\n2.5 161\n3.5 8"
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "floor_count= df[\"floors\"].value_counts()\nfloor_count.to_frame()"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "### Question 4\nUse the function <code>boxplot</code> in the seaborn library to determine whether houses with a waterfront view or without a waterfront view have more price outliers ."
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "<matplotlib.axes._subplots.AxesSubplot at 0x7f96fc1f4f28>"
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAaEAAAEKCAYAAAC7c+rvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vc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HwELgL9LvavfumdldihOQmb18V3gn6ftEvAGSa8D/hj4HvAfI6IEvBP4U0nvjIhlVNbUe29EvFfSicCngXkRcTbQC3y8qo7fRMQfR8RtwD8AN0TEe9OxtwIrI+JdwCvAl4ALgLOAd0u6NJV7PfBgRJyZ2vxXEfFDKssq/U1EnFXdszI73JyEzOpjI3COpDcCL1FZFqZEJTF9D/hzSZuAh4E/pPbQ19wU/4GkR4Ay8Oaq498Ypf4nI+LBtP1u4P6IGEhLKH0d+JN07GXgO1VtnjWRH9LstzUtdwPMjkQR8Yqk7cCHgB8CjwHvBX4feBH4BPDuiNgt6VbgmBqXEdATEYsOUc2vR2lC9bFar9IY8kq8unbXfvxvghXMPSGz+vkulWTzXSq9n78GHgGOpZIk9kg6mcprz4c8D7wxbT8IvEfSbABJMyT9wSTa8RCVIb8T0ySGRcA/jnFOdTvM6sZJyKx+vgecAjwQEc8CvwG+FxGPUhmG2wKsAH5Qdc5yYI2k+yJiAPhL4HZJj1FJSm+baCMi4hngOuA+4FFgU0TcNcZpdwB/c7imfJsdilfRNjOzbNwTMjOzbJyEzMwsGychMzPLxknIzMyycRIyM7NsnITMzCwbJyEzM8vGScjMzLL5/7PzJ25ACb4KAAAAAElFTkSuQmCC\n",
"text/plain": "<Figure size 432x288 with 1 Axes>"
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": "sns.boxplot(x= \"waterfront\", y= \"price\", data= df)"
},
{
"cell_type": "raw",
"metadata": {},
"source": ""
},
{
"cell_type": "markdown",
"metadata": {},
"source": "### Question 5\nUse the function <code> regplot</code> in the seaborn library to determine if the feature <code>sqft_above</code> is negatively or positively correlated with price."
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "(0, 8086177.484571384)"
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAaEAAAELCAYAAABwLzlKAAAABHNCSVQICAgIfA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ZrZS0gRC0te7gZcp0jgxMdvyzcBJZrZV0l8JCTIbfnwr07SwfA5wt6QhwATgNcLYONty16ic62x+JuRckUk6GNhlZo8TRuA8DaiSdHjc5LI2Pv4VUNHG+oGEAeW2SzqQbw6mNjXv/a04/V/CmQ7A5cCbAGZWTcjqfB8hQ/heC4MXrpV0aSyLJJ3QVnmdK4SfCTlXfMcDv5NUD9QC1wBDgeckfUkIAse18tkZwAuSNrZ0XcjMlkhaBHwIrAH+02yTckkLCF8wc8HueuBRSbcQhui+Km/7WYRhBs7MW3Y58KCkO4BSwoB+S9pTcOc6yodycK6LSToTuNnMLkz6WJxLmnfHOeecS4yfCTnXTcVutfJmi68ws6VJHI9zncGDkHPOucR4d5xzzrnEeBByzjmXGA9CzjnnEuNByDnnXGI8CDnnnEvM/wHdwfEE8EjRkgAAAABJRU5ErkJggg==\n",
"text/plain": "<Figure size 432x288 with 1 Axes>"
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": "sns.regplot(x= 'sqft_above', y= 'price', data= df)\nplt.ylim(0, )"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": ""
},
{
"cell_type": "markdown",
"metadata": {},
"source": "\nWe can use the Pandas method <code>corr()</code> to find the feature other than price that is most correlated with price."
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "zipcode -0.053203\nlong 0.021626\ncondition 0.036362\nyr_built 0.054012\nsqft_lot15 0.082447\nsqft_lot 0.089661\nyr_renovated 0.126434\nfloors 0.256794\nwaterfront 0.266369\nlat 0.307003\nbedrooms 0.308797\nsqft_basement 0.323816\nview 0.397293\nbathrooms 0.525738\nsqft_living15 0.585379\nsqft_above 0.605567\ngrade 0.667434\nsqft_living 0.702035\nprice 1.000000\nName: price, dtype: float64"
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "df.corr()['price'].sort_values()"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "# Module 4: Model Development"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Import libraries "
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": "import matplotlib.pyplot as plt\nfrom sklearn.linear_model import LinearRegression\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "\nWe can Fit a linear regression model using the longitude feature <code> 'long'</code> and caculate the R^2."
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "0.00046769430149007363"
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "X = df[['long']]\nY = df['price']\nlm = LinearRegression()\nlm\nlm.fit(X,Y)\nlm.score(X, Y)"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "### Question 6\nFit a linear regression model to predict the <code>'price'</code> using the feature 'sqft_living' then calculate the R^2. Take a screenshot of your code and the value of the R^2."
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "0.49285321790379316"
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "X1= df[[\"sqft_living\"]]\nY1= df[\"price\"]\n\n#linear regression obj\nlr= LinearRegression()\nlr\nlr.fit(X1,Y1)\n\nlr.score(X1,Y1)\n\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "### Question 7\nFit a linear regression model to predict the 'price' using the list of features:"
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": "Unnamed: 0 False\nid False\ndate False\nprice False\nbedrooms True\nbathrooms True\nsqft_living False\nsqft_lot False\nfloors False\nwaterfront False\nview False\ncondition False\ngrade False\nsqft_above False\nsqft_basement False\nyr_built False\nyr_renovated False\nzipcode False\nlat False\nlong False\nsqft_living15 False\nsqft_lot15 False\ndtype: bool"
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "#first of all we have to clear All NaN\n\ndf.isnull().any()"
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": "# drop all nan values\ndf= df.dropna(axis= 0)"
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None,\n normalize=False)"
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "features = [\"floors\", \"waterfront\",\"lat\" ,\"bedrooms\" ,\"sqft_basement\" ,\"view\" ,\"bathrooms\",\"sqft_living15\",\"sqft_above\",\"grade\",\"sqft_living\"]\nfeature = df[[\"floors\", \"waterfront\",\"lat\" ,\"bedrooms\" ,\"sqft_basement\" ,\"view\" ,\"bathrooms\",\"sqft_living15\",\"sqft_above\",\"grade\",\"sqft_living\"]]\ny= df['price']\nlr.fit(feature, y)\n"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "the calculate the R^2. Take a screenshot of your code"
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "0.6576951666037504"
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "lr.score(feature, y)"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "#### this will help with Question 8\n\nCreate a list of tuples, the first element in the tuple contains the name of the estimator:\n\n<code>'scale'</code>\n\n<code>'polynomial'</code>\n\n<code>'model'</code>\n\nThe second element in the tuple contains the model constructor \n\n<code>StandardScaler()</code>\n\n<code>PolynomialFeatures(include_bias=False)</code>\n\n<code>LinearRegression()</code>\n"
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": "Input=[('scale',StandardScaler()),('polynomial', PolynomialFeatures(include_bias=False)),('model',LinearRegression())]"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "### Question 8\nUse the list to create a pipeline object, predict the 'price', fit the object using the features in the list <code> features </code>, then fit the model and calculate the R^2"
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/plain": "Pipeline(memory=None,\n steps=[('scale', StandardScaler(copy=True, with_mean=True, with_std=True)), ('polynomial', PolynomialFeatures(degree=2, include_bias=False, interaction_only=False)), ('model', LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None,\n normalize=False))])"
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "pipe=Pipeline(Input)\npipe"
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": "/opt/conda/envs/Python36/lib/python3.6/site-packages/sklearn/preprocessing/data.py:645: DataConversionWarning: Data with input dtype int64, float64 were all converted to float64 by StandardScaler.\n return self.partial_fit(X, y)\n/opt/conda/envs/Python36/lib/python3.6/site-packages/sklearn/base.py:467: DataConversionWarning: Data with input dtype int64, float64 were all converted to float64 by StandardScaler.\n return self.fit(X, y, **fit_params).transform(X)\n"
},
{
"data": {
"text/plain": "Pipeline(memory=None,\n steps=[('scale', StandardScaler(copy=True, with_mean=True, with_std=True)), ('polynomial', PolynomialFeatures(degree=2, include_bias=False, interaction_only=False)), ('model', LinearRegression(copy_X=True, fit_intercept=True, n_jobs=None,\n normalize=False))])"
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "#fit the model\npipe.fit(feature, y)\n"
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": "/opt/conda/envs/Python36/lib/python3.6/site-packages/sklearn/pipeline.py:511: DataConversionWarning: Data with input dtype int64, float64 were all converted to float64 by StandardScaler.\n Xt = transform.transform(Xt)\n"
},
{
"data": {
"text/plain": "0.7513427797293394"
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "#R^2\npipe.score(feature, y)"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "pipe.score(X,Y)"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "# Module 5: MODEL EVALUATION AND REFINEMENT"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "import the necessary modules "
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "done\n"
}
],
"source": "from sklearn.model_selection import cross_val_score\nfrom sklearn.model_selection import train_test_split\nprint(\"done\")"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "we will split the data into training and testing set"
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": "number of test samples : 3242\nnumber of training samples: 18371\n"
}
],
"source": "features =[\"floors\", \"waterfront\",\"lat\" ,\"bedrooms\" ,\"sqft_basement\" ,\"view\" ,\"bathrooms\",\"sqft_living15\",\"sqft_above\",\"grade\",\"sqft_living\"] \nX = df[features ]\nY = df['price']\n\nx_train, x_test, y_train, y_test = train_test_split(X, Y, test_size=0.15, random_state=1)\n\n\nprint(\"number of test samples :\", x_test.shape[0])\nprint(\"number of training samples:\",x_train.shape[0])"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "### Question 9\nCreate and fit a Ridge regression object using the training data, setting the regularization parameter to 0.1 and calculate the R^2 using the test data. \n"
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": "from sklearn.linear_model import Ridge"
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "0.6478759163939111"
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "RidgeModel = Ridge(alpha=0.1)\n\n# fit the ridge regression \nRidgeModel.fit(x_train, y_train)\n\n# R^2 using test data\nRidgeModel.score(x_test, y_test)"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "### Question 10\nPerform a second order polynomial transform on both the training data and testing data. Create and fit a Ridge regression object using the training data, setting the regularisation parameter to 0.1. Calculate the R^2 utilising the test data provided. Take a screenshot of your code and the R^2."
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": "0.7002744268659787"
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": "# polynomial transform degree 2\npr = PolynomialFeatures(degree= 2)\npolyF_train= pr.fit_transform(x_train)\npolyF_test= pr.fit_transform(x_test)\n\n#Ridge reg\nRidgeModel.fit(polyF_train, y_train)\nRidgeModel.score(polyF_test, y_test)"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "<p>Once you complete your notebook you will have to share it. Select the icon on the top right a marked in red in the image below, a dialogue box should open, select the option all&nbsp;content excluding sensitive code cells.</p>\n <p><img width=\"600\" src=\"https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/coursera/project/save_notebook.png\" alt=\"share notebook\" style=\"display: block; margin-left: auto; margin-right: auto;\"/></p>\n <p></p>\n <p>You can then share the notebook&nbsp; via a&nbsp; URL by scrolling down as shown in the following image:</p>\n <p style=\"text-align: center;\"><img width=\"600\" src=\"https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/coursera/project/url_notebook.png\" alt=\"HTML\" style=\"display: block; margin-left: auto; margin-right: auto;\" /></p>\n <p>&nbsp;</p>"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "<h2>About the Authors:</h2> \n\n<a href=\"https://www.linkedin.com/in/joseph-s-50398b136/\">Joseph Santarcangelo</a> has a PhD in Electrical Engineering, his research focused on using machine learning, signal processing, and computer vision to determine how videos impact human cognition. Joseph has been working for IBM since he completed his PhD."
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Other contributors: <a href=\"https://www.linkedin.com/in/michelleccarey/\">Michelle Carey</a>, <a href=\"www.linkedin.com/in/jiahui-mavis-zhou-a4537814a\">Mavis Zhou</a> "
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": ""
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
},
"widgets": {
"state": {},
"version": "1.1.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment