Machine learning and visualization package with an 'S7' backend featuring comprehensive type checking and validation, paired with an efficient functional user-facing API. train(), cluster(), and decomp() provide one-call access to supervised and unsupervised learning. All configuration steps are performed using setup functions and validated. A single call to train() handles preprocessing, hyperparameter tuning, and testing with nested resampling. Supports 'data.frame', 'data.table', and 'tibble' inputs, parallel execution, and interactive visualizations. The package first appeared in E.D. Gennatas (2017) < https://repository.upenn.edu/entities/publication/d81892ea-3087-4b71-a6f5-739c58626d64>.
This is the new version of the rtemis R package and remains under active development.
The new version (0.99+) features:
setup_() functions, to offer increased transparency of configuration options.
pak::pak("rtemis")
or
install.packages("rtemis")
pak::pak("rtemis-org/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 external 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 debuggingrtemis includes an automatic text formatting system, which supports:
setup_ 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) the user input is validated immediately and 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_Resampler()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 = 2^(1:3),
learning_rate = c(.001, .005, .01),
subsample = c(.6, .9)
),
outer_resampling_config = setup_Resampler(
n_resamples = 25L,
type = "StratSub"
)
)
clust_cmeans <- cluster(
dat,
config = setup_CMeans(k = 4L)
)
decomp_ica <- decomp(
dat,
config = setup_ICA(k = 12L)
)
The original version included a long list of algorithms for supervised and unsupervised learning for testing and experimentation, many of which were rarely used. The initial release of the new version focuses on a smaller set of core algorithms, that will keep growing.
The original version included the mplot3 family of visualization functions using base R graphics and the dplot3 family using plotly.
The new release includes the draw family of functions, the evolution of the dplot3 family.
The documentation is available at docs.rtemis.org/r/ml, which includes walkthroughs of main features and full API reference.
There is a lot more coming - both within this package and the other packages in the rtemis framework.
The original, unmaintained version of rtemis remains available as rtemisalpha at rtemis-org/rtemis-legacy.
© 2016–2026 E.D. Gennatas. Licensed under GPL (>= 3).