xraypy / xraylarch

Larch: Applications and Python Library for Data Analysis of X-ray Absorption Spectroscopy (XAS, XANES, XAFS, EXAFS), X-ray Fluorescence (XRF) Spectroscopy and Imaging, and more.
https://xraypy.github.io/xraylarch
Other
127 stars 62 forks source link

Error message from lasso_train #500

Closed joelager closed 3 months ago

joelager commented 4 months ago

Running the example code from https://github.com/xraypy/xraylarch/tree/master/examples/xanes but with lasso_train instead of pls_train

 lasso_model = lasso_train(groups, arrayname='norm', varname='valence',
                          xmin=5430.0, xmax=5580.0, alpha=0.01,
                           fit_intercept=True, normalize=True)

Error message: TypeError: LassoLars.init() got an unexpected keyword argument 'normalize'

This worked in previous versions but seems not to work in v0.9.74

newville commented 4 months ago

@joelager Thanks - I'll look into that. I guess that there was some change in scikit-learn Lasso or LassoLars that we need to fix.

joelager commented 4 months ago

Yes, there has been a change:

Deprecated since version 1.0: normalize was deprecated in version 1.0 and will be removed in 1.2.

newville commented 4 months ago

@joelager Ah, yes, I see that too... not sure how long that has been a problem! But, it also looks pretty straightforward to fix.