jolars / slopecd

4 stars 2 forks source link

feat: add preprocessing function #37

Closed jolars closed 2 years ago

jolars commented 2 years ago

This PR adds a function preprocess that preprocess X and y. Zero variance features are removed from X. If X is sparse it is then we scale using MaxAbsScaler. If it is dense we scale using StandardScaler. y is centered and scaled by it's squared norm.

I'm not sure if we should handle y like this. Let me know what you think.

Maybe it makes more sense to put this function into the benchopt benchmark instead. What do you think?

jolars commented 2 years ago

Maybe it makes more sense to put this function into the benchopt benchmark instead. What do you think?

Yes, I think this makes more sense (replying to myself). I'll close this one and open a PR on the benchmark repo instead.