% 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}{(\link{Task} | \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{
([data.frame\verb{| [Task] | [ResampleInstance]). Same type as}obj`.
}
\description{
Decrease the observations in a \code{task} or a \code{ResampleInstance}
to a given percentage of observations.
}
\seealso{
\link{makeResampleInstance}

Other downsample: 
\code{\link{makeDownsampleWrapper}()}
}
\concept{downsample}
