Skip to content

rtemis

1.4.2Package record

Schema-Driven Machine Learning and Visualization

0packages dependsuggested by 1
3.5Kdownloads / year
–test coverage
11/13flavors OK

Overview

About

Machine learning and visualization package with an 'S7' backend featuring comprehensive type checking and validation, observable runs, and auditable outputs. The functional API provides one-call access to supervised and unsupervised learning through train(), cluster(), and decomp(). All configuration steps are performed using setup functions and validated. A single call to train() can handle preprocessing, decomposition, hyperparameter tuning, model stacking, and testing with nested resampling. Supports 'data.frame', 'data.table', and 'tibble' inputs and parallel execution. Plot methods for trained and resampled supervised models draw interactive figures through 'rtemis.draw'. Includes native implementations of SuperLearner, RuleFit, and Linear Additive Trees, and supports conformal prediction. The package first appeared in E.D. Gennatas (2017) https://repository.upenn.edu/entities/publication/d81892ea-3087-4b71-a6f5-739c58626d64.

Changes in 1.4.2
  • The standalone Plotly, networkD3, threejs and leaflet draw_*() functions move to the 'rtemis.dplot' package on r-universe, with their themes (theme_*(), choose_theme(), available_themes()), palettes (get_palette()), color utilities (col2grayscale(), color_adjust(), previewcolor()), available_draw(), uniprot_get(), xtdescribe(), the xt_example data and the rtemis_theme, rtemis_palette and rtemis_font options. 'rtemis.draw' provides their replacements. rtemis keeps draw_linad(), which takes an 'rtemis.draw' Theme, and roc_curve().
  • setup_PCoA() configures principal coordinates analysis (classical multidimensional scaling) on a choice of dissimilarities; it applies to new data through Gower's out-of-sample formula, so it can be train()'s decomposition step, and does not reconstruct the input.
  • setup_MDS() configures metric or nonmetric multidimensional scaling through 'vegan' with multiple starts; it cannot be applied to new data and does not reconstruct the input.
  • review() assesses a trained supervised model, single-split or resampled: it reports sample sizes, every training and test metric, and comparisons with a baseline predictor, with confidence intervals and tests for a single split and a description of the variation between resamples for a resampled model, then notes small samples, many predictors, and signs of overfitting.
  • ai_review() asks a language model, through 'rtemis.llm', to write a summary, evaluation, next steps and caveats from a review(), statements citing the review's finding codes, checked against the review; the result keeps the review and records the model, settings, prompt and a hash of the review.
  • A fitted model records the value its backend chose for a hyperparameter left unset, so the model and its record state every value the fit used: for example mtry for ranger, nk for MARS, the loss and optimizer settings for MLP, and the engine settings for LINAD.
  • LightRuleFit stops with a corrective error when its boosting stage makes no split.
  • setup_TabNet() rejects importance_sample_size when skip_importance is TRUE.
  • setup_CART(cost =) and setup_Ranger(class_weights =) reach their backends; class weights named by class are matched to the outcome's levels.
  • setup_Ranger() drops case_weights, which ranger did not receive; per-case weights are passed with train(weights =).
  • setup_GLMNET() drops offset, which failed at prediction and under resampling.
  • setup_LINAD() and setup_LINADForest() take root_forward_stop and root_node_test, the root model's stopping rule and slopes test; unset uses the node-level value.
Show all changes in 1.4.2Hide the rest of the changes in 1.4.2
  • Variable importance (get_varimp()) holds one measure per name, each stating what it quantifies (split gain, permutation, coefficient, ...), the cases it was computed on, whether it is signed or depends on predictor units, how it ranks predictors, and a description for the fitted model; the measures replace the single table in @data, and varimp_table() combines them into one data.frame. plot_varimp() ranks bars by the measure's direction (a cross-validated risk smallest first). Linear SVM weights are oriented toward the positive class, and a forest fitted with importance = "none" has no importance.
  • writeup() writes the Methods and Results sections for a trained supervised model from the model and its review(), every number traceable to the field it was read from, with references to R, rtemis, the fitting packages and the statistical methods, a main hyperparameter table (primary hyperparameters and every one tuned, specified or resolved during fitting; include_hyperparameters replaces the primary list) and a supplementary table of every hyperparameter with its value, how it was chosen and the values tried, and a list of what the model does not record.
  • write_text() writes a writeup(), review() or ai_review() as Markdown.
  • Stratified resampling (setup_KFold(), setup_StratSub(), setup_StratBoot()) stratifies a categorical variable by its levels; with more than four levels it grouped adjacent levels together.
  • Metric labels print AUC, PPV and NPV in capitals.
  • LightRF predictions are no longer pulled toward 0 when some trees cannot split, as happens on small samples: such trees now predict their sample's center. Training reports how many trees could not split.
  • setup_SuperConfig() and setup_SuperConfigLive() reject a decomposition that cannot be applied to new data, as reading a supervised config already did.
  • Shared results identify implementation-specific learner, execution, preprocessing, and resampler configs by schema and read their typed settings without inserting omitted defaults.
  • write_config() and write_record() write numbers with 15 significant digits instead of rounding to four decimal places.
  • calibrate() takes execution_config; calibration models train serially when it is unset.
  • train() and the setup_*() functions spend less time reading property declarations and default policies; a single CART fit on iris takes about a third of the time.
  • Each parallel task receives only its own resample or bag; LINADForest and bias_variance() pass training data to local workers through shared memory.
  • GAM classification trains on a data.table, which failed for every outcome, and on a multiclass outcome, using mgcv's multinomial family. A multiclass GAM reports no variable importance or standard errors, and explain() refuses its GAMTerms estimator; explanation_methods() reports GAM's exactness as dependent on the fit.
  • LinearSVM and RadialSVM probabilities are those of the positive class for a binary outcome and follow the outcome's level order for a multiclass one. Binary probabilities were those of the negative class when the first training case belonged to the positive class.
  • setup_GridSearch() with maximize unset maximizes every metric for which a higher value is better (accuracy, balanced accuracy, sensitivity, specificity, PPV, NPV, F1, AUC, RΒ², concordance) and minimizes the others; it minimized AUC, sensitivity, specificity, PPV, NPV and F1.
  • se() is exported: standard errors of the fit for GLM, GAM, BART and LINADForest models.
  • get_metrics() returns the metrics a supervised model, resampled model, clustering or decomposition stores for one sample; calibrated = TRUE selects a calibrated classifier's calibrated metrics.
  • $ and [[ read the properties of resampled models, resampled metrics, tuners, LightRuleFit models and bias_variance() results, with tab completion, and [[ reads any property of a decomposition, as $ does. On these objects and on models and clusterings, a name that is not a property raises an error listing the properties.
  • plot_varimp() draws a SHAP explanation's mean absolute contributions.
  • plot() draws a fitted supervised model's default view: true against predicted values for regression, confusion matrices for classification, and metric distributions for resampled models. present() prints the model's description and returns the same view; plot_roc() draws ROC curves.
  • Model plots color each data split the same way: training teal, validation purple, test magenta. Confusion matrices shade correct predictions blue and incorrect predictions orange.
  • Imputation fitted on training data is applied to new data: apply_preprocessor(), and train() on validation, test and resampled test data, impute with what was learned from the training data rather than from the new data.
  • Mean and mode imputation (impute_type = "meanMode") stores the value imputed into every feature in the new config properties impute_numeric_values and impute_level_values.
  • Mean and mode imputation keeps each feature's type. impute_numeric ("mean" or "median") and impute_categorical ("mode") replace impute_discrete and impute_continuous. Integer features take the mean or median rounded half to even, logical features their more frequent value (FALSE on a tie), and factor and character features their mode, a tie going to the first level or the first value in code point order. Integer features took their mode, a tie going to the value appearing last. A supplied value that a feature's type cannot hold is an error.
  • missRanger imputation keeps its fitted random forests in the Preprocessor (@imputer) and applies them with predict(); features with no missing training values take a mean or mode value on new data. All impute_missRanger_params reach missRanger, which received only pmm.k.
  • micePMM imputation is available to preprocess() only: setup_SupervisedPreprocessor() does not offer it, and apply_preprocessor() refuses a preprocessor that uses it.
  • setup_SupervisedPreprocessor() imputes with mean and mode values by default (impute_type = "meanMode"); missRanger, fitted on every training set of a train() run, is chosen explicitly. The Imputation sections of setup_SupervisedPreprocessor() and setup_Preprocessor() describe each method's cost and limits.

Supervised result validation

  • Outcomes, predictions, and classification probabilities must have matching row counts within each sample.
  • Categorical outcomes and predictions must preserve the training class levels and their order; probability matrices require one column for binary classification or one per class for multiclass classification.

From NEWS.md in the release

Install

Health

CRAN checks
2ERROR11OK
Check messages
ERRORtestsr-devel-windows-x86_64, r-release-linux-x86_64

r-devel-windows-x86_64

Running 'testthat.R' [146s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(rtemis)
    .:rtemis 1.2.7 🌊 x86_64-w64-mingw32/x64
  > library(testthat)
  
  Attaching package: 'testthat'
  
  The following object is masked from 'package:rtemis':
  
      describe
  
  > 
  > test_check("rtemis")
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  2026-10-20 02:51:32 [0mInput contains more than one column; stratifying on last.[0m [resample]
  2026-10-20 02:51:32 [0mInput contains more than one column; stratifying on last.[0m [resample]
  2026-10-20 02:51:32 [0mUsing max n bins possible = 2.[0m [kfold]
  2026-10-20 02:51:32 [0mInput contains more than one column; stratifying on last.[0m [resample]
  2026-10-20 02:51:32 [0mUsing max n bins possible = 3.[0m [kfold]
  2026-10-20 02:51:33 [0m[1;38;2;15;106;102mβœ“[0m Created file: D:\temp\2026_10_19_01_50_00_32085\RtmpemNOgv\rtemis_cluster.j
...[truncated]...
ds.[0m [train]
  [ FAIL 1 | WARN 4 | SKIP 4 | PASS 356 ]
  
  ══ Skipped tests (4) ═══════════════════════════════════════════════════════════
  β€’ For local testing only; requires CSV file (3): 'test_ClusterConfig.R:19:3',
    'test_DecomposeConfig.R:19:3', 'test_SuperConfig.R:48:3'
  β€’ empty test (1):
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_Clustering.R:96:3'): cluster_DBSCAN() succeeds ─────────────────
  Error: approx must be a single, finite, nonnegative number.
  Backtrace:
      β–†
   1. └─rtemis::cluster(...) at test_Clustering.R:96:3
   2.   └─rtemis:::cluster_(config = config, x = x, verbosity = verbosity)
   3.     β”œβ”€S7::S7_dispatch()
   4.     └─rtemis (local) `method(cluster_, rtemis::DBSCANConfig)`(...)
   5.       └─dbscan::dbscan(...)
   6.         └─dbscan:::.validate_nonnegative_scalar(extra$approx %||% 0, "approx")
  
  [ FAIL 1 | WARN 4 | SKIP 4 | PASS 356 ]
  Error:
  ! Test failures.
  Execution halted

r-release-linux-x86_64

Running β€˜testthat.R’ [107s/153s]
Running the tests in β€˜tests/testthat.R’ failed.
Complete output:
  > library(rtemis)
    .:rtemis 1.2.7 🌊 x86_64-pc-linux-gnu
  > library(testthat)
  
  Attaching package: 'testthat'
  
  The following object is masked from 'package:rtemis':
  
      describe
  
  > 
  > test_check("rtemis")
  
  Attaching package: 'data.table'
  
  The following object is masked from 'package:base':
  
      %notin%
  
  2026-10-17 23:06:32 [0mInput contains more than one column; stratifying on last.[0m [resample]
  2026-10-17 23:06:32 [0mInput contains more than one column; stratifying on last.[0m [resample]
  2026-10-17 23:06:32 [0mUsing max n bins possible = 2.[0m [kfold]
  2026-10-17 23:06:32 [0mInput contains more than one column; stratifying on last.[0m [resample]
  2026-10-17 23:06:32 [0mUsing max n bins possible = 3.[0m [kfold]
  2026-10-17 23:06:32 [0m[1;38;2;15;106;102mβœ“[0m Created file: /home/hornik/tmp/scratch/RtmpG2RAo5/rtemis_cluster.json[0m
...[truncated]...
ds.[0m [train]
  [ FAIL 1 | WARN 4 | SKIP 4 | PASS 356 ]
  
  ══ Skipped tests (4) ═══════════════════════════════════════════════════════════
  β€’ For local testing only; requires CSV file (3): 'test_ClusterConfig.R:19:3',
    'test_DecomposeConfig.R:19:3', 'test_SuperConfig.R:48:3'
  β€’ empty test (1):
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_Clustering.R:96:3'): cluster_DBSCAN() succeeds ─────────────────
  Error: approx must be a single, finite, nonnegative number.
  Backtrace:
      β–†
   1. └─rtemis::cluster(...) at test_Clustering.R:96:3
   2.   └─rtemis:::cluster_(config = config, x = x, verbosity = verbosity)
   3.     β”œβ”€S7::S7_dispatch()
   4.     └─rtemis (local) `method(cluster_, rtemis::DBSCANConfig)`(...)
   5.       └─dbscan::dbscan(...)
   6.         └─dbscan:::.validate_nonnegative_scalar(extra$approx %||% 0, "approx")
  
  [ FAIL 1 | WARN 4 | SKIP 4 | PASS 356 ]
  Error:
  ! Test failures.
  Execution halted

CRAN check page ↗

Slowest check: 11.2 min · r-release-macos-x86_64
Status changes
  • ERROR11 OK, 2 ERROR2026-10-05
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK7 OK2026-03-27
Advisories

none known

Documentation

In release 1.4.2
READMEYes · 466 wordsVignettesNoNEWSYes · 100% structured · mentions 1.4.2Citation fileYes · cites a publicationWebsiteYes
Help pages
222 (18 internal)includes a package overview page
Examples that run
95%207 run in a plain check (10 of them under a condition) · 1 only when donttest examples are enabled (R CMD check --as-cran) · 10 never run
Exported functions with examples
99%
Documented parameters
99%
Return-value docs
100%
Help pages citing references
6%

Downloads

3.5K
CRAN downloads in the past year
Rank #6,373 · ~10/day · ~290/mo
Daily download trend is not available in this view yet.
46530 days
1.3K90 days
3.5K1 year
Compare downloads with other packages →
Also on64 r2u1 autocran

Repository

150Stars
21Forks
0Open issues
1Open PRs
15Releases
5,245Commits
4Commit identities
machine-learningmachine-learning-libraryrrstatsvisualizationdata-sciencedata-visualization
5,245 commits · Last activity 2026-10-23 · 0% stars, 30d · Default branch at 1.4.3, ahead of CRAN 1.4.2 (checked 2026-10-22) · Discussions: 3 posts
Responsiveness
How these are sampled
PRs merged (all time)
98%
Median days to close, 50 most recently updated closed issues
0
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-10-08 · 1472026-08-05 · 150
PracticesBeta

5 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/rtemis-org/rtemis on 2026-10-22.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux and Windows

Governance and community (1)
Contributing guide
Docs source (1)

GitHub Pages site last deployed 2025-06-04

Reproducibility and dev environment (1)
data-raw/
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
65 external dependencies (excludes base and recommended)

Installing rtemis adds 40 packages (22 with compiled code, 33 MB of source tarballs). Heaviest: data.table 5.7 MB, bslib 5.6 MB, sass 2.9 MB.

Depends (1)
R >= 4.4.0
Imports (14)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

Datasets

People & History

People (1)
Author, Maintainer since 1.0.0 (2026), Copyright holder
Releases (3)

Pick two releases to compare their code metrics.

  • 1.4.2Latest
    record
    2026-10-19 · current release · diff ↗ ·
    removed 46 exports
    available_draw, available_themes, choose_theme, col2grayscale, color_adjust, draw_3Dscatter, draw_bar, draw_box, draw_calibration, draw_confusion, draw_dist, draw_fit, draw_graphD3, draw_graphjs, draw_heatmap, draw_leaflet, draw_pie, draw_protein, draw_pvals, draw_roc, draw_scatter, draw_spectrogram, draw_survfit, draw_table, draw_ts, draw_varimp, draw_volcano, draw_xt, get_palette, preprocess.class_tabular.Preprocessor and 16 more
    added 112 exports
    .drop_meta_keys, .get_alg_name, .get_clust_name, .get_decom_name, .list_to_ClusteringConfig, .list_to_PreprocessorConfig, .list_to_SuperConfig, .list_to_SupervisedPreprocessorConfig, .supervised_algorithms, HyperparameterCandidates, JSONSchema_to_S7, S7_dispatcher_JSONSchema, S7_to_JSONSchema, ai_review, applicable_metrics, apply_preprocessor, available_calibration, bias_variance, conformal, conformal_metrics, data_fingerprint, data_profile, decomp_metrics, decomposition_traits, draw_linad, explain, explanation_methods, fit_predict, fitted_config, get_learning_curve and 82 more
  • R
    R 4.6.0 released · 2026-04-24
  • 1.2.7
    record
    2026-03-26 · diff ↗ ·
    removed 3 exports
    present.list, rtemis_colors, write_toml
    added 15 exports
    .list_to_DecompositionConfig, .list_to_Hyperparameters, .list_to_ResamplerConfig, .list_to_TunerConfig, apply_decomp, get_varimp, numeric_features, roc_curve, set_positive_class, setup_ClusterConfig, setup_DecomposeConfig, setup_SuperConfigLive, show_color_key, to_json, write_config
  • 1.0.0
    record
    2026-03-26
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2026-03-26
Total releases
3 / 1 yrs
License
BSD_3_clause + file LICENSE OSI · relicensed from GPL (>= 3) in 1.4.2
Minimum R
≥ 4.4.0
Download size
2.1 MB

Cite

Cite this package

Run in R for the authors' entry:

citation("rtemis")

The package provides a citation file, so citation() returns the authors' own entry.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for rtemis version 1.4.2 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy