Closed prockenschaub closed 4 years ago
Thanks for bringing this to our attention. As your example demonstrates, the predict
method of fit_hal
returns predictions for all lambdas specified in the original fit. Since it's easy to subset the matrix of predictions to those corresponding to lambdas of interest, our lambda
argument wouldn't add much useful functionality (even if it worked). Rather than have the predict
method interpolate / re-fit for lambdas not originally specified in the fit_hal
call, we'll just remove the lambda
argument to the predict.hal9001
method and require that users specify all lambdas of interest in the original call to fit_hal
. We'll resolve this in a PR shortly.
Resolved by #59
Issue
predict.hal9001
ignores thelambda
parameter and always shows predictions for all lambdas specified during fitting. Having had a cursory look at the source code,lambda
does not seem to be used at all inpredict.hal9001
but is used inpredict.lassi
.This is not clear from the documentation, and led to confusions in my case since it makes the
lambda
parameter redundant and diverges fromglmnet
's behaviour. There might be theoretical reasons behind this but it would good to remove this parameter in this case, or state this behaviour clearly in the manual if the parameter is needed for compatibility withpredict.lassi
.Reproducible example