Learn R Programming

IBLM

Interpretable Boosted Linear Models


Overview

IBLM implements Interpretable Boosted Linear Models — a hybrid modelling approach that combines the transparency of generalized linear models (GLMs) with the predictive power of gradient boosting.

The package provides:

  • Functions for fitting interpretable boosted linear models
  • Tools to analyze and visualize model results
  • Support for model comparison and diagnostics

Installation

You can install the released version of IBLM from CRAN:

install.packages("IBLM")

You can install the development version from GitHub:

# install.packages("remotes")
remotes::install_github("IFoA-ADSWP/IBLM")

Example

Here’s a minimal example to train and explain an IBLM:

library(IBLM)

df_list <- freMTPLmini  |>
  split_into_train_validate_test()

iblm_model <- train_iblm_xgb(
  df_list,
  response_var = "ClaimRate",
  family = "poisson"
)

ex <- explain_iblm(iblm_model, df_list$test)


Documentation

For Documentation on the various functions in this package visit:

Copy Link

Version

Install

install.packages('IBLM')

Monthly Downloads

158

Version

1.0.2

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Karol Gawlowski

Last Published

December 16th, 2025

Functions in IBLM (1.0.2)

beta_corrected_scatter

Scatter Plot of Beta Corrections for a Variable
data_to_onehot

Convert Data Frame to Wide One-Hot Encoded Format
data_beta_coeff_glm

Obtain GLM Beta Coefficients for tabular data
extract_booster_shap

Extract SHAP values from an xgboost Booster model
explain_iblm

Explain GLM Model Predictions Using SHAP Values
get_pinball_scores

Calculate Pinball Scores for IBLM and Additional Models
freMTPLmini

French Motor Insurance Claims Dataset
create_overall_correction

Create Pre-Configured Overall Correction Plot Function
data_beta_coeff_booster

Obtain Booster Model Beta Corrections for tabular data
train_iblm_xgb

Train IBLM Model on XGBoost
overall_correction

Plot Overall Corrections from Booster Component
load_freMTPL2freq

Load French Motor Third-Party Liability Frequency Dataset
train_xgb_as_per_iblm

Train XGBoost Model Using the IBLM Model Parameters
split_into_train_validate_test

Split Dataframe into: 'train', 'validate', 'test'
shap_to_onehot

Convert Shap values to Wide One-Hot Encoded Format
predict.iblm

Predict Method for IBLM
theme_iblm

Custom ggplot2 Theme for IBLM
beta_corrected_density

Density Plot of Beta Corrections for a Variable
create_beta_corrected_scatter

Create Pre-Configured Beta Corrected Scatter Plot Function
correction_corridor

Plot GLM vs IBLM Predictions with Different Corridors
check_data_variability

Check Data Variability for Modeling
check_iblm_model

Check Object of Class `iblm`
beta_corrections_derive

Compute Beta Corrections based on SHAP values
bias_density

Density Plot of Bias Corrections from SHAP values
create_bias_density

Create Pre-Configured Bias Density Plot Function
create_beta_corrected_density

Create Pre-Configured Beta Corrected Density Plot Function