scikit-learn-contrib / py-earth

A Python implementation of Jerome Friedman's Multivariate Adaptive Regression Splines
http://contrib.scikit-learn.org/py-earth/
BSD 3-Clause "New" or "Revised" License
455 stars 122 forks source link

Different Regularization Options? #90

Closed smrtslckr closed 8 years ago

smrtslckr commented 8 years ago

Glad to see MARS getting prepped for SciKit-Learn. I was just curious if the MARS algorithm can be easily modified to accept different regularization schemes instead of GCV with MSE potentially? Just an inquiry.

jcrudy commented 8 years ago

@Erstwild There are two stages in constructing a MARS model. First is the forward pass, which relies on mean squared error to compute knot locations for new terms. The forward pass has to use mean squared error for computational reasons. Then is the pruning pass, in which terms are removed based on GCV. It would be possible to substitute another loss function for GCV in the pruning pass, although this is not currently implemented in py-earth (but see issue #47). If you just want mean squared error instead of GCV, set enable_pruning=False in the Earth constructor to skip the pruning pass.

jcrudy commented 8 years ago

Closing this issue as I think the question is answered.