[1c0e03]: / man / noisy_loss_wrapper.Rd

Download this file

27 lines (26 with data), 1.0 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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metrics.R
\name{noisy_loss_wrapper}
\alias{noisy_loss_wrapper}
\title{Loss function for label noise}
\usage{
noisy_loss_wrapper(noise_matrix)
}
\arguments{
\item{noise_matrix}{Matrix of noise distribution.}
}
\value{
A function implementing noisy loss.
}
\description{
Implements approach from this \href{https://arxiv.org/abs/1609.03683}{paper} and code from
\href{https://github.com/giorgiop/loss-correction/blob/15a79de3c67c31907733392085c333547c2f2b16/loss.py#L16-L21}{here}.
Can be used if labeled data contains noise, i.e. some of the data is labeled wrong.
}
\examples{
\dontshow{if (reticulate::py_module_available("tensorflow")) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
# If first label contains 5\% wrong labels and second label no noise
noise_matrix <- matrix(c(0.95, 0.05, 0, 1), nrow = 2, byrow = TRUE)
noisy_loss <- noisy_loss_wrapper(noise_matrix)
\dontshow{\}) # examplesIf}
}