Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Extrapolation Errors when predicting #181

Open
Fish-Soup opened this issue Jun 7, 2018 · 2 comments
Open

Extrapolation Errors when predicting #181

Fish-Soup opened this issue Jun 7, 2018 · 2 comments

Comments

@Fish-Soup
Copy link

Hi I am currently trying to forecast a the power usage of a portfolio. This portfolio is made up of 1000 sites. I have fitted 1000 MARS models to this data, regularized using Elastic Net. Normally this works well.

Sometimes I have missing data over parts of my phase space. This means that sometimes the MARS model produces ridiculously numbers (sometimes) over this range. MARS can obviously extrapolate with a polynomial and the model will be poorly constrained in this region.

As I am aggregating the 1000 models the chance of this happening in one of them isn't insignificant. Currently I look at the min and max y values and limit the output by some multiple of this. This stops a site producing ridiculous numbers but smaller errors are hard for me to see.

Do we have any way of testing how volatile MARS is at a given point in phase space? I'm also not totally sure what I would do with the prediction if i found this to be true. Any ideas

Many thanks

Simon

@jcrudy
Copy link
Collaborator

jcrudy commented Jun 7, 2018

@Fish-Soup If you want to quantify volatility, you can probably come up with something based on the predict_deriv method of the fitted Earth model. It returns the gradient of your model at whatever points you pass in. There's a usage example for predict_deriv here: https://contrib.scikit-learn.org/py-earth/auto_examples/plot_derivatives.html#sphx-glr-auto-examples-plot-derivatives-py

@Fish-Soup
Copy link
Author

Cheers thanks for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants