[02ea2d]: / man / conf_matrix_cb.Rd

Download this file

31 lines (27 with data), 1.2 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/callbacks.R
\name{conf_matrix_cb}
\alias{conf_matrix_cb}
\title{Confusion matrix callback.}
\usage{
conf_matrix_cb(path_tensorboard, run_name, confMatLabels, cm_dir)
}
\arguments{
\item{path_tensorboard}{Path to tensorboard directory or \code{NULL}. If \code{NULL}, training not tracked on tensorboard.}
\item{run_name}{Name of the run. Name will be used to identify output from callbacks. If \code{NULL}, will use date as run name.
If name already present, will add \code{"_2"} to name or \code{"_{x+1}"} if name ends with \verb{_x}, where \code{x} is some integer.}
\item{confMatLabels}{Names of classes.}
\item{cm_dir}{Directory that contains confusion matrix files.}
}
\value{
Keras callback, plot confusion matrix in tensorboard.
}
\description{
Create a confusion matrix to display under tensorboard images.
}
\examples{
\dontshow{if (reticulate::py_module_available("tensorflow")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
cm <- conf_matrix_cb(path_tensorboard = tempfile(), run_name = 'run_1',
confMatLabels = c('label_1', 'label_2'), cm_dir = tempfile())
\dontshow{\}) # examplesIf}
}