Learn R Programming

AutoScore: An Interpretable Machine Learning-Based Automatic Clinical Score Generator

AutoScore is a novel machine learning framework to automate the development of interpretable clinical scoring models. AutoScore consists of six modules: 1) variable ranking with machine learning, 2) variable transformation, 3) score derivation, 4) model selection, 5) domain knowledge-based score fine-tuning, and 6) performance evaluation. The original AutoScore structure is elaborated in this article and its flowchart is shown in the following figure. AutoScore was originally designed for binary outcomes and later extended to survival outcomes and ordinal outcomes. AutoScore could seamlessly generate risk scores using a parsimonious set of variables for different types of clinical outcomes, which can be easily implemented and validated in clinical practice. Moreover, it enables users to build transparent and interpretable clinical scores quickly in a straightforward manner.

Please visit our bookdown page for a full tutorial on AutoScore usage.

Usage

The five pipeline functions constitute the 5-step AutoScore-based process for generating point-based clinical scores for binary, survival and ordinal outcomes.

This 5-step process gives users the flexibility of customization (e.g., determining the final list of variables according to the parsimony plot, and fine-tuning the cutoffs in variable transformation):

  • STEP(i): AutoScore_rank()or AutoScore_rank_Survival() or AutoScore_rank_Ordinal() - Rank variables with machine learning (AutoScore Module 1)
  • STEP(ii): AutoScore_parsimony() or AutoScore_parsimony_Survival() or AutoScore_parsimony_Ordinal() - Select the best model with parsimony plot (AutoScore Modules 2+3+4)
  • STEP(iii): AutoScore_weighting() or AutoScore_weighting_Survival() or AutoScore_weighting_Ordinal() - Generate the initial score with the final list of variables (Re-run AutoScore Modules 2+3)
  • STEP(iv): AutoScore_fine_tuning() or AutoScore_fine_tuning_Survival() or AutoScore_fine_tuning_Ordinal() - Fine-tune the score by revising cut_vec with domain knowledge (AutoScore Module 5)
  • STEP(v): AutoScore_testing() or AutoScore_testing_Survival() or AutoScore_testing_Ordinal() - Evaluate the final score with ROC analysis (AutoScore Module 6)

We also include several optional functions in the package, which could help with data analysis and result reporting.

Citation

Core paper

Method extension

Clinical application

This page provides a collection of clinical applications using AutoScore and its extensions. The application list is categorized according to medical specialties and is updated regularly. However, due to the manual process of updating, we are unable to keep track of all publications.

Contact

Package installation

Install from GitHub or CRAN:

# From Github
install.packages("devtools")
library(devtools)
install_github(repo = "nliulab/AutoScore", build_vignettes = TRUE)

# From CRAN (recommended)
install.packages("AutoScore")

Load AutoScore package:

library(AutoScore)

Copy Link

Version

Install

install.packages('AutoScore')

Monthly Downloads

327

Version

1.1.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Feng Xie

Last Published

August 1st, 2025

Functions in AutoScore (1.1.0)

compute_auc_val_ord

Internal function: Compute mean AUC for ordinal outcomes based on validation set for plotting parsimony
AutoScore_weighting

AutoScore STEP(iii): Generate the initial score with the final list of variables (Re-run AutoScore Modules 2+3)
check_data_survival

AutoScore function for survival data: Check whether the input dataset fulfill the requirement of the AutoScore
compute_score_table

Internal function: Compute scoring table based on training dataset (AutoScore Module 3)
compute_score_table_ord

Internal function: Compute scoring table for ordinal outcomes based on training dataset
compute_score_table_survival

Internal function: Compute scoring table for survival outcomes based on training dataset
check_link

Internal function: Check link function
compute_prob_predicted

Internal function: Based on given labels and scores, compute average predicted risks in given score intervals.
compute_auc_val_survival

Internal function for survival outcomes: Compute AUC based on validation set for plotting parsimony
compute_prob_observed

Internal function: Based on given labels and scores, compute proportion of subjects observed in each outcome category in given score intervals.
compute_uni_variable_table

AutoScore function: Univariable Analysis
conversion_table_survival

AutoScore function for survival outcomes: Print conversion table
estimate_p_mat

Internal function: generate probability matrix for ordinal outcomes given thresholds, linear predictor and link function
compute_descriptive_table

AutoScore function: Descriptive Analysis
eva_performance_iauc

Internal function survival outcome: Calculate iAUC for validation set
evaluate_model_ord

Internal function: Evaluate model performance on ordinal data
compute_final_score_ord

Internal function: Compute risk scores for ordinal data given variables selected, cut-off values and scoring table
induce_median_missing

Internal function: induce informative missing in a single variable
inv_cloglog

Internal function: Inverse cloglog link
conversion_table

AutoScore function: Print conversion table based on final performance evaluation
group_score

Internal function: Group scores based on given score breaks, and use friendly names for first and last intervals.
conversion_table_ordinal

AutoScore function: Print conversion table for ordinal outcomes to map score to risk
compute_mauc_ord

Internal function: Compute mAUC for ordinal predictions
check_data_ordinal

AutoScore function for ordinal outcomes: Check whether the input dataset fulfil the requirement of the AutoScore
check_data

AutoScore function for datasets with binary outcomes: Check whether the input dataset fulfill the requirement of the AutoScore
check_predictor

Internal function: Check predictors
print_performance_ci_survival

AutoScore function for survival outcomes: Print predictive performance with confidence intervals
plot_predicted_risk

AutoScore function for binary and ordinal outcomes: Plot predicted risk
plot_importance

Internal Function: Print plotted variable importance
inv_logit

Internal function: Inverse logit link
compute_multi_variable_table_survival

AutoScore function for survival outcomes: Multivariate Analysis
compute_uni_variable_table_ordinal

AutoScore-Ordinal function: Univariable Analysis
compute_uni_variable_table_survival

AutoScore function for survival outcomes: Univariate Analysis
find_possible_scores

Internal function: Compute all scores attainable.
compute_multi_variable_table_ordinal

AutoScore-Ordinal function: Multivariate Analysis
compute_auc_val

Internal function: Compute AUC based on validation set for plotting parsimony (AutoScore Module 4)
sample_data_with_missing

20000 simulated ICU admission data with missing values
sample_data_survival_small

1000 simulated MIMIC sample data with survival outcomes
inv_probit

Internal function: Inverse probit link
get_cut_vec

Internal function: Calculate cut_vec from the training set (AutoScore Module 2)
print_scoring_table

AutoScore Function: Print scoring tables for visualization
sample_data

20000 simulated ICU admission data, with the same distribution as the data in the MIMIC-III ICU database
print_performance_ordinal

AutoScore function for ordinal outcomes: Print predictive performance
compute_multi_variable_table

AutoScore function: Multivariate Analysis
find_one_inds

Internal function: Find column indices in design matrix that should be 1
make_design_mat

Internal function: Based on find_one_inds, make a design matrix to compute all scores attainable.
extract_or_ci_ord

Extract OR, CI and p-value from a proportional odds model
sample_data_ordinal

Simulated ED data with ordinal outcome
sample_data_ordinal_small

Simulated ED data with ordinal outcome (small sample size)
plot_survival_km

AutoScore function for survival outcomes: Print scoring performance (KM curve)
plot_roc_curve

Internal Function: Plotting ROC curve
plot_auc

Internal function: Make parsimony plot
sample_data_survival

20000 simulated MIMIC sample data with survival outcomes
print_roc_performance

AutoScore function: Print receiver operating characteristic (ROC) performance
print_performance_survival

AutoScore function for survival outcomes: Print predictive performance
induce_informative_missing

Internal function: induce informative missing to sample data in the package to demonstrate how AutoScore handles missing as a separate category
transform_df_fixed

Internal function: Categorizing continuous variables based on cut_vec (AutoScore Module 2)
sample_data_small

1000 simulated ICU admission data, with the same distribution as the data in the MIMIC-III ICU database
split_data

AutoScore Function: Automatically splitting dataset to train, validation and test set, possibly stratified by label
AutoScore_impute

Internal function: impute missing values in the training and validation sets
AutoScore_rank_Ordinal

AutoScore STEP (i) for ordinal outcomes: Generate variable ranking list by machine learning (AutoScore Module 1)
AutoScore_rank

AutoScore STEP(i): Rank variables with machine learning (AutoScore Module 1)
AutoScore_parsimony

AutoScore STEP(ii): Select the best model with parsimony plot (AutoScore Modules 2+3+4)
AutoScore_fine_tuning_Survival

AutoScore STEP(iv) for survival outcomes: Fine-tune the score by revising cut_vec with domain knowledge (AutoScore Module 5)
AutoScore_rank_Survival

AutoScore STEP (1) for survival outcomes: Generate variable ranking List by machine learning (Random Survival Forest) (AutoScore Module 1)
AutoScore_fine_tuning_Ordinal

AutoScore STEP(iv) for ordinal outcomes: Fine-tune the score by revising cut_vec with domain knowledge (AutoScore Module 5)
AutoScore_fine_tuning

AutoScore STEP(iv): Fine-tune the score by revising cut_vec with domain knowledge (AutoScore Module 5)
AutoScore_parsimony_Survival

AutoScore STEP(ii) for survival outcomes: Select the best model with parsimony plot (AutoScore Modules 2+3+4)
AutoScore_parsimony_Ordinal

AutoScore STEP(ii) for ordinal outcomes: Select the best model with parsimony plot (AutoScore Modules 2+3+4)
add_baseline

Internal Function: Add baselines after second-step logistic regression (part of AutoScore Module 3)
AutoScore_testing_Survival

AutoScore STEP(v) for survival outcomes: Evaluate the final score with ROC analysis (AutoScore Module 6)
AutoScore_testing_Ordinal

AutoScore STEP(v) for ordinal outcomes: Evaluate the final score (AutoScore Module 6)
assign_score

Internal Function: Automatically assign scores to each subjects given new data set and scoring table (Used for intermediate and final evaluation)
change_reference

Internal Function: Change Reference category after first-step logistic regression (part of AutoScore Module 3)
AutoScore_weighting_Ordinal

AutoScore STEP(iii) for ordinal outcomes: Generate the initial score with the final list of variables (Re-run AutoScore Modules 2+3)
bca

Bias-corrected and accelerated confidence intervals
AutoScore_testing

AutoScore STEP(v): Evaluate the final score with ROC analysis (AutoScore Module 6)
AutoScore_weighting_Survival

AutoScore STEP(iii) for survival outcomes: Generate the initial score with the final list of variables (Re-run AutoScore Modules 2+3)