On Mon, 10 Oct 2022 08:00:04 +0000 Dario Strbenac <dstr7...@uni.sydney.edu.au> wrote:
> 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? ?Matrix::sparse.model.matrix seems to recommend MatrixModel::model.Matrix for this reason. The latter function returns an object with additional slots `assign` and `contrasts`, which should make it possible to recover the original columns. -- Best regards, Ivan ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel