Package: AutoScore 1.0.0

Feng Xie

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

A novel interpretable machine learning-based framework to automate the development of a clinical scoring model for predefined outcomes. Our novel framework consists of six modules: variable ranking with machine learning, variable transformation, score derivation, model selection, domain knowledge-based score fine-tuning, and performance evaluation.The details are described in our research paper<doi:10.2196/21798>. Users or clinicians could seamlessly generate parsimonious sparse-score risk models (i.e., risk scores), which can be easily implemented and validated in clinical practice. We hope to see its application in various medical case studies.

Authors:Feng Xie [aut, cre], Yilin Ning [aut], Han Yuan [aut], Mingxuan Liu [aut], Siqi Li [aut], Ehsan Saffari [aut], Bibhas Chakraborty [aut], Nan Liu [aut]

AutoScore_1.0.0.tar.gz
AutoScore_1.0.0.zip(r-4.5)AutoScore_1.0.0.zip(r-4.4)
AutoScore_1.0.0.tgz(r-4.4-any)
AutoScore_1.0.0.tar.gz(r-4.5-noble)AutoScore_1.0.0.tar.gz(r-4.4-noble)
AutoScore_1.0.0.tgz(r-4.4-emscripten)
AutoScore.pdf |AutoScore.html
AutoScore/json (API)

# Install 'AutoScore' in R:
install.packages('AutoScore', repos = c('https://nliulab.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/nliulab/autoscore/issues

Datasets:

On CRAN:

7.63 score 32 stars 30 scripts 381 downloads 2 mentions 37 exports 170 dependencies

Last updated 5 days agofrom:c27af473a4. Checks:OK: 5. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 18 2024
R-4.5-winOKNov 18 2024
R-4.5-linuxOKNov 18 2024
R-4.4-winOKNov 18 2024
R-4.4-macOKNov 18 2024

Exports:AutoScore_fine_tuningAutoScore_fine_tuning_OrdinalAutoScore_fine_tuning_SurvivalAutoScore_parsimonyAutoScore_parsimony_OrdinalAutoScore_parsimony_SurvivalAutoScore_rankAutoScore_rank_OrdinalAutoScore_rank_SurvivalAutoScore_testingAutoScore_testing_OrdinalAutoScore_testing_SurvivalAutoScore_weightingAutoScore_weighting_OrdinalAutoScore_weighting_Survivalcheck_datacheck_data_ordinalcheck_data_survivalcompute_descriptive_tablecompute_multi_variable_tablecompute_multi_variable_table_ordinalcompute_multi_variable_table_survivalcompute_uni_variable_tablecompute_uni_variable_table_ordinalcompute_uni_variable_table_survivalconversion_tableconversion_table_ordinalconversion_table_survivalplot_predicted_riskplot_survival_kmprint_performance_ci_survivalprint_performance_ordinalprint_performance_survivalprint_roc_performanceprint_scoring_tablesplit_datatransform_df_fixed

Dependencies:abindaskpassbackportsbase64encbitbit64bootbroombslibcachemcarcarDatacheckmateclassclicliprclustercodetoolscolorspacecommonmarkcorrplotcowplotcoxedcpp11crayoncrosstalkcurldata.tabledata.treeDBIDerivDiagrammeRdigestdoBydplyre1071evaluateexactRankTestsfansifarverfastmapfontawesomeforcatsforeignFormulafsgdatagenericsggplot2ggpubrggrepelggsciggsignifggtextgluegmodelsgridExtragridtextgtablegtoolshavenhighrHmischmshtmlTablehtmltoolshtmlwidgetshttrigraphisobandjpegjquerylibjsonlitekm.ciKMsurvknitrlabelinglabelledlaterlatticelazyevallifecyclelme4lpSolvemagrittrmarkdownMASSMatrixMatrixModelsmaxstatmediationmemoisemgcvmicrobenchmarkmimeminqamitoolsmodelrmultcompmunsellmvtnormnlmenloptrnnetnumDerivopensslordinalpbkrtestPermAlgopillarpkgconfigplotlyplyrpngpolsplinepolynomprettyunitspROCprogresspromisesproxypurrrquantregR6randomForestrandomForestSRCrappdirsRColorBrewerRcppRcppArmadilloRcppEigenreadrrlangrmarkdownrmsrpartrstatixrstudioapisandwichsassscalesSparseMstringistringrsurvAUCsurveysurvivalsurvminersurvMiscsystableoneTH.datatibbletidyrtidyselecttinytextzdbucminfutf8vctrsviridisviridisLitevisNetworkvroomwithrxfunxml2xtableyamlzoo

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

Rendered frombrief_intro.Rmdusingknitr::rmarkdownon Nov 18 2024.

Last update: 2022-10-13
Started: 2022-09-21

Readme and manuals

Help Manual

Help pageTopics
Internal Function: Add baselines after second-step logistic regression (part of AutoScore Module 3)add_baseline
Internal Function: Automatically assign scores to each subjects given new data set and scoring table (Used for intermediate and final evaluation)assign_score
AutoScore STEP(iv): Fine-tune the score by revising cut_vec with domain knowledge (AutoScore Module 5)AutoScore_fine_tuning
AutoScore STEP(iv) for ordinal outcomes: Fine-tune the score by revising 'cut_vec' with domain knowledge (AutoScore Module 5)AutoScore_fine_tuning_Ordinal
AutoScore STEP(iv) for survival outcomes: Fine-tune the score by revising cut_vec with domain knowledge (AutoScore Module 5)AutoScore_fine_tuning_Survival
AutoScore STEP(ii): Select the best model with parsimony plot (AutoScore Modules 2+3+4)AutoScore_parsimony
AutoScore STEP(ii) for ordinal outcomes: Select the best model with parsimony plot (AutoScore Modules 2+3+4)AutoScore_parsimony_Ordinal
AutoScore STEP(ii) for survival outcomes: Select the best model with parsimony plot (AutoScore Modules 2+3+4)AutoScore_parsimony_Survival
AutoScore STEP(i): Rank variables with machine learning (AutoScore Module 1)AutoScore_rank
AutoScore STEP (i) for ordinal outcomes: Generate variable ranking list by machine learning (AutoScore Module 1)AutoScore_rank_Ordinal
AutoScore STEP (1) for survival outcomes: Generate variable ranking List by machine learning (Random Survival Forest) (AutoScore Module 1)AutoScore_rank_Survival
AutoScore STEP(v): Evaluate the final score with ROC analysis (AutoScore Module 6)AutoScore_testing
AutoScore STEP(v) for ordinal outcomes: Evaluate the final score (AutoScore Module 6)AutoScore_testing_Ordinal
AutoScore STEP(v) for survival outcomes: Evaluate the final score with ROC analysis (AutoScore Module 6)AutoScore_testing_Survival
AutoScore STEP(iii): Generate the initial score with the final list of variables (Re-run AutoScore Modules 2+3)AutoScore_weighting
AutoScore STEP(iii) for ordinal outcomes: Generate the initial score with the final list of variables (Re-run AutoScore Modules 2+3)AutoScore_weighting_Ordinal
AutoScore STEP(iii) for survival outcomes: Generate the initial score with the final list of variables (Re-run AutoScore Modules 2+3)AutoScore_weighting_Survival
Internal Function: Change Reference category after first-step logistic regression (part of AutoScore Module 3)change_reference
AutoScore function for datasets with binary outcomes: Check whether the input dataset fulfill the requirement of the AutoScorecheck_data
AutoScore function for ordinal outcomes: Check whether the input dataset fulfil the requirement of the AutoScorecheck_data_ordinal
AutoScore function for survival data: Check whether the input dataset fulfill the requirement of the AutoScorecheck_data_survival
Internal function: Check link functioncheck_link
Internal function: Check predictorscheck_predictor
Internal function: Compute AUC based on validation set for plotting parsimony (AutoScore Module 4)compute_auc_val
Internal function: Compute mean AUC for ordinal outcomes based on validation set for plotting parsimonycompute_auc_val_ord
Internal function for survival outcomes: Compute AUC based on validation set for plotting parsimonycompute_auc_val_survival
AutoScore function: Descriptive Analysiscompute_descriptive_table
Internal function: Compute risk scores for ordinal data given variables selected, cut-off values and scoring tablecompute_final_score_ord
Internal function: Compute mAUC for ordinal predictionscompute_mauc_ord
AutoScore function: Multivariate Analysiscompute_multi_variable_table
AutoScore-Ordinal function: Multivariate Analysiscompute_multi_variable_table_ordinal
AutoScore function for survival outcomes: Multivariate Analysiscompute_multi_variable_table_survival
Internal function: Based on given labels and scores, compute proportion of subjects observed in each outcome category in given score intervals.compute_prob_observed
Internal function: Based on given labels and scores, compute average predicted risks in given score intervals.compute_prob_predicted
Internal function: Compute scoring table based on training dataset (AutoScore Module 3)compute_score_table
Internal function: Compute scoring table for ordinal outcomes based on training datasetcompute_score_table_ord
Internal function: Compute scoring table for survival outcomes based on training datasetcompute_score_table_survival
AutoScore function: Univariable Analysiscompute_uni_variable_table
AutoScore-Ordinal function: Univariable Analysiscompute_uni_variable_table_ordinal
AutoScore function for survival outcomes: Univariate Analysiscompute_uni_variable_table_survival
AutoScore function: Print conversion table based on final performance evaluationconversion_table
AutoScore function: Print conversion table for ordinal outcomes to map score to riskconversion_table_ordinal
AutoScore function for survival outcomes: Print conversion tableconversion_table_survival
Internal function: generate probability matrix for ordinal outcomes given thresholds, linear predictor and link functionestimate_p_mat
Internal function survival outcome: Calculate iAUC for validation seteva_performance_iauc
Internal function: Evaluate model performance on ordinal dataevaluate_model_ord
Extract OR, CI and p-value from a proportional odds modelextract_or_ci_ord
Internal function: Find column indices in design matrix that should be 1find_one_inds
Internal function: Compute all scores attainable.find_possible_scores
Internal function: Calculate cut_vec from the training set (AutoScore Module 2)get_cut_vec
Internal function: Group scores based on given score breaks, and use friendly names for first and last intervals.group_score
Internal function: induce informative missing to sample data in the package to demonstrate how AutoScore handles missing as a separate categoryinduce_informative_missing
Internal function: induce informative missing in a single variableinduce_median_missing
Internal function: Inverse cloglog linkinv_cloglog
Internal function: Inverse logit linkinv_logit
Internal function: Inverse probit linkinv_probit
Internal function: Based on 'find_one_inds', make a design matrix to compute all scores attainable.make_design_mat
Internal function: Make parsimony plotplot_auc
Internal Function: Print plotted variable importanceplot_importance
AutoScore function for binary and ordinal outcomes: Plot predicted riskplot_predicted_risk
Internal Function: Plotting ROC curveplot_roc_curve
AutoScore function for survival outcomes: Print scoring performance (KM curve)plot_survival_km
AutoScore function for survival outcomes: Print predictive performance with confidence intervalsprint_performance_ci_survival
AutoScore function for ordinal outcomes: Print predictive performanceprint_performance_ordinal
AutoScore function for survival outcomes: Print predictive performanceprint_performance_survival
AutoScore function: Print receiver operating characteristic (ROC) performanceprint_roc_performance
AutoScore Function: Print scoring tables for visualizationprint_scoring_table
20000 simulated ICU admission data, with the same distribution as the data in the MIMIC-III ICU databasesample_data
Simulated ED data with ordinal outcomesample_data_ordinal
Simulated ED data with ordinal outcome (small sample size)sample_data_ordinal_small
1000 simulated ICU admission data, with the same distribution as the data in the MIMIC-III ICU databasesample_data_small
20000 simulated MIMIC sample data with survival outcomessample_data_survival
1000 simulated MIMIC sample data with survival outcomessample_data_survival_small
20000 simulated ICU admission data with missing valuessample_data_with_missing
AutoScore Function: Automatically splitting dataset to train, validation and test set, possibly stratified by labelsplit_data
Internal function: Categorizing continuous variables based on cut_vec (AutoScore Module 2)transform_df_fixed