Variables with Python Forecasting

Is there a way to use variables with a Python forecast model like ARIMA or Random Forest?


I have a linear regression working, and I'm able to extract the coefficients, create variables, and use a Beast Mode calculation to generate a forecast. However, I'm unsure if this can be done with models that aren’t linear.


Ideally, I'd like the user to input their exogenous/explanatory variables and see a forecast at the dashboard level. Has anyone done something similar?

Answers

  • You should be able to use the Python tile to use Domo inputs or filtering. Run something like

    from statsmodels.tsa.arima.model import ARIMA


    y = your_time_series
    X = your_exogenous_variable


    model = ARIMA(y, exog=X, order=(p, d, q))

    model_fit = model.fit()


    forecast = model_fit.forecast(steps=10, exog=user_input_exog)

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • Um…I did not put those numbers on that code. Hmm.

    ** Was this post helpful? Click Agree or Like below. **
    ** Did this solve your problem? Accept it as a solution! **

  • I have a dataset and the model working right now, but the problem is getting input on the dashboard side of things.

    If I create a webform I can create my own forecasts, but I'd like to be able to visualize that and incorporate variables so the user can see impact in real-time