Skip to content
Snippets Groups Projects
Area_Under_Curve.Rd 619 B
Newer Older
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mlmetrics.R
\name{Area_Under_Curve}
\alias{Area_Under_Curve}
\title{Calculate the Area Under the Curve}
\usage{
Arnaud Duvermy's avatar
Arnaud Duvermy committed
Area_Under_Curve(x, y, method = "trapezoid")
}
\arguments{
\item{x}{the x-points of the curve}

\item{y}{the y-points of the curve}

\item{method}{can be "trapezoid" (default), "step" or "spline"}
}
\value{
Area Under the Curve (AUC)
}
\description{
Calculate the area under the curve.
}
\examples{
x <- seq(0, pi, length.out = 200)
plot(x = x, y = sin(x), type = "l")
Arnaud Duvermy's avatar
Arnaud Duvermy committed
Area_Under_Curve(x = x, y = sin(x), method = "trapezoid")