Mixed Data Types In a Table
显示 更早的评论
I'll preface this by stating I'm new to Matlab.
I have data stored in a table, and that table contains numeric (double), categorical, and ordinal data. I need to convert the table to a matrix of type "double" to run predictive classification (fitensemble). If I try the command: double(X), I get an error that "Conversion to double from table is not possible". I can't convert the table to an array, because its not possible to concatenate double and categorical arrays.
I've tried:
classreg.regr.modelutils.predictormatrix (X);
which works, but drops the last column of the table.
How can I (efficiently) create a matrix of predictors from a table of mixed data types?
Thanks.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Classification Ensembles 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!