\item{data}{A data.frame or data.table to prepare.}
\item{data}{A data.frame or data.table to prepare.}
}
}
\value{
\value{
The cleaned dataset. It must be converted to a matrix format (\code{as.matrix}) for input in \code{lgb.Dataset}.
The cleaned dataset. It must be converted to a matrix format (\code{as.matrix})
for input in \code{lgb.Dataset}.
}
}
\description{
\description{
Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}. Factors and characters are converted to numeric without integers. Please use \code{lgb.prepare_rules} if you want to apply this transformation to other datasets.
Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}.
Factors and characters are converted to numeric without integers. Please use
\code{lgb.prepare_rules} if you want to apply this transformation to other datasets.
\item{data}{A data.frame or data.table to prepare.}
\item{data}{A data.frame or data.table to prepare.}
}
}
\value{
\value{
The cleaned dataset. It must be converted to a matrix format (\code{as.matrix}) for input in \code{lgb.Dataset}.
The cleaned dataset. It must be converted to a matrix format (\code{as.matrix})
for input in \code{lgb.Dataset}.
}
}
\description{
\description{
Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}. Factors and characters are converted to numeric (specifically: integer). Please use \code{lgb.prepare_rules2} if you want to apply this transformation to other datasets. This is useful if you have a specific need for integer dataset instead of numeric dataset. Note that there are programs which do not support integer-only input. Consider this as a half memory technique which is dangerous, especially for LightGBM.
Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}.
Factors and characters are converted to numeric (specifically: integer).
Please use \code{lgb.prepare_rules2} if you want to apply this transformation to other datasets.
This is useful if you have a specific need for integer dataset instead of numeric dataset.
Note that there are programs which do not support integer-only input. Consider this as a half
memory technique which is dangerous, especially for LightGBM.
\item{rules}{A set of rules from the data preparator, if already used.}
\item{rules}{A set of rules from the data preparator, if already used.}
}
}
\value{
\value{
A list with the cleaned dataset (\code{data}) and the rules (\code{rules}). The data must be converted to a matrix format (\code{as.matrix}) for input in \code{lgb.Dataset}.
A list with the cleaned dataset (\code{data}) and the rules (\code{rules}).
The data must be converted to a matrix format (\code{as.matrix}) for input
in \code{lgb.Dataset}.
}
}
\description{
\description{
Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}. Factors and characters are converted to numeric. In addition, keeps rules created so you can convert other datasets using this converter.
Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}.
Factors and characters are converted to numeric. In addition, keeps rules created
so you can convert other datasets using this converter.
\item{rules}{A set of rules from the data preparator, if already used.}
\item{rules}{A set of rules from the data preparator, if already used.}
}
}
\value{
\value{
A list with the cleaned dataset (\code{data}) and the rules (\code{rules}). The data must be converted to a matrix format (\code{as.matrix}) for input in \code{lgb.Dataset}.
A list with the cleaned dataset (\code{data}) and the rules (\code{rules}).
The data must be converted to a matrix format (\code{as.matrix}) for input in
\code{lgb.Dataset}.
}
}
\description{
\description{
Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}. Factors and characters are converted to numeric (specifically: integer). In addition, keeps rules created so you can convert other datasets using this converter. This is useful if you have a specific need for integer dataset instead of numeric dataset. Note that there are programs which do not support integer-only input. Consider this as a half memory technique which is dangerous, especially for LightGBM.
Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}.
}
Factors and characters are converted to numeric (specifically: integer).
\examples{
In addition, keeps rules created so you can convert other datasets using this converter.
library(lightgbm)
This is useful if you have a specific need for integer dataset instead of numeric dataset.
data(iris)
Note that there are programs which do not support integer-only input.
Consider this as a half memory technique which is dangerous, especially for LightGBM.
andonemetric.Ifthere's more than one, will check all of them
Requiresatleastonevalidationdataandonemetric
except the training data. Returns the model with (best_iter + early_stopping_rounds).
Ifthere's more than one, will check all of them except the training data
If early stopping occurs, the model will have 'best_iter' field.}
Returns the model with (best_iter + early_stopping_rounds)
If early stopping occurs, the model will have 'best_iter' field}
\item{callbacks}{list of callback functions
\item{callbacks}{List of callback functions that are applied at each iteration.}
List of callback functions that are applied at each iteration.}
\item{reset_data}{Boolean, setting it to TRUE (not the default value) will transform the booster model into a predictor model which frees up memory and the original datasets}
\item{reset_data}{Boolean, setting it to TRUE (not the default value) will transform the
booster model into a predictor model which frees up memory and the
original datasets}
\item{...}{other parameters, see Parameters.rst for more information. A few key parameters:
\item{...}{other parameters, see Parameters.rst for more information. A few key parameters:
src<-file.path(lib_folder,paste0("/windows/x64/DLL/lib_lightgbm",SHLIB_EXT),fsep="/")# Expected result: installation will fail if it is not here or any other
# Expected result: installation will fail if it is not here or any other