predict.BT | R Documentation |
BT
" object.Similar to other predict methods, this function predicts fitted values and computes coefficients
from a fitted "BT
" object.
## S3 method for class 'BT' predict( object, newx, s = NULL, iter = NULL, type = c("response", "coefficients"), ... ) ## S3 method for class 'BT' coef(object, s = NULL, iter = NULL, ...)
object |
fitted " |
newx |
matrix of new values of design matrix at which predictions are to be made. Ignored
when |
s |
value of the penalty parameter at which predictions are required. If the value
is not one of the |
iter |
iteration at which predictions are required. Default is the entire sequence
of iterations in |
type |
of prediction required. Type " |
... |
not used. Other arguments to |
Either a vector of predictions or, if either s
or iter
are NULL
,
a three-dimensional array with last two dimensions indexing different lambda
values and
iterations.
x <- matrix(rnorm(100*250), 100, 250) y <- x[, 1] + x[, 2] - x[, 1]*x[, 2] + x[, 3] + rnorm(100) out <- LassoBT(x, y, iter_max=10) predict(out, newx=x[1:2, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.