Two weeks ago, I published a Linear and Logistic Regression template on Exchange.ai that can be found here. When I built the template, my process was as follows:
- Add test and training data sets
- Build model on training data set
- 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.
- Go to the Tools menu and select TERR Tools
- Click the Launch TERR Console button
- Type getOption(“repos”)
- Type install.packages(“SpotfireStats”)
- Type q() to exit the program
- 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 email@example.com.
Guest Spotfire blogger residing in Whitefish, MT. Working for SM Energy’s Advanced Analytics and Emerging Technology team!