Decision Tree returns -1

4 views
Skip to first unread message

Rick Keller

unread,
Aug 29, 2018, 3:03:57 PM8/29/18
to Accord.NET Framework
If I create a decision tree having 3 output classes (0,1,2), the tree is built with 4 (-1,0,1,2).  I exported the code and can see that there are many leaves with a -1.  For instance:

                                                if (input[44] == 0) {
                                                    return -1;
                                                }
                                                else if (input[44] == 1) {
                                                    return 0;
                                                }
                                                else if (input[44] == 2) {
                                                    return 2;
                                                }
                                                else throw new ArgumentException("input", "Unexpected value at position 44.");

Does -1 mean unclassifiable?
Reply all
Reply to author
Forward
0 new messages