Skip to content

Commit

Permalink
More robust against model wo any active predictors
Browse files Browse the repository at this point in the history
  • Loading branch information
operdeck committed Sep 26, 2023
1 parent 7a81035 commit f648ce6
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions examples/datamart/modelreport.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ params:
modeldescription:
# Optional model description typically corresponding to the model info of the indicated model
value: "Sales Model - PSDISCOUNT100"

modelid:
# Model ID that is used to filter the predictor binning table data. If the
# binning data only contains a single Model ID it can be left empty.
Expand Down Expand Up @@ -301,11 +302,15 @@ to the text before the first dot. This can be customized when reading the data
for a particular customer.

```{r Predictor Category, message=FALSE, warning=FALSE}
plotPredictorImportance(datamart, categoryAggregateView = T) +
# same palette as health check
scale_fill_discrete_qualitative(palette="Dark 3", drop=T, guide="none") +
ylab("Predictor Category") +
scale_x_continuous(limits=c(50, NA), name="Average Univariate Performance")
if (any(datamart$predictordata$EntryType == "Active")) {
plotPredictorImportance(datamart, categoryAggregateView = T) +
# same palette as health check
scale_fill_discrete_qualitative(palette="Dark 3", drop=T, guide="none") +
ylab("Predictor Category") +
scale_x_continuous(limits=c(50, NA), name="Average Univariate Performance")
} else {
cat("No active predictors", fill=T)
}
```

# Predictor Overview
Expand Down

0 comments on commit f648ce6

Please sign in to comment.