predict.lazy | R Documentation |
Obtains predictions from a lazy learning object
## S3 method for class 'lazy' predict(object, newdata=NULL, t.out=FALSE, k.out=FALSE, S.out=FALSE, T.out=FALSE, I.out=FALSE, ...)
object |
Object of class inheriting from |
newdata |
Data frame (or matrix, vector, etc...) defining of the query points for which a prediction is to be produced. |
t.out |
Logical switch indicating if the function should return the parameters of the local models used to perform each estimation. |
k.out |
Logical switch indicating if the function should return the number of neighbors used to perform each estimation. |
S.out |
Logical switch indicating if the function should return the estimated variance of the prediction suggested by all the models identified for each query point. |
T.out |
Logical switch indicating if the function should return the parameters of all the models identified for each query point. |
I.out |
Logical switch indicating if the function should return
the index |
... |
Arguments passed to or from other methods. |
The output of the method is a list containing the following components:
h |
Vector of |
t |
Matrix of |
k |
Vector of |
S |
List of up to 3 components: Each component is a matrix containing an estimate, obtained through a leave-one-out cross-valication, of the variance of local models.
The component |
T |
List of up to 3 components:
REMARK: a translation of the axes is considered
which centers all the local models in the respective query
point. The component |
I |
Matrix of |
Mauro Birattari and Gianluca Bontempi
lazy
, lazy.control
library("lazy") data(cars) cars.lazy <- lazy(dist ~ speed, cars) predict(cars.lazy, data.frame(speed = seq(5, 30, 1)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.