% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/downsample.R
\name{downsample}
\alias{downsample}
\title{Downsample (subsample) a task or a data.frame.}
\usage{
downsample(obj, perc = 1, stratify = FALSE)
}
\arguments{
\item{obj}{[\code{\link{Task}} | \code{\link{ResampleInstance}}]\cr
Input data or a \code{ResampleInstance}.}

\item{perc}{[\code{numeric(1)}]\cr
Percentage from [0, 1].
Default is 1.}

\item{stratify}{[\code{logical(1)}]\cr
Only for classification:
Should the downsampled data be stratified according to the target classes?
Default is \code{FALSE}.}
}
\value{
[\code{data.frame} | \code{\link{Task}} | \code{\link{ResampleInstance}}]. Same type as \code{obj}.
}
\description{
Decrease the observations in a \code{task} or a \code{ResampleInstance}
to a given percentage of observations.
}
\seealso{
\code{\link{makeResampleInstance}}

Other downsample: \code{\link{makeDownsampleWrapper}}
}
