Predicting Boston House Prices and Ionosphere Data Analysis with Machine Learning
Classified in Computers
Written on in English with a size of 5.24 KB
Boston Housing Data Analysis
library(mlbench)
install.packages("dplyr")
library(dplyr)
library(ggplot2)
library(reshape2)
data("BostonHousing")
housing <- BostonHousing
str(housing)
housing %>%
ggplot(aes(x = medv)) +
stat_density() +
labs(x = "Median Value ($1000s)", y = "Density", title = "Density Plot of Median Value House Price in Boston") +
theme_minimal()
summary(housing$medv)
housing %>%
select(c(crim, rm, age, rad, tax, lstat, medv)) %>%
melt( id.vars = "medv") %>%
ggplot(aes(x = value, y = medv, colour = variable)) +
geom_point(alpha = 0.7) +
stat_smooth(aes(colour = "black")) +
facet_wrap(~variable, scales = "free", ncol = 2) +
labs(x = "Variable Value", y = "Median House Price ($1000s)") +
theme_minimal(