Message-ID: <SYAPR01MB29097AC9E88583C9F37C062CCDF30@SYAPR01MB2909.ausprd01.prod.outlook.com>
Date: 2018-02-09T00:00:11Z
From: Dario Strbenac
Subject: sparse.model.matrix Generates Non-Existent Factor Levels if Ord.factor Columns Present
In-Reply-To: <8514e60d-e80b-456f-a9fa-150f70a808d7@gmail.com>
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 URL https://cran.r-project.org/web/packages/xgboost/vignettes/discoverYourData.html I did not know to read the help page for contr.poly after reading the sparse.discrim.matrix help page. Perhaps there could be a helpful mention added to it?
--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia