predict.lb {Libra} | R Documentation |
Predict method for lb objects
Description
Predict response variable for new data given a lb object
Usage
## S3 method for class 'lb'
predict(object, newx, t, type = c("fit", "coefficients"), ...)
Arguments
object |
lb object |
newx |
New data matrix that each row is a data or a vector. If missing, type switched to coefficients |
t |
The parmeter for object to determin which coeffiecients used for prediction. Linear interpolation is used if t is not in object\$t. If missing, all the coeffiecients along the path is used to predict. |
type |
To predict response of newx or just fit coeffients on the path. |
... |
Additonal arguments for generic predict. |
Details
The default plot uses the fraction of L1 norm as the x. For multinomial case, the sum of absolute values of different class's coefficients are caculated to represent each variable. The intercept term is not ploted
Value
A list containing t and other variables. For type="fit", the rediction response "fit" is returned. For "binomial", a vector of the probabilities for newx falling into class +1 is redurned. For "multinomial", a matrix with each column means the probabilities for newx falling into the corresponding class. If type="coefficients" coefficients "beta" and intercepts "a0" are returned.
Author(s)
Feng Ruan, Jiechao Xiong and Yuan Yao