Good day,
The intention is to convert the dataset into a format suitable for the random
forest classifier implemented by the CRAN package xgboost. The input data is
required to be transformed into one-hot format using the sparse.discrim.matrix
function, as specified by the package's vignette of
color and clarity are ordered factors, so sparse.model.matrix is
generating orthogonal-polynomial contrasts (see ?contr.poly). This is
by design ... what are you trying to do? Are you interested in fac2sparse?
On 18-02-07 11:00 PM, Dario Strbenac wrote:
> Good day,
>
> Sometimes, sparse.mo