Package: uniml 0.5.1

Steve Shi

uniml: Unified Predictive Modeling Toolkit

A unified toolkit for binary and multiclass classification modelling that chains preprocessing, feature selection, model training and tuning, evaluation, visualization, and SHAP interpretability behind one set of objects, while keeping a strict separation between the data that fits a model and the data that judges it. Models, tasks, resampling, and tuning are 'mlr3' objects, multiple imputation is pooled with Rubin's rules, and results are exported in a layout that can be reopened outside R.

Authors:Steve Shi [aut, cre]

uniml_0.5.1.tar.gz
uniml_0.5.1.zip(r-4.7-any)uniml_0.5.1.zip(r-4.6-any)
uniml_0.5.1.tar.gz(r-4.7-any)uniml_0.5.1.tar.gz(r-4.6-any)
uniml_0.5.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
uniml/json (API)

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

Bug tracker:https://github.com/zhengyangszy/uniml/issues

On CRAN:

Conda:

3.48 score 91 exports 122 dependencies

Last updated from:986a5edb56. Checks:6 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK299
source / vignettesOK382
linux-releaseOK256
windows-develOK156
windows-releaseOK203
wasm-releaseOK201

Exports:apply_balanceapply_encodeapply_imputerapply_preprocessorapply_scaleapply_stepas_uniml_binaryas_uniml_dataas_uniml_multiclassassemble_resultbalance_classescalc_cicalc_metricscalc_nri_idicalibrate_probabilitiescalibration_metricscombine_selectionsdcadelong_testdetect_var_typesdiagnose_missingencode_categoricalexplain_shapexport_resultsextract_thresholdsfind_thresholdfit_balancefit_encodefit_imputerfit_preprocessorfit_scaleget_task_typehl_testimpute_datalist_task_typesmake_splitmake_taskmulticlass_calibrationnew_uniml_resultplot_calibrationplot_confusionplot_dcaplot_pr_curveplot_rocplot_shap_beeswarmplot_shap_dependenceplot_shap_forceplot_shap_importanceplot_shap_waterfallpool_mipredict_unimlrank_modelsread_resultregister_learnerregister_task_typeregister_workflow_adapterremove_collinearresolve_learnersrun_workflowsave_resultscale_numericselect_borutaselect_featuresselect_lassoselect_multivariateselect_rf_importanceselect_rfeselect_univariateset_evaluationset_explainset_feature_selectionset_labelsset_leakage_policyset_learnersset_outputset_preprocessset_tuningtask_type_spectheme_unimltrain_modeltripod_ai_checktune_modeluniml_specvalidate_uniml_datavalidate_uniml_preprocessorvalidate_uniml_resultvalidate_uniml_specvalidate_uniml_splitvalidate_uniml_task_typeworkflow_adapterworkflow_engine

Dependencies:backportsbbotkbitbit64bootBorutabroomcheckmateclicliprcodetoolscpp11crayoncurldata.tabledigestdoFuturedplyrevaluatefarverforcatsforeachfrufuturefuture.applygenericsggfittextgggenesggplot2ggrepelglmnetglobalsgluegridtextgtablehavenhmsisobanditeratorsjomojpegjsonlitekernelshaplabelinglatticelgrlifecyclelistenvlitedownlme4magrittrmarkdownMASSMatrixmatrixStatsmiceminqamiraimitmlmlbenchmlr3mlr3filtersmlr3fselectmlr3learnersmlr3measuresmlr3miscmlr3pipelinesmlr3tuningmoocorenanonextnlmenloptrnnetnumDerivordinalpalmerpenguinspanparadoxparallellypatchworkpillarpkgconfigpngprettyunitspROCprogressPRROCpurrrR6rangerrbibutilsRColorBrewerRcppRcppEigenRdpackreadrreformulasrlangrpartS7scalesshadesshapeshapvizstabmstringistringrsurvivaltibbletidyrtidyselecttzdbucminfutf8uuidvctrsviridisLitevroomwithrxfunxgboostxml2

A real cohort: subarachnoid haemorrhage
Why this vignette | The data | Split and run | What the cross-validation says | Validation performance | Which model does the package rank first? | Figures | Thresholds | Do the two models differ? | Calibration, for the record | Reclassification | Reporting checklist | Export | What this vignette does and does not show | References

Last update: 2026-11-17
Started: 2026-11-17

Explaining a model with SHAP
Overview | Fit a workflow | Compute SHAP values | Importance, beeswarm, dependence, and waterfall | Clinical thresholds | References

Last update: 2026-11-17
Started: 2026-11-17

Multiclass outcomes
What "multiclass" means here | A worked example | Train and score | Does a model survive resampling? | Comparing models | Figures | Calibration | Recalibration | What is deliberately missing | References

Last update: 2026-11-17
Started: 2026-11-17

uniml 快速上手(中文)
这个包解决什么问题 | 数据角色 | 一个最小例子 | 看结果 | 画图 | 解释模型 | 给新数据打分 | 导出结果 | 报告规范自检 | 更多文档

Last update: 2026-11-17
Started: 2026-11-17

Running a complete workflow
Overview | Build and configure the specification | Create leakage-safe splits | Run the workflow | Inspect the results | Performance figures | Validation, test, and external performance | Thresholds, reclassification, and explainability | Predict new data | Reporting checklist | Export results | Leakage policies | References

Last update: 2026-11-17
Started: 2026-11-17

Using the atomic layers
Overview | Data and specification | Preprocessing | Feature selection | Training and tuning | Metrics and confidence intervals | Plots

Last update: 2026-11-17
Started: 2026-11-17

Readme and manuals

Help Manual

Help pageTopics
Apply a fitted class-balancing stepapply_balance apply_balance.default apply_balance.uniml_step_balance
Apply a fitted encoding stepapply_encode apply_encode.default apply_encode.uniml_step_encode
Apply an imputation stepapply_imputer apply_imputer.default apply_imputer.uniml_step_impute
Apply a fitted preprocessing pipelineapply_preprocessor
Apply a fitted scaling stepapply_scale apply_scale.default apply_scale.uniml_step_scale
Apply a single preprocessing stepapply_step apply_step.default apply_step.uniml_step_balance apply_step.uniml_step_encode apply_step.uniml_step_impute apply_step.uniml_step_scale
Convert an mlr3 prediction into a 'uniml_binary' objectas_uniml_binary
Convert data to a uniml data objectas_uniml_data
Convert an mlr3 prediction into a 'uniml_multiclass' objectas_uniml_multiclass
Assemble a complete uniml resultassemble_result
Balance class frequenciesbalance_classes
Bootstrap confidence intervals for binary metricscalc_ci
Calculate binary classification metricscalc_metrics calc_metrics.data.frame calc_metrics.default calc_metrics.matrix calc_metrics.numeric calc_metrics.PredictionClassif calc_metrics.uniml_binary calc_metrics.uniml_multiclass
Calculate continuous or categorical NRI and IDIcalc_nri_idi
Calibrate predicted probabilitiescalibrate_probabilities calibrate_probabilities.default calibrate_probabilities.matrix calibrate_probabilities.numeric calibrate_probabilities.uniml_binary
Calibrate multiclass probabilities by temperature scalingcalibrate_probabilities.uniml_multiclass
Calibration intercept and slopecalibration_metrics
Combine feature-selection resultscombine_selections
Decision-curve analysisdca dca.default dca.uniml_binary
Decision-curve analysisdca.numeric
Compare binary model AUCs with DeLong testsdelong_test
Detect feature variable typesdetect_var_types
Diagnose missing valuesdiagnose_missing
Encode categorical variablesencode_categorical
Compute SHAP explanationsexplain_shap explain_shap.default explain_shap.Learner explain_shap.list explain_shap.uniml_binary explain_shap.uniml_result
Export a uniml resultexport_results
Extract SHAP-zero clinical thresholdsextract_thresholds
Find a binary classification thresholdfind_threshold
Fit a class-balancing stepfit_balance
Fit a categorical encoding stepfit_encode
Fit an imputerfit_imputer
Fit a preprocessing pipelinefit_preprocessor
Fit a numeric scaling stepfit_scale
Get a task-type descriptorget_task_type
Hosmer-Lemeshow goodness-of-fit testhl_test
Impute missing valuesimpute_data
List registered task typeslist_task_types
Split uniml data into train, validation, and optional test setsmake_split
Build an mlr3 classification taskmake_task
Calibration of a multiclass modelmulticlass_calibration
Construct a uniml result containernew_uniml_result
Plot probability-calibration curvesplot_calibration plot_calibration.data.frame plot_calibration.PredictionClassif plot_calibration.uniml_binary plot_calibration.uniml_multiclass plot_calibration.uniml_result
Plot confusion-matrix heatmapsplot_confusion plot_confusion.data.frame plot_confusion.PredictionClassif plot_confusion.uniml_binary plot_confusion.uniml_multiclass plot_confusion.uniml_result
Plot decision curvesplot_dca plot_dca.uniml_binary plot_dca.uniml_dca plot_dca.uniml_multiclass plot_dca.uniml_result
Plot precision-recall curvesplot_pr_curve plot_pr_curve.data.frame plot_pr_curve.PredictionClassif plot_pr_curve.uniml_binary plot_pr_curve.uniml_result
Plot ROC curvesplot_roc plot_roc.data.frame plot_roc.PredictionClassif plot_roc.uniml_binary plot_roc.uniml_multiclass plot_roc.uniml_result
Plot a SHAP beeswarmplot_shap_beeswarm plot_shap_beeswarm.mshapviz plot_shap_beeswarm.shapviz plot_shap_beeswarm.uniml_binary plot_shap_beeswarm.uniml_result
Plot a SHAP dependence curveplot_shap_dependence plot_shap_dependence.mshapviz plot_shap_dependence.shapviz plot_shap_dependence.uniml_binary plot_shap_dependence.uniml_result
Plot a single-observation SHAP force plotplot_shap_force plot_shap_force.mshapviz plot_shap_force.shapviz plot_shap_force.uniml_binary plot_shap_force.uniml_result
Plot SHAP importanceplot_shap_importance plot_shap_importance.mshapviz plot_shap_importance.shapviz plot_shap_importance.uniml_binary plot_shap_importance.uniml_result
Plot a single-observation SHAP waterfallplot_shap_waterfall plot_shap_waterfall.mshapviz plot_shap_waterfall.shapviz plot_shap_waterfall.uniml_binary plot_shap_waterfall.uniml_result
Plot a uniml resultplot.uniml_result
Pool estimates across multiple imputations (strict Rubin's rules)pool_mi
Predict with a fitted uniml workflowpredict.uniml_result predict_uniml
Print a fitted calibrationprint.uniml_calibration
Print a uniml data objectprint.uniml_data
Print a uniml preprocessorprint.uniml_preprocessor
Print a uniml resultprint.uniml_result
Print a SHAP resultprint.uniml_shap
Print a uniml specificationprint.uniml_spec
Print a uniml splitprint.uniml_split
Print a task-type descriptorprint.uniml_task_type
Rank models on a comparison setrank_models
Register a learner for use by 'resolve_learners()'register_learner
Register a task typeregister_task_type
Register a workflow adapter for a task typeregister_workflow_adapter
Remove collinear featuresremove_collinear
Resolve learners from a uniml specificationresolve_learners
Run a complete uniml workflowrun_workflow
Save and read a fitted resultread_result save_result
Scale numeric variablesscale_numeric
Select features with Borutaselect_boruta
Run feature selection from a uniml specificationselect_features
Select features with LASSOselect_lasso
Select features with multivariable logistic regressionselect_multivariate
Select features with random-forest importanceselect_rf_importance
Select features with recursive feature eliminationselect_rfe
Select features with univariable logistic regressionselect_univariate
Set evaluation optionsset_evaluation
Set explanation optionsset_explain
Set feature-selection optionsset_feature_selection
Set display labelsset_labels
Set the data-leakage policyset_leakage_policy
Set learnersset_learners
Set output optionsset_output
Set preprocessing optionsset_preprocess
Set tuning optionsset_tuning
Summarise a uniml resultsummary.uniml_result
Task-type descriptortask_type_spec
Unified plotting themetheme_uniml
Train a final classification modeltrain_model
Audit a result against the TRIPOD+AI reporting domainstripod_ai_check
Tune an mlr3 learnertune_model
Construct a uniml specificationuniml_spec
Validate a uniml data objectvalidate_uniml_data
Validate a uniml preprocessorvalidate_uniml_preprocessor
Validate a uniml resultvalidate_uniml_result
Validate a uniml specificationvalidate_uniml_spec
Validate a uniml splitvalidate_uniml_split
Validate a task-type descriptorvalidate_uniml_task_type
Get the workflow adapter of a task typeworkflow_adapter
Fit a task type's models and predict the evaluation setsworkflow_engine