kc_house_data {MAVE}R Documentation

House price in King County, USA

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

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])

[Package MAVE version 1.3.11 Index]