Description Usage Arguments Value Examples
predict
method for lookupTable
objects
1 2 |
object |
a fitted lookupTable object |
newdata |
data.frame from which to evaluate predictions |
newparams |
new parameters to use in evaluating predictions |
... |
optional additional parameters. None are used at present. |
a numeric vector of predicted values
1 2 3 4 5 6 7 | df.input <- cars
response <- 'dist'
feature.boundaries <- list(c(-Inf, 5, 10, 15, 20, 25, Inf))
features.con <- c('speed')
dist.table <- lookupTable(df.input, response, feature.boundaries, features.con)
df.test <- data.frame(speed = c(2, 23, 41, 5, 9, 8))
predict(dist.table, df.test)
|
Loading required package: data.table
[1] 6.00000 82.85714 38.27395 18.57143 18.57143 18.57143
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.