New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Measuring feature importance for additional regressors #361
Comments
That certainly sounds like a good approach to me. You could fit with and without, and then use the Besides that... If you are doing MCMC then you could see if the predictive distribution of the component for the additional regressor contains 0. Its If you're not doing MCMC, then it would be cheaper to just fit the model twice. Is there a particular reason for not wanting to remove the regressor for estimating its importance? |
Thanks for the quick reply. I got your points about CV and MCMC usage. I was kinda interested in something like interpretation of dependence between target and regressors. I'm not speaking about OLS style of thing with exact effects, but something like positive/negative impact would be cool or as you've mentioned some importance scale like in caret package. (I suppose my lack of understanding of GAM models may play a role in desiring impossible features, but still). |
That makes sense. In that case just looking at that component in the output of predict would be able to show what portion of yhat is coming from that regressor. With MCMC you could see uncertainty in that, otherwise you would still get a point estimate which could be qualitatively useful. |
This is a very interesting discussion. I am cross posting this question from another thread I had posted originally on. Is there a way to use spike and slab prior for variable selection using Prophet? Similar to the Bayesian structural time series approach (paper) for getting a parsimonious model? @bletham: The MCMC approach that you have suggested above seems to follow a similar approach. On reading the docs, it seems like a normal prior is used by default for regressors. But would using a prior that is designed to make a model parsimonious (like a spike and slab) be better? And if so, is it easy to code in? Would love to hear your thoughts. |
The bulk of the linear component of the model (the However, for the columns of X that do correspond to extra regressors, a sparse prior on their betas like spike and slab could make sense. If we had a bunch of extra regressors and believed that the relevant signal could be captured from just a few, then I'd expect this to work really well. I don't have much of a feeling for how most people are using extra regressors, but if this does sound useful to anyone I'd love to hear it. It would be pretty easy to test out since the prior is contained entirely in the stan code. Basically the prior here: |
In our specific use case, we have several time series that can roll up into hierarchies. We believe the outcome of one time-series can affect the other. To capture some of the interaction effects across them we want to test several versions of lagged variables of different time series for the target one. Additionally, we have some regressors for each of the time series, which we want to test and see if it interacts with other time series. This results in a lot of variables and we believe that only a few regressors should really trigger for each time series. I want add that vector autoregression or a hierarchical timeseries approach also seemed promising, but a simple time series approach with regressors seemed to be also worth giving a shot (especially given the robust implementations that are available for the latter :)). |
I'm working on a marketing project that tries to identity which of many activities (represented as separate time series) have a significant effect on sales. I'm looking to de-trend y and then see which extra regressors have a significant effect, and then use their co-efficients to tweak the marketing budget a bit. Feature importance of regressors, f.e. with regressor coefficients, would be a great addition to prophet :) |
I'm doing the exact same thing @timvink is, previously used the BRMS approach in R https://cran.r-project.org/web/packages/brms/brms.pdf |
Can Someone suggest me how can I do Vector Auto regressive with prophet |
Hello, I've read through multiple threads on this topic and have received some great insights. How can I observe the actual beta coefficients? I am working in R, and the [insert model name here]$params$beta will provide the beta coefficients but there is no names just column numbers [1-n]...is there a way to see which name corresponds with each beta coefficient? thanks! |
@nhernandez05 I think |
@bletham Would you be able to provide what the Python syntax would be to find these column names for the beta dataframe? |
@MaxBirdChemEng it's in |
@bletham : Why weekly seasonlaity has 6 coefficients? |
@bletham : Also how to handle outcome variable with high fluctuations? |
When adjusting for seasonality you always need a baseline in the season. For example, in a weekly seasonality adjustment you should only adjust for six days because your seventh is your baseline level. This is easier to grasp using dummy seasonality variables in a normal linear regression. If you are adding seasonality for months, you should only include eleven months of dummies as the twelfth is excluded to create a baseline. |
@timvink hey Tim, I read your approach above on the impact of marketing promos on the sales and was wondering how you utilized prophet for that activity, if ever? I am currently working on a similar project, tho the main goal is to understand the coeff impact of regressors on the y hat which is still not clear as none of the calculations are adding up to what I have in the data frame, I would like to know a bit more about your approach in your project? |
Cool to get a reply 4 years later :) i did not use prophet for that project in the end, but ended up writing my own R package (and innersourced it at my previous company so can't share). If you search 'mixed marketing modelling' |
Hi,
In one the last releases you've added feature with external regressors. Is there any possibility to estimate their impact on the target variable except training models with them and without them and comparing prediction accuracy on holdout set?
Thanks.
The text was updated successfully, but these errors were encountered: