hoxo-m / densratio_py

A Python Package for Density Ratio Estimation
https://github.com/hoxo-m/densratio_py
Other
127 stars 30 forks source link

Consider making densratio.density_ratio.DensityRatio pickable. #10

Open mierzejk opened 4 years ago

mierzejk commented 4 years ago

Contingent upon data volume, as well as cross validation parameters, computing densratio.RuLSIF.RuLSIF function outcome can take significant time. Yet the result might be reusable, hence valuable. It would be nice if the resulting densratio.density_ratio.DensityRatio object could be pickable, according to What can be pickled and unpickled? Currently there is a non top-level function that is a member of the object's, so trying to dump the pickle brings about the _Can't pickle local object 'RuLSIF.\<locals>.alpha_densityratio error.