On Fri, Feb 15, 2013 at 01:28:43PM +0100, Charles-Pierre Astolfi wrote: > Just choose the alpha (from a fixed set) that minimizes the RMSE of > the prediction of the last time step (or the last n time steps with > exponential decay). Maybe I'm mistaken but there's no easy way to do > that with LassoLarsCV.
In my opinion, I am not sure that you want an interpolator that interpolate the model parameters for specific alphas. You may want to compute the RMSE at the knots of the path, because I think that this is where they will be the minimum that you are looking for. If for some reason you need to interpolate to specific alphas, it might be a good strategy to compute the square norm of residuals, and interpolate this (this square norm will also be linear between the knots). This is basically the mechanism behind LassoLarsCV. I believe that something like sklearn.linear_model.least_angle._lars_path_residues might help you achieve what you want. Note that it is a private function; in other words we are not garanteeing that it will not change, and that it's API will remain the same. This is on purpose, see below. Your answer comforts me with my opinion that we _do not want_ to provide the function that you are asking for. It is much easier to write such function (just a simple matter of using scipy.interpolate.interp1d) than to use it wisely. I don't believe that the difficulty is in writing this function, and I believe that anybody who has the need for it, also has specificities related to this need, and can/should code it himself. Most importantly, I don't want to add yet another function to the already very rich codebase of scikit-learn's linear models because I worry about the maintenance issues, and the multiplication of entry points that make things harder to grasp for users. Now, that said, I think that we could do a better job pushing users towards the solution that you are proposing, which is a good one. I will improve the docstring of lasso_path to suggest this solution to users. Thanks a lot for your feedback, Gaƫl ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ Scikit-learn-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
