# NOT RUN {
library(mlbench)
data(BostonHousing)
## 1 committee and no instance-based correction, so just an M5 fit:
mod1 <- cubist(x = BostonHousing[, -14], y = BostonHousing$medv)
predict(mod1, BostonHousing[1:4, -14])
## now add instances
predict(mod1, BostonHousing[1:4, -14], neighbors = 5)
# }
Run the code above in your browser using DataCamp Workspace