Predict response variable for new data given a lb object
# S3 method for lb
predict(object, newx, t, type = c("fit", "coefficients"), ...)
lb object
New data matrix that each row is a data or a vector. If missing, type switched to coefficients
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.
To predict response of newx or just fit coeffients on the path.
Additonal arguments for generic predict.
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.
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