kc_house_data: House price in King County, USA

Description Format Source Examples

Description

A data set contains 21613 obervations with 19 features plus house price. The names of the columns are given below.

Format

A data frame with 21613 rows and 19 variables

Source

https://www.kaggle.com/harlfoxem/housesalesprediction

Examples

1
2
3
4
5
6
7
8
data(kc_house_data)
#convert date in string to date in numeric value
kc_house_data[,2]=sapply(kc_house_data[,2],as.double)
train = sample(1:21613)[1:1000]
x.train = as.matrix(kc_house_data[train,c(2,4:21)]) #exclude id, house price
y.train = as.matrix(kc_house_data[train,3]) # house price
x.test  = as.matrix(kc_house_data[-train,c(2,4:21)])
y.test  = as.matrix(kc_house_data[-train,3])

Example output



MAVE documentation built on March 3, 2021, 1:12 a.m.