| trainingReport | R Documentation |
Display a (r,c) panel history plot from SEMdnn() output,
with x = number of epochs, y = training loss for each MLP model and bootstrap
sample, if nboot > 0.
trainingReport(object, size = NULL, r = 2, c = 2, ...)
object |
A model fitting object from |
size |
number of the multiple plots (default, |
r |
number of rows of the plot layout (default, |
c |
number of columns of the plot layout (default, |
... |
Currently ignored. |
The training history plot can provide an indication about the training of the model, such as: (i) its speed of convergence over epochs (slope), (ii) whether the model may have already converged (plateau of the line), (iii) whether the mode may be over-learning the training data (inflection for validation line), and more.
Invisibly returns a data.frame of the training loss history.
Mario Grassi mario.grassi@unipv.it
if (torch::torch_is_installed()){
# Load Sachs data (pkc)
ig<- sachs$graph
data<- sachs$pkc
data<- transformData(data)$data
group<- sachs$group
#...with train-test (0.5-0.5) samples
set.seed(123)
train<- sample(1:nrow(data), 0.5*nrow(data))
dnn <- SEMdnn(ig, data[train, ], algo = "layerwise",
hidden = 10, link = "relu", loss = "mse",
validation = 0.2, nboot = 0, epochs = 32)
tr <- trainingReport(dnn); tr
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.