{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "62905e89-ec59-4c77-a045-890061dbc45f", "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": 2, "id": "978571c2-aaaf-46f9-a355-da5ded8aa14b", "metadata": {}, "outputs": [], "source": [ "df = pd.read_csv(\"Melbourne_housing_FULL.csv\")" ] }, { "cell_type": "code", "execution_count": 3, "id": "72a45ce1-95c4-4de9-a112-26ce25b0ef63", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Index(['Suburb', 'Address', 'Rooms', 'Type', 'Price', 'Method', 'SellerG',\n", " 'Date', 'Distance', 'Postcode', 'Bedroom2', 'Bathroom', 'Car',\n", " 'Landsize', 'BuildingArea', 'YearBuilt', 'CouncilArea', 'Lattitude',\n", " 'Longtitude', 'Regionname', 'Propertycount'],\n", " dtype='object')" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.columns" ] }, { "cell_type": "code", "execution_count": 4, "id": "c8559c7e-59ab-43e7-940a-c0eafe1fdb38", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Suburb | \n", "Address | \n", "Rooms | \n", "Type | \n", "Price | \n", "Method | \n", "SellerG | \n", "Date | \n", "Distance | \n", "Postcode | \n", "... | \n", "Bathroom | \n", "Car | \n", "Landsize | \n", "BuildingArea | \n", "YearBuilt | \n", "CouncilArea | \n", "Lattitude | \n", "Longtitude | \n", "Regionname | \n", "Propertycount | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "Abbotsford | \n", "68 Studley St | \n", "2 | \n", "h | \n", "NaN | \n", "SS | \n", "Jellis | \n", "3/09/2016 | \n", "2.5 | \n", "3067.0 | \n", "... | \n", "1.0 | \n", "1.0 | \n", "126.0 | \n", "NaN | \n", "NaN | \n", "Yarra City Council | \n", "-37.8014 | \n", "144.9958 | \n", "Northern Metropolitan | \n", "4019.0 | \n", "
1 | \n", "Abbotsford | \n", "85 Turner St | \n", "2 | \n", "h | \n", "1480000.0 | \n", "S | \n", "Biggin | \n", "3/12/2016 | \n", "2.5 | \n", "3067.0 | \n", "... | \n", "1.0 | \n", "1.0 | \n", "202.0 | \n", "NaN | \n", "NaN | \n", "Yarra City Council | \n", "-37.7996 | \n", "144.9984 | \n", "Northern Metropolitan | \n", "4019.0 | \n", "
2 | \n", "Abbotsford | \n", "25 Bloomburg St | \n", "2 | \n", "h | \n", "1035000.0 | \n", "S | \n", "Biggin | \n", "4/02/2016 | \n", "2.5 | \n", "3067.0 | \n", "... | \n", "1.0 | \n", "0.0 | \n", "156.0 | \n", "79.0 | \n", "1900.0 | \n", "Yarra City Council | \n", "-37.8079 | \n", "144.9934 | \n", "Northern Metropolitan | \n", "4019.0 | \n", "
3 | \n", "Abbotsford | \n", "18/659 Victoria St | \n", "3 | \n", "u | \n", "NaN | \n", "VB | \n", "Rounds | \n", "4/02/2016 | \n", "2.5 | \n", "3067.0 | \n", "... | \n", "2.0 | \n", "1.0 | \n", "0.0 | \n", "NaN | \n", "NaN | \n", "Yarra City Council | \n", "-37.8114 | \n", "145.0116 | \n", "Northern Metropolitan | \n", "4019.0 | \n", "
4 | \n", "Abbotsford | \n", "5 Charles St | \n", "3 | \n", "h | \n", "1465000.0 | \n", "SP | \n", "Biggin | \n", "4/03/2017 | \n", "2.5 | \n", "3067.0 | \n", "... | \n", "2.0 | \n", "0.0 | \n", "134.0 | \n", "150.0 | \n", "1900.0 | \n", "Yarra City Council | \n", "-37.8093 | \n", "144.9944 | \n", "Northern Metropolitan | \n", "4019.0 | \n", "
5 rows × 21 columns
\n", "LinearRegression()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
LinearRegression()
Lasso(alpha=0.1)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
Lasso(alpha=0.1)
Ridge(alpha=0.1, max_iter=1000)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
Ridge(alpha=0.1, max_iter=1000)