kearnz / autoimpute

Python package for Imputation Methods
MIT License
237 stars 19 forks source link

Fix for sklearn 1.0, regarding the initialisation error #73

Closed bramiozo closed 2 years ago

bramiozo commented 2 years ago

In imputations.series lrd and pmm the following should be changed in the init to fix the initialisation errors

Now it has

self.lm = LinearRegression(
            self.fit_intercept,
            self.normalize,
            self.copy_x,
            self.n_jobs,
        )

but it should be

self.lm = LinearRegression(
            fit_intercept=self.fit_intercept,
            normalize=self.normalize,
            copy_X=self.copy_x,
            n_jobs=self.n_jobs,
        )

Note: I did no rigorous check to verify these are the only locations where this init takes place.

Thanks for this very useful library :))

kearnz commented 2 years ago

Great, this may be the init issue causing errors in a few other issues, so going to test shortly and deploy a fix.

Glad the repository is helpful for you!

kearnz commented 2 years ago

made these changes and tested w/ github actions. All tests passed (although there are some warnings). Let me know if good to go on your end. Closing the issue for now but feel free to reopen!