The document outlines a process for performing linear regression analysis on a house price dataset using Python in Google Colab. It includes steps for data preparation, model training, and evaluation metrics such as Mean Squared Error (MSE) and R squared value. Additionally, it provides a visualization of the dataset and predictions for house prices based on size.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
6 views
Linear Regression.py
The document outlines a process for performing linear regression analysis on a house price dataset using Python in Google Colab. It includes steps for data preparation, model training, and evaluation metrics such as Mean Squared Error (MSE) and R squared value. Additionally, it provides a visualization of the dataset and predictions for house prices based on size.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2
#Step1.
Remove blank row and columns
#Step2. File save as CSV #Step3. Upload it on colab file upload #Step4. Run the command import os print(os.listdir()) # Lists all files in current directory import os print(os.getcwd()) # Prints current working directory import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_squared_error import math from google.colab import files uploaded = files.upload() # Use the UI to select your file dataset = pd.read_csv('Dataset_House_Price.csv')