Why I can't load data to Classification Learner App
Mostrar comentarios más antiguos
After selecting the trainData I cannot select response.

trainData is prepared like this

Last column is the label.
3 comentarios
Image Analyst
el 30 de Nov. de 2024
I don't know. It should enable those radio buttons once the data has been loaded into the app.
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
save('answers.mat', 'trainData');
then attach answers.mat with the paperclip icon.
I tried to reproduce the error you are facing using the ' Train Decision Trees Using Classification Learner App' example and the 'Response' select options are active.
fishertable = readtable("fisheriris.csv")
% Convert the cell array to a categorical array
categoryCategorical = categorical(fishertable.Species);
% Convert the categorical array to a double array
categoryDouble = double(categoryCategorical);
fishertable.Species = categoryDouble;
trainData = table2array(fishertable)

Cris LaPierre
el 30 de Nov. de 2024
Editada: Cris LaPierre
el 30 de Nov. de 2024
Just a thought, but I think you have too many unique response values.
- Predictor and response variables can be numeric, categorical, string, or logical vectors, cell arrays of character vectors, or character arrays. The response variable cannot contain more than 500 unique class labels. (ref)
Confirm that you want to perform classification. If so, select a subset of your data (<500 rows) and load that into the Classification Learner App. Let us know if that fixes the problem.
Respuestas (1)
Drew
el 9 de Dic. de 2024
0 votos
Since all of the data is of type "double", perhaps you had intended to use Regression Learner app?
If classification is intended, how many unique values (classes) are there for the response variable?
Categorías
Más información sobre Classification Learner App en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!