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>.
setup_*() function and published as a JSON Schema at schema.rtemis.org. write_config() and read_config() move the same config between R, the rtemis CLI, and rtemislive.train(), cluster(), and decomp() provide one-call supervised learning, clustering, and decomposition. A single train() call handles preprocessing, decomposition, hyperparameter tuning, stacking, and nested resampling.verbosity.review() assesses a trained model, and writeup() drafts its Methods and Results with every number traceable to its source.explain()), calibration, and conformal prediction.data.frame, data.table, and tibble inputs.
pak::pak("rtemis")
or
install.packages("rtemis")
r-universepak::repo_add(rtemis_universe = "https://rtemis-org.r-universe.dev")
pak::pak("rtemis")
or using install.packages:
install.packages(
'rtemis',
repos = c('https://rtemis-org.r-universe.dev', 'https://cloud.r-project.org')
)
Every rtemis call that uses third-party packages includes a check for required dependencies and will print a message if any are missing.
It is essential to maintain transparency of operations at all times.
rtemis functions often call multiple other functions, sometime recursively. The package uses a formatted messaging system to provide logging output which includes:
Most function include a verbosity argument to control the level of messaging output, with support for three levels:
0: silent1: normal messaging2: detailed messaging for debuggingsetup_ functionsMachine learning workflows involve multiple steps, each with their own configuration options.
It is essential that a) the user has complete control over each step, while maintaining an intuitive, user-friendly interface, and b) user input is validated early, before a potentially long-running operation is started.
The following setup_ functions are available to configure each step of the workflow:
setup_CART(), setup_GAM(), etc.setup_GridSearch()setup_CMeans(), setup_HardCL(), etc.setup_NMF(), setup_ICA(), etc.setup_KFold(), setup_StratSub(), etc.setup_Preprocessor()The following will perform hyperparameter tuning and 10-fold cross-validation.
It will train (3*3*2*5 + 1) * 25 = 2275 models total.
mod_lightgbm <- train(
dat,
hyperparameters = setup_LightGBM(
num_leaves = tune_over(2^(1:3)),
learning_rate = tune_over(.001, .005, .01),
subsample = tune_over(.6, .9)
),
outer_resampling_config = setup_StratSub(
n_resamples = 25L
)
)
clust_cmeans <- cluster(
dat,
config = setup_CMeans(k = 4L)
)
decomp_ica <- decomp(
dat,
config = setup_ICA(k = 12L)
)
The documentation is available at docs.rtemis.org/r/ml, which includes walkthroughs of main features and full API reference.
© 2016–2026 E.D. Gennatas. Licensed under BSD 3-Clause.