Business Intelligence Tools / Data Science & Analytics

Spotfire Troubleshooting — Fixing a Bug in Spotfire Logistic Regression Modeling

Two weeks ago, I published a Linear and Logistic Regression template on that can be found here.  When I built the template, my process was as follows:

  1. Add test and training data sets
  2. Build model on training data set
  3. Insert predicted column based on model in test data set

When following this process for the logistic regression model (a classification model), it inserts two columns of data — ProbPrediction and ClassPrediction.  These two columns give a prediction and a probability.  I noticed that some records contained a value for the ClassPrediction but not the ProbPrediction, which seemed odd.  This happened in records where one or more of my predictor columns were null, in which case, neither column should have been populated.

It turns out that this is a bug that can be fixed with the steps below.

  1. Go to the Tools menu and select TERR Tools
  2. Click the Launch TERR Console button
  3. Type getOption(“repos”)
  4. Type install.packages(“SpotfireStats”)
  5. Type q() to exit the program
  6. Close the program and relaunch

See below for a screen shot of the console.

After I relaunched Spotfire and reran the model, I saw consistent population of the ProbPrediction and ClassPrediction columns.  If you have any questions, feel free to contact me at

Leave a Reply

Your email address will not be published. Required fields are marked *