3 Replies Latest reply on Jan 2, 2020 10:22 AM by Nathan Mannheimer

    How to leverage Tabpy results across multiple sheets to avoid multiple runs of the python ML code?

    Paul Lu

      Dear community members,

       

      I have been having a blast at using Tabpy to run python functions that would extend Tableau's feature as far as your imaginations would go, absolutely loving it.

       

      However I ran into a problem. Here's a brief description of the problem.

       

      - I use Tabpy to execute ML / Random Forest Classifier to tell me rank of features importances (X) that influences my outcome (Y)

      - I then created 2 charts, Distribution & Boxplot, where I color legends distribution and split box plot columns by the returned X

       

      So my problem is, by applying the SCRIPT_STR calculation to both charts, it would run the calculation twice.

       

      Normally this wouldn't matter if most significant factor's importance outweighs 2nd most significant factor's importance by far, the result will be consistent in between the 2 calculations, thus the 2 plots (box & distribution) would match.

       

      However, if my most & 2nd most significant factors' importance levels are fairly close to each other, then the result would flip sometimes between the 2 calculations, leading to box plot & distribution being broken out by different features, thus mismatched.

       

      Will be amazing if someone can come up with a way to avoid re-calculations of fields across the sheets.