Classification Learner: Not all table variables appear as potential responses
3 views (last 30 days)
Show older comments
John Burkhardt
on 15 Jan 2019
Commented: John Burkhardt
on 23 Jan 2019
I'm using the Classification Learner app in MATLAB 9.4.0.813654 (R2018a) on a Windows Server 2016 Datacenter with table data.The table has six variables and 10097 records. Four variables are doubles and two are catagorical. When I select the table from the available workspace variables in the New Session window all six variables appear in the Predictors window. Only four appear in the Response dropdown, however, two categorical and two double. Why are not all of the variables available as Resonse variables? More confusingly, if I try the same thing with a table that only incldues the first four records, all the variables show up as potential predictors but only two show up as potential response variables. If I do the same thing with a table that only includes the first six records, again, all of the variables show up as potential predictors but only two variables show up as potential response variables but they are different than in the four record case. What's going on? Stumped.
2 Comments
Stephan
on 16 Jan 2019
Edited: Stephan
on 16 Jan 2019
Please use comment function for comments, in order to let people see that there is no answer to your question until now.
If i open subtable1.mat i get:

Also i get the same result when opening subtable2.mat. I guess what you want me to test is the marked subtable1 and subtable2 (?).
Accepted Answer
Stephan
on 16 Jan 2019
Hi,
here is a try for an answer, which i can not prove by a link from the documentation, but which seems to be logical to me:
If we try to use this dataset in classification learner app, we can use all variables as predictor:

But we can not use 'E' as response.Try this on your subtable1 variable:
>> format long
>> unique(subtable1(:,'E'))
ans =
16×1 table
E
____________
6.8338422432
6.8342400812
6.8343378922
6.8343442664
6.8364939104
6.8368686694
6.8408070458
6.8411429002
6.841627779
6.8418271376
6.8431855016
6.8437495084
6.8438446818
6.8439594174
6.844679702
6.844730256
The dataset has a size of 16 observations and we want to classify. How can we classify if every observation has a different 'E' value. This is not very useful to try. I think Classification learner app is smart enough to notice, that this variable is not suitable for the purpose as a response variable.
This would be different if you would use the regression learner app, since this is the job of the regression learner. But in the regression learner app the categorical variables 'A' and 'B' would not work as response, since they do not make any sense for a regression result.
Best regards
Stephan
More Answers (1)
See Also
Categories
Find more on Classification Learner App 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!