rtModLogger-class: 'rtemis' model logger

rtModLogger-classR Documentation

rtemis model logger

Description

rtemis model logger

rtemis model logger

Details

R6 class to save trained models' parameters and performance. Keep your experiment results tidy in one place, with an option to write out to a multi-sheet Excel file.

Public fields

mods

List of trained models

Methods

Public methods


Method new()

Initialize rtModLogger object

Usage
rtModLogger$new(mods = list())
Arguments
mods

List of trained models


Method print()

Print method for rtModLogger object

Usage
rtModLogger$print()

Method add()

Add model to logger

Usage
rtModLogger$add(mod, verbose = TRUE)
Arguments
mod

Model to add

verbose

Logical: If TRUE, print messages to console


Method summarize()

Summary method for rtModLogger

Usage
rtModLogger$summarize(
  class.metric = "Balanced Accuracy",
  reg.metric = "Rsq",
  surv.metric = "Coherence",
  decimal.places = 3,
  print.metric = FALSE
)
Arguments
class.metric

Character: Metric to use for Classification models

reg.metric

Character: Metric to use for Regression models

surv.metric

Character: Metric to use for Survival models

decimal.places

Integer: Number of decimal places to display

print.metric

Logical: If TRUE, print metric name


Method summary()

Summary method for rtModLogger

Usage
rtModLogger$summary(
  class.metric = "Balanced Accuracy",
  reg.metric = "Rsq",
  surv.metric = "Coherence"
)
Arguments
class.metric

Character: Metric to use for Classification models

reg.metric

Character: Metric to use for Regression models

surv.metric

Character: Metric to use for Survival models


Method tabulate()

Tabulate models' parameters and performance

Usage
rtModLogger$tabulate(filename = NULL)
Arguments
filename

Character: Path to file to save parameters and performance - will be saved as .xlsx file with multiple sheets


Method plot()

Plot method for rtModLogger

Usage
rtModLogger$plot(
  names = NULL,
  col = unlist(rtpalette(rtPalette)),
  mar = NULL,
  ...
)
Arguments
names

Character: Model names

col

Colors to use

mar

Float, vector: plot margins

...

Additional arguments to pass to plotting function


Method clone()

The objects of this class are cloneable with this method.

Usage
rtModLogger$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on Dec. 17, 2024, 6:16 p.m.