Mixed Data Types In a Table
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on Classification Ensembles in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!