By checking the implementation this is apparently what is done in the
cython implementation of the sparse coordinate descent used for
Elastic Net:

https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/cd_fast.pyx#L227

the X_mean array is the mean of the training data precomputed by the
ElasticNet._pre_fit method. It is used internally to center the data
on the fly in the CD loop (instead of centering the data ahead of time
as done in the dense array case).

You can control the centering with `normalize=True` flag of the
ElasticNet class (or any other linear regression model).

-- 
Olivier

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to