[R] Remove enable_categorical parameter (#10018)
This commit is contained in:
@@ -19,8 +19,7 @@ xgb.DMatrix(
|
||||
qid = NULL,
|
||||
label_lower_bound = NULL,
|
||||
label_upper_bound = NULL,
|
||||
feature_weights = NULL,
|
||||
enable_categorical = FALSE
|
||||
feature_weights = NULL
|
||||
)
|
||||
|
||||
xgb.QuantileDMatrix(
|
||||
@@ -37,7 +36,6 @@ xgb.QuantileDMatrix(
|
||||
label_lower_bound = NULL,
|
||||
label_upper_bound = NULL,
|
||||
feature_weights = NULL,
|
||||
enable_categorical = FALSE,
|
||||
ref = NULL,
|
||||
max_bin = NULL
|
||||
)
|
||||
@@ -50,10 +48,6 @@ Supported input types are as follows:\itemize{
|
||||
\item \code{matrix} objects, with types \code{numeric}, \code{integer}, or \code{logical}.
|
||||
\item \code{data.frame} objects, with columns of types \code{numeric}, \code{integer}, \code{logical}, or \code{factor}.
|
||||
|
||||
If passing \code{enable_categorical=TRUE}, columns with \code{factor} type will be treated as categorical.
|
||||
Otherwise, if passing \code{enable_categorical=FALSE} and the data contains \code{factor} columns, an error
|
||||
will be thrown.
|
||||
|
||||
Note that xgboost uses base-0 encoding for categorical types, hence \code{factor} types (which use base-1
|
||||
encoding') will be converted inside the function call. Be aware that the encoding used for \code{factor}
|
||||
types is not kept as part of the model, so in subsequent calls to \code{predict}, it is the user's
|
||||
@@ -102,7 +96,7 @@ frame and matrix.
|
||||
|
||||
\item{feature_types}{Set types for features.
|
||||
|
||||
If \code{data} is a \code{data.frame} and passing \code{enable_categorical=TRUE}, the types will be deduced
|
||||
If \code{data} is a \code{data.frame} and passing \code{feature_types} is not supplied, feature types will be deduced
|
||||
automatically from the column types.
|
||||
|
||||
Otherwise, one can pass a character vector with the same length as number of columns in \code{data},
|
||||
@@ -129,20 +123,6 @@ functionalities such as feature importances.}
|
||||
|
||||
\item{feature_weights}{Set feature weights for column sampling.}
|
||||
|
||||
\item{enable_categorical}{Experimental support of specializing for categorical features.
|
||||
|
||||
\if{html}{\out{<div class="sourceCode">}}\preformatted{ If passing 'TRUE' and 'data' is a data frame,
|
||||
columns of categorical types will automatically
|
||||
be set to be of categorical type (feature_type='c') in the resulting DMatrix.
|
||||
|
||||
If passing 'FALSE' and 'data' is a data frame with categorical columns,
|
||||
it will result in an error being thrown.
|
||||
|
||||
If 'data' is not a data frame, this argument is ignored.
|
||||
|
||||
JSON/UBJSON serialization format is required for this.
|
||||
}\if{html}{\out{</div>}}}
|
||||
|
||||
\item{ref}{The training dataset that provides quantile information, needed when creating
|
||||
validation/test dataset with \code{xgb.QuantileDMatrix}. Supplying the training DMatrix
|
||||
as a reference means that the same quantisation applied to the training data is
|
||||
|
||||
@@ -15,8 +15,7 @@ xgb.ProxyDMatrix(
|
||||
qid = NULL,
|
||||
label_lower_bound = NULL,
|
||||
label_upper_bound = NULL,
|
||||
feature_weights = NULL,
|
||||
enable_categorical = FALSE
|
||||
feature_weights = NULL
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
@@ -57,7 +56,7 @@ frame and matrix.
|
||||
|
||||
\item{feature_types}{Set types for features.
|
||||
|
||||
If \code{data} is a \code{data.frame} and passing \code{enable_categorical=TRUE}, the types will be deduced
|
||||
If \code{data} is a \code{data.frame} and passing \code{feature_types} is not supplied, feature types will be deduced
|
||||
automatically from the column types.
|
||||
|
||||
Otherwise, one can pass a character vector with the same length as number of columns in \code{data},
|
||||
@@ -81,20 +80,6 @@ functionalities such as feature importances.}
|
||||
\item{label_upper_bound}{Upper bound for survival training.}
|
||||
|
||||
\item{feature_weights}{Set feature weights for column sampling.}
|
||||
|
||||
\item{enable_categorical}{Experimental support of specializing for categorical features.
|
||||
|
||||
\if{html}{\out{<div class="sourceCode">}}\preformatted{ If passing 'TRUE' and 'data' is a data frame,
|
||||
columns of categorical types will automatically
|
||||
be set to be of categorical type (feature_type='c') in the resulting DMatrix.
|
||||
|
||||
If passing 'FALSE' and 'data' is a data frame with categorical columns,
|
||||
it will result in an error being thrown.
|
||||
|
||||
If 'data' is not a data frame, this argument is ignored.
|
||||
|
||||
JSON/UBJSON serialization format is required for this.
|
||||
}\if{html}{\out{</div>}}}
|
||||
}
|
||||
\value{
|
||||
An object of class \code{xgb.ProxyDMatrix}, which is just a list containing the
|
||||
|
||||
Reference in New Issue
Block a user