Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

Boston housing #379

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 34 additions & 12 deletions projects/boston_housing/boston_housing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,17 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Boston housing dataset has 489 data points with 4 variables each.\n"
]
}
],
"source": [
"# Import libraries necessary for this project\n",
"import numpy as np\n",
Expand Down Expand Up @@ -81,24 +89,38 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Statistics for Boston housing dataset:\n",
"\n",
"Minimum price: $105000.0\n",
"Maximum price: $1024800.0\n",
"Mean price: $454342.9447852761\n",
"Median price $438900.0\n",
"Standard deviation of prices: $165171.13154429474\n"
]
}
],
"source": [
"# TODO: Minimum price of the data\n",
"minimum_price = None\n",
"minimum_price = min(prices)\n",
"\n",
"# TODO: Maximum price of the data\n",
"maximum_price = None\n",
"maximum_price = max(prices)\n",
"\n",
"# TODO: Mean price of the data\n",
"mean_price = None\n",
"mean_price = np.mean(prices)\n",
"\n",
"# TODO: Median price of the data\n",
"median_price = None\n",
"median_price = np.median(prices)\n",
"\n",
"# TODO: Standard deviation of prices of the data\n",
"std_price = None\n",
"std_price = np.std(prices)\n",
"\n",
"# Show the calculated statistics\n",
"print(\"Statistics for Boston housing dataset:\\n\")\n",
Expand Down Expand Up @@ -657,7 +679,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.7.2"
}
},
"nbformat": 4,
Expand Down