TrainOutput: Stores the results achieved during training.

TrainOutputR Documentation

Stores the results achieved during training.

Description

This class manages the results achieved during training stage (such as optimized hyperparameters, model information, utilized metrics).

Methods

Public methods


Method new()

Function used to initialize the object arguments during runtime.

Usage
TrainOutput$new(models, class.values, positive.class)
Arguments
models

A list containing the best M.L. model for each cluster.

class.values

A character vector containing the values of the target class.

positive.class

A character with the value of the positive class.


Method getModels()

The function is used to obtain the best M.L. model of each cluster.

Usage
TrainOutput$getModels(metric)
Arguments
metric

A character vector which specifies the metric(s) used for configuring M.L. hyperparameters.

Returns

A list is returned of class train.


Method getPerformance()

The function returns the performance value of M.L. models during training stage.

Usage
TrainOutput$getPerformance(metrics = NULL)
Arguments
metrics

A character vector which specifies the metric(s) used to train the M.L. models.

Returns

A character vector containing the metrics used for configuring M.L. hyperparameters.


Method savePerformance()

The function is used to save into CSV file the performance achieved by the M.L. models during training stage.

Usage
TrainOutput$savePerformance(dir.path, metrics = NULL)
Arguments
dir.path

The location to store the into a CSV file the performance of the trained M.L.

metrics

An optional parameter specifying the metric(s) used to train the M.L. models. If not defined, all the metrics used in train stage will be saved.


Method plot()

The function is responsible for creating a plot to visualize the performance achieved by the best M.L. model on each cluster.

Usage
TrainOutput$plot(dir.path, metrics = NULL)
Arguments
dir.path

The location to store the exported plot will be saved.

metrics

An optional parameter specifying the metric(s) used to train the M.L. models. If not defined, all the metrics used in train stage will be plotted.


Method getMetrics()

The function returns all metrics used for configuring M.L. hyperparameters during train stage.

Usage
TrainOutput$getMetrics()
Returns

A character value.


Method getClassValues()

The function is used to get the values of the target class.

Usage
TrainOutput$getClassValues()
Returns

A character containing the values of the target class.


Method getPositiveClass()

The function returns the value of the positive class.

Usage
TrainOutput$getPositiveClass()
Returns

A character vector of size 1.


Method getSize()

The function is used to get the number of the trained M.L. models. Each cluster contains the best M.L. model.

Usage
TrainOutput$getSize()
Returns

A numeric value or NULL training was not successfully performed.


Method clone()

The objects of this class are cloneable with this method.

Usage
TrainOutput$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

D2MCS


D2MCS documentation built on Aug. 23, 2022, 5:07 p.m.