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
Shul Code
Uploaded by
Vedant Gade
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download now
Download
Save shul code For Later
Download
Save
Save shul code For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
14 views
Shul Code
Uploaded by
Vedant Gade
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
Download now
Download
Save shul code For Later
Carousel Previous
Carousel Next
Save
Save shul code For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
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
Advanced Regression Techniques Based Housing Price Prediction Model
PDF
No ratings yet
Advanced Regression Techniques Based Housing Price Prediction Model
11 pages
MUNAR - Linear Regression - Ipynb - Colaboratory
PDF
No ratings yet
MUNAR - Linear Regression - Ipynb - Colaboratory
30 pages
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
aaaaaaaaaanotdone
PDF
No ratings yet
aaaaaaaaaanotdone
7 pages
Problem Set 3: General Guideline
PDF
No ratings yet
Problem Set 3: General Guideline
12 pages
Q18 - Consumer Survey Data
PDF
No ratings yet
Q18 - Consumer Survey Data
2 pages
wang2021
PDF
No ratings yet
wang2021
5 pages
R Markdown File Mid
PDF
No ratings yet
R Markdown File Mid
13 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
House Price Prediction
PDF
No ratings yet
House Price Prediction
14 pages
STAT511HW4SolutionDraft
PDF
No ratings yet
STAT511HW4SolutionDraft
30 pages
New Opendocument Text
PDF
No ratings yet
New Opendocument Text
7 pages
Data Analysis Project MAIN
PDF
No ratings yet
Data Analysis Project MAIN
6 pages
Ex No 7
PDF
No ratings yet
Ex No 7
10 pages
seminar_1 2
PDF
No ratings yet
seminar_1 2
14 pages
Report On Linear Regression Using R
PDF
No ratings yet
Report On Linear Regression Using R
15 pages
CSIC 6132 排版870 878
PDF
No ratings yet
CSIC 6132 排版870 878
9 pages
Assignment3 A20
PDF
No ratings yet
Assignment3 A20
3 pages
Regrassion Analysis Lab Question and Answer
PDF
No ratings yet
Regrassion Analysis Lab Question and Answer
13 pages
R Lab 1
PDF
No ratings yet
R Lab 1
5 pages
f3683849-7ca6-4854-8f96-af11b6e837ec
PDF
No ratings yet
f3683849-7ca6-4854-8f96-af11b6e837ec
20 pages
242-44-001-Q-3
PDF
No ratings yet
242-44-001-Q-3
6 pages
AIML
PDF
No ratings yet
AIML
5 pages
Oral Presentation
PDF
No ratings yet
Oral Presentation
9 pages
Price Prediction
PDF
No ratings yet
Price Prediction
4 pages
AS1 GCS200400 TranTrungTien BI
PDF
No ratings yet
AS1 GCS200400 TranTrungTien BI
44 pages
R Lab 3
PDF
No ratings yet
R Lab 3
7 pages
Home Construction
PDF
No ratings yet
Home Construction
8 pages
Introduction To Machine Learning (ML) With Sklearn
PDF
No ratings yet
Introduction To Machine Learning (ML) With Sklearn
10 pages
House Pricing Regression
PDF
No ratings yet
House Pricing Regression
11 pages
STAT511---HW4
PDF
No ratings yet
STAT511---HW4
31 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
Real Estate Price Prediction Based On Linear Regre
PDF
No ratings yet
Real Estate Price Prediction Based On Linear Regre
10 pages
set 2
PDF
No ratings yet
set 2
19 pages
Muhammad Muneeb Arshad (359126) Im DVM
PDF
No ratings yet
Muhammad Muneeb Arshad (359126) Im DVM
5 pages
Expt 7
PDF
No ratings yet
Expt 7
3 pages
Multiple Regression
PDF
No ratings yet
Multiple Regression
7 pages
nw
PDF
No ratings yet
nw
1 page
Objects and Layers
PDF
No ratings yet
Objects and Layers
18 pages
Phase 5
PDF
No ratings yet
Phase 5
5 pages
Document From Jahnavi
PDF
No ratings yet
Document From Jahnavi
20 pages
2) Front Pages
PDF
No ratings yet
2) Front Pages
11 pages
Assignment 4: Chitresh Kumar
PDF
No ratings yet
Assignment 4: Chitresh Kumar
7 pages
Codes
PDF
No ratings yet
Codes
8 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
Shub Neet Dt
PDF
No ratings yet
Shub Neet Dt
12 pages
Win Bugs
PDF
No ratings yet
Win Bugs
10 pages
House Pricing Prediction System
PDF
No ratings yet
House Pricing Prediction System
36 pages
R 9. Regression
PDF
No ratings yet
R 9. Regression
7 pages
PA DA1
PDF
No ratings yet
PA DA1
17 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
Lab 3 - Linear Regression
PDF
No ratings yet
Lab 3 - Linear Regression
15 pages
Summer Internship Outlook
PDF
No ratings yet
Summer Internship Outlook
35 pages
Simple Linear Regression
PDF
No ratings yet
Simple Linear Regression
4 pages
Stats Assignment - Solution - Updated
PDF
No ratings yet
Stats Assignment - Solution - Updated
5 pages
Essential n8n Playbook
From Everand
Essential n8n Playbook
Leandro Calado
No ratings yet
No Ph.D. Game Design With Three.js
From Everand
No Ph.D. Game Design With Three.js
Nikiforos Kontopoulos
No ratings yet
656
PDF
No ratings yet
656
2 pages
Assignment 2
PDF
No ratings yet
Assignment 2
19 pages
1
PDF
No ratings yet
1
3 pages
An if
PDF
No ratings yet
An if
9 pages
11
PDF
No ratings yet
11
2 pages
MML-2 Practicals
PDF
No ratings yet
MML-2 Practicals
14 pages
MML Chinmay
PDF
No ratings yet
MML Chinmay
10 pages
Library Management System Using C
PDF
No ratings yet
Library Management System Using C
5 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