fitctree (decision trees) does not work in the following simple example! why
Show older comments
executing the following code no warning/error message is occured. The graph is a dot and the predicrtion is error
clear; close all;
x=[1,3;
2,2;
1,4;
0,0;
3,3];
c={'a'; 'a'; 'b'; 'b';'b'};
tr= fitctree(x,c)
view(tr,'Mode','graph')
label = predict(tr,x(1,:))
2 Comments
Steven Lord
on 13 Apr 2021
What does "does non[sic] work" mean here?
- Do you receive warning and/or error messages? If so the full and exact text of those messages (all the text displayed in orange and/or red in the Command Window) may be useful in determining what's going on and how to avoid the warning and/or error.
- Does it do something different than what you expected? If so, what did it do and what did you expect it to do?
- Did MATLAB crash? If so please send the crash log file (with a description of what you were running or doing in MATLAB when the crash occured) to Technical Support using the Contact Support link on the Support section of the MathWorks website so we can investigate.
Charalampos Strouthopoulos
on 13 Apr 2021
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!