Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
Damonamajor committed Aug 6, 2024
1 parent 0e35664 commit fd34055
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions analyses/shap_processing.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,19 @@ shap_df_filtered_long %>%
```{r violin_plots_shap_to_feature}
# Calculate the number of digits
num_digits <- card_individual %>%
pull({{target_feature_shap}}) %>%
pull({{ target_feature_shap }}) %>%
max(na.rm = TRUE) %>%
floor() %>%
as.character() %>%
str_length()
quantiles <- card_individual %>%
pull({{target_feature_shap}}) %>%
pull({{ target_feature_shap }}) %>%
quantile(c(0.025, 0.975), na.rm = TRUE)
# Create the violin plot, excluding outliers only in the display
card_individual %>%
select(meta_card_num, meta_pin, {{target_feature_shap}}, {{target_feature_value}}) %>%
select(meta_card_num, meta_pin, {{ target_feature_shap }}, {{ target_feature_value }}) %>%
mutate(bin = cut_number(!!sym(target_feature_value), n = 10, dig.lab = num_digits)) %>%
ggplot(aes(x = bin, y = !!sym(target_feature_shap))) +
geom_violin(fill = "#69b3a2") +
Expand Down

0 comments on commit fd34055

Please sign in to comment.