lgb.prepare_rules2.Rd 1.08 KB
Newer Older
James Lamb's avatar
James Lamb committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lgb.prepare_rules2.R
\name{lgb.prepare_rules2}
\alias{lgb.prepare_rules2}
\title{Data preparator for LightGBM datasets with rules (integer)}
\usage{
lgb.prepare_rules2(data, rules = NULL)
}
\arguments{
\item{data}{A data.frame or data.table to prepare.}

\item{rules}{A set of rules from the data preparator, if already used.}
}
\value{
15
16
17
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}.
James Lamb's avatar
James Lamb committed
18
19
}
\description{
20
21
22
23
24
25
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.
James Lamb's avatar
James Lamb committed
26
}