2 Replies Latest reply on Sep 6, 2018 3:36 PM by Nathan Mannheimer

    Errors implementing ARIMA with TabPy

    Greg Rafferty

      Hi all,


      I've followed this tutorial in order to build an ARIMA model in Tableau using the Python integration. I've successfully connected Tableau and Python, it's in the actual modeling in step 4 that I'm having errors. In the python scripts shown in the tutorial, there are some indenting issues in the for loops which I've fixed. Everything appears to be fine but when I drag the Forecast pill to the Rows shelf, I get the error:


      Unable to complete action

      An error occurred while communicating with the TabPy Service.

      Error processing script

      ValueError : Insufficient degrees of freedom to estimate


      Please see the attached workbook for further details. When I run this exact code in a Jupyter notebook, it works fine. Does anyone know how to fix this error?

        • 1. Re: Errors implementing ARIMA with TabPy
          Patrick Van Der Hyde

          I have moved this thread to Tableau External Services area of the forums where support for TabPy is more easily found in the forums.



          • 2. Re: Errors implementing ARIMA with TabPy
            Nathan Mannheimer

            Hey Greg,


            This is actually a pretty simple fix! You are using datepart months, which bucket every date into a field that only contains the month value, ie January, February etc..This means that multiple years worth of data are aggregating to those buckets. What you want to do is use the datetrunc date field which truncates a date to the selected level but preserves it's context ie January 1960. When the ARIMA model is receiving the data from the bucketed date field, it is only getting 12 (one for each month) values which is two few to build a forecast. You can select the other date type by right clicking on the date field and selecting the second Month option. You can also then select whether you want the result to be discrete or continuous:


            This should allow your model to work correctly. I've attached a workbook with everything in place and the model working correctly.