Could anyone help me how to solve the error stating Y must be a vector of categorical responses or a cell array of categorical response sequences.
12 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
In my code Y is {3x1} cell
where Y{1,1}=12x1 double
Y{2,1}=12x2 double
Y{3,1}=12x3 double
Could anyone help me how should I change Y to a cell array of categorical response sequences.
0 comentarios
Respuestas (2)
jaah navi
el 20 de Jun. de 2021
1 comentario
Walter Roberson
el 20 de Jun. de 2021
Sorry, No, that is not valid training information.
If XTrain is a numeric array, then YTrain must be a categorical vector with number of entries equal to the number of samples in XTrain.
If XTrain is a cell array of numeric arrays, then YTrain must be a cell array, and each entry must be a categorical vector with number of entries each to the number of samples in the corresponding XTrain cell.
YTrain corresponds to class labels: each training sample (no matter how many features it has) corresponds to exactly one class.
Your Y{2,1} is 12 x 2. That would imply that you have two classes for each of 12 samples, or else that you have 12 classes for each of two samples. Either way is not permitted.
Ver también
Categorías
Más información sobre Deep Learning Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!