Last active
September 14, 2017 07:15
-
-
Save mmuratarat/ee5bcb76b20ece6b117e177f2b6b1c9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
housing <- read.csv("https://goo.gl/eYbv9F", | |
header = TRUE, | |
sep = "," ) | |
normalized <- apply(housing[ , -3 ], 2, scale) | |
normalized_data <- data.frame(cbind(normalized, price = housing$price)) | |
model <- lm( price ~ ., data = normalized_data) | |
model | |
# | |
#Call: | |
# lm(formula = price ~ ., data = normalized_data) | |
# | |
#Coefficients: | |
# (Intercept) area bedrooms | |
# 340413 110631 -6649 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment