Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
14 views
1 page
Shul Code
Uploaded by
Vedant Gade
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download
Save
Save shul code For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
0 ratings
0% found this document useful (0 votes)
14 views
1 page
Shul Code
Uploaded by
Vedant Gade
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save shul code For Later
Share
0%
0% found this document useful, undefined
0%
, undefined
Print
Embed
Report
Download
Save shul code For Later
You are on page 1
/ 1
Search
Fullscreen
#Real estate prices prediction
#import necessary libraries
library(ggplot2)
#Load CSV data
raw_data <- read.csv("C:\\Users\\Bobby\\Downloads\\data.csv")
data <- head(raw_data, 1000)
#printing columns
colnames(data)
#Summary of data
summary(data)
str(data)
#plotting using ggplot2
ggplot(data, mapping = aes(x = yr_built, y = price, grouping(sqft_living), color =
price)) + geom_bar(inherit.aes = TRUE) + labs(title = "Comparison of year vs price:
")
ggplot(data, mapping = aes(x = yr_built, y = price, grouping(sqft_living), color =
price)) + geom_bar() + labs(title = "Comparison of year vs price: ")
ggplot(data, mapping = aes(x = yr_built, y = price, color = price)) +
geom_bar(stat = "identity") + labs(title = "Comparison of year vs price: ")
linear_model <- lm(price ~ yr_built + bedrooms + sqft_lot)
linear_model <- lm(price ~ yr_built + bedrooms + sqft_lot, data = data)
linear_model
#Summary of linear regression model
summary(linear_model)
predictions <- predict(linear_model, newdata = data.frame(yr_built =
c(head(data$yr_built, -50)), bedrooms = c(head(data$bedrooms, -50)), sqft_lot =
c(head(data$sqft_lot, -50))))
plot(data$yr_built, data$price, xlab = "Year Built", ylab = "Price", main =
"Scatter Plot of Year Built vs. Price")abline(linear_model, col = "red")
plot(data$yr_built, data$price, xlab = "Year Built", ylab = "Price", main =
"Scatter Plot of Year Built vs. Price")abline(linear_model, col = "red")
plot(data$yr_built, data$price, xlab = "Year Built", ylab = "Price", main =
"Scatter Plot of Year Built vs. Price")
abline(linear_model, col = "red")
library(scatterplot3d)
install.packages('scatterplot3d')
library(scatterplot3d)
scatterplot3d(data$yr_built, data$bedrooms, data$price, color = "red", main = "3D
Scatter Plot")
install.packages('rgl')
library(rgl)
plot3d(data$yr_built, data$bedrooms, data$sqft_lot, data$price, col = "red", type =
"s", size = 0.5, xlab = "Year Built", ylab = "Bedrooms", zlab = "Sqft Lot", main =
"Contour Plot")
library(rgl)
plot3d(data$yr_built, data$bedrooms, data$sqft_lot, data$price, col = "red", type =
"s", size = 0.5, xlab = "Year Built", ylab = "Bedrooms", zlab = "Sqft Lot", main =
"Contour Plot")
plot3d(data$yr_built, data$bedrooms, data$sqft_lot, data$price, col = "red", type =
"s", size = 0.5, xlab = "Year Built", ylab = "Bedrooms", zlab = "Sqft Lot", main =
"Contour Plot")
plot(linear_model, which = 1) # Residuals vs. Fitted
You might also like
Project Report ME-315 Machine Learning in Practice: Sebastian Perez Viegener LSE ID:201870983 July 3, 2019
PDF
No ratings yet
Project Report ME-315 Machine Learning in Practice: Sebastian Perez Viegener LSE ID:201870983 July 3, 2019
15 pages
Comparing Linear Regression and Decision Trees For Housing Price Prediction
PDF
No ratings yet
Comparing Linear Regression and Decision Trees For Housing Price Prediction
8 pages
R Markdown File Mid
PDF
No ratings yet
R Markdown File Mid
13 pages
Real Estate Price Prediction Based On Linear Regre
PDF
No ratings yet
Real Estate Price Prediction Based On Linear Regre
10 pages
Library Management System Using C
PDF
No ratings yet
Library Management System Using C
5 pages
House Price Prediction
PDF
No ratings yet
House Price Prediction
14 pages
Aaaaaaaaaanotdone
PDF
No ratings yet
Aaaaaaaaaanotdone
7 pages
STAT511 HW4 Solution Draft
PDF
No ratings yet
STAT511 HW4 Solution Draft
30 pages
Stat511 - HW4
PDF
No ratings yet
Stat511 - HW4
31 pages
Home Construction
PDF
No ratings yet
Home Construction
8 pages
R Lab 1
PDF
No ratings yet
R Lab 1
5 pages
2) Front Pages
PDF
No ratings yet
2) Front Pages
11 pages
Price Prediction
PDF
No ratings yet
Price Prediction
4 pages
Muhammad Muneeb Arshad (359126) Im DVM
PDF
No ratings yet
Muhammad Muneeb Arshad (359126) Im DVM
5 pages
Seminar - 1 2
PDF
No ratings yet
Seminar - 1 2
14 pages
Assignment 4: Chitresh Kumar
PDF
No ratings yet
Assignment 4: Chitresh Kumar
7 pages
R 9. Regression
PDF
No ratings yet
R 9. Regression
7 pages
Boston Housing - Prediction of House Price - by Harsh - Medium
PDF
No ratings yet
Boston Housing - Prediction of House Price - by Harsh - Medium
14 pages
Codes
PDF
No ratings yet
Codes
8 pages
Q18 - Consumer Survey Data
PDF
No ratings yet
Q18 - Consumer Survey Data
2 pages
Min Max Mean SD : Set - Seed
PDF
No ratings yet
Min Max Mean SD : Set - Seed
1 page
Set 2
PDF
No ratings yet
Set 2
19 pages
Regrassion Analysis Lab Question and Answer
PDF
No ratings yet
Regrassion Analysis Lab Question and Answer
13 pages
Document From Jahnavi
PDF
No ratings yet
Document From Jahnavi
20 pages
Expt 7
PDF
No ratings yet
Expt 7
3 pages
Problem Set 3: General Guideline
PDF
No ratings yet
Problem Set 3: General Guideline
12 pages
Linear Regression - Jupyter Notebook
PDF
No ratings yet
Linear Regression - Jupyter Notebook
2 pages
Machine Learning Project: TITLE: Predicting The Sale Price of A House Using Linear Regression
PDF
No ratings yet
Machine Learning Project: TITLE: Predicting The Sale Price of A House Using Linear Regression
20 pages
Multiple Regression
PDF
No ratings yet
Multiple Regression
7 pages
Shub Neet DT
PDF
No ratings yet
Shub Neet DT
12 pages
Ex No 7
PDF
No ratings yet
Ex No 7
10 pages
AS1 GCS200400 TranTrungTien BI
PDF
No ratings yet
AS1 GCS200400 TranTrungTien BI
44 pages
Problem Statement
PDF
No ratings yet
Problem Statement
6 pages
R Lab 3
PDF
No ratings yet
R Lab 3
7 pages
Data Analysis Project MAIN
PDF
No ratings yet
Data Analysis Project MAIN
6 pages
Pa Da1
PDF
No ratings yet
Pa Da1
17 pages
Objects and Layers
PDF
No ratings yet
Objects and Layers
18 pages
Wang 2021
PDF
No ratings yet
Wang 2021
5 pages
Assignment3 A20
PDF
No ratings yet
Assignment3 A20
3 pages
Ads Lab8
PDF
No ratings yet
Ads Lab8
5 pages
Phase 5
PDF
No ratings yet
Phase 5
5 pages
Data Scinece Practical File
PDF
No ratings yet
Data Scinece Practical File
23 pages
Advanced Regression Techniques Based Housing Price Prediction Model
PDF
No ratings yet
Advanced Regression Techniques Based Housing Price Prediction Model
11 pages
AIML
PDF
No ratings yet
AIML
5 pages
YuanLishun Project2019
PDF
No ratings yet
YuanLishun Project2019
18 pages
Coding
PDF
No ratings yet
Coding
7 pages
R Programs 2024-2025
PDF
No ratings yet
R Programs 2024-2025
13 pages
New Opendocument Text
PDF
No ratings yet
New Opendocument Text
7 pages
Oral Presentation
PDF
No ratings yet
Oral Presentation
9 pages
Project1 Report1
PDF
No ratings yet
Project1 Report1
3 pages
Predicting House Prices Using Regression Techniques: Problem Statement: Problems Faced During Buying A House
PDF
No ratings yet
Predicting House Prices Using Regression Techniques: Problem Statement: Problems Faced During Buying A House
20 pages
CSIC 6132 排版870 878
PDF
No ratings yet
CSIC 6132 排版870 878
9 pages
Introduction To Machine Learning (ML) With Sklearn
PDF
No ratings yet
Introduction To Machine Learning (ML) With Sklearn
10 pages
Win Bugs
PDF
No ratings yet
Win Bugs
10 pages
Phase 2 Irfan
PDF
No ratings yet
Phase 2 Irfan
5 pages
Lab 3 - Linear Regression
PDF
No ratings yet
Lab 3 - Linear Regression
15 pages
Anbuselvan Phase2
PDF
No ratings yet
Anbuselvan Phase2
5 pages
Report On Linear Regression Using R
PDF
No ratings yet
Report On Linear Regression Using R
15 pages
House Pricing Regression
PDF
No ratings yet
House Pricing Regression
11 pages
House Pricing Prediction System
PDF
No ratings yet
House Pricing Prediction System
36 pages
Micro Project: Ajeenkya D. Y. Patil School of Engineering (Second Shift Polytechnic)
PDF
No ratings yet
Micro Project: Ajeenkya D. Y. Patil School of Engineering (Second Shift Polytechnic)
10 pages
Micro Project: Dr. D. Y. Patil School of Engineering (Second Shift Polytechnic)
PDF
No ratings yet
Micro Project: Dr. D. Y. Patil School of Engineering (Second Shift Polytechnic)
9 pages
Assignment 2
PDF
No ratings yet
Assignment 2
19 pages
MML Chinmay
PDF
No ratings yet
MML Chinmay
10 pages
MML-2 Practicals
PDF
No ratings yet
MML-2 Practicals
14 pages
An If
PDF
No ratings yet
An If
9 pages
1
PDF
No ratings yet
1
3 pages
1.write The Structure Declaration in C With Suitable Example
PDF
No ratings yet
1.write The Structure Declaration in C With Suitable Example
2 pages
Determinants How To Solve 3 3 Determants 1 2 - 1 0 4 1 1 3 4
PDF
No ratings yet
Determinants How To Solve 3 3 Determants 1 2 - 1 0 4 1 1 3 4
2 pages
Essential n8n Playbook
From Everand
Essential n8n Playbook
Leandro Calado
No ratings yet