How can I use the Classification Learner App with a table dataset which has some cells that are arrays?

3 views (last 30 days)
I want to use the Classification Learner App. My predictor variables are stored as arrays in the table (columns 31, 32, 33 and 34 in the screenshot) and my target variable is string (column 30 in the screenshot). I get the error "Unable to find suitable response variable in the workspace" in the CL App. Is there a way for me to use the Classification Learner app with my current dataset?
Dataset

Answers (1)

dpb
dpb on 29 Jul 2023
"Predictor and response variables can be numeric, categorical, string, or logical vectors, cell arrays of character vectors, or character arrays."
So, not as presently structred, no.
Without any knowledge of what the data are, it's impossible to say much, but you would either have to expand the table by each cell duplicating the other variables N times to turn the cell arrays into vectors; doing so would likely end up running out of memory.
Althernatively, one would have to have some way to reduce the cell array vectors to a value that represents that particular set of data as a composite entity, not every element within the given vector. Whether this might be possible or not, we've no way to know.
But, the tool isn't designed nor equipped to handle such data as it is presently structured; you'll have to either rearrange your data to meet the tool's requirments or use another toolset.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!