Good day, I am developing a wrapper around xgboost which does not (yet - I see that it is on the developer's version 2.0 task list) support factor variable type. It requires input data to be in one-hot encoding, which is created by Matrix::sparse.model.matrix. For further analysis, such as variable importance, is there a way to identify which original feature each column of a sparse.model.matrix result was derived from? Using str(oneHotMatrix), I don't see any class slots nor tacked-on attributes which would confidently allow the identification of original column names of the expanded input data. Is there an alternative way to robustly identify the original variable names?
-------------------------------------- Dario Strbenac University of Sydney Camperdown NSW 2050 Australia ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel