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 121 forks source link

Using user defined functions with a fittable parameter in MARS #167

Closed Fish-Soup closed 6 years ago

Fish-Soup commented 6 years ago

Hi I was wondering if the following feature was included or could be included in MARS. to explain the above let me give an example. If I am simulating gas demand I know this depends on the temperature. However it also depends on the temperature in the past as buildings have a heat island effect.

If in have hourly data of the temperature I could pass every hour for say the last week into MARS. But this would be slow. I also know that more recent temperatures should matter more. It would be nice if I could say set a function that weights the temperature with an exponential decay. But have MARS fit the rate of this decay. I can thinking other examples where the user might be able to provide insight in the model rather than forcing MARS TO derive everything. Is something like the above possible?