Decision Tree How to perform Split?

Say I have a https://imgur.com/a/sjxoexs. I want to insert everything in the A1 column to the left if it's bigger than A1, if it's not bigger than I want to insert it to the right of my decision node. Something like this https://imgur.com/a/myOIE8X.

To manage the data I created a struct and each line would be a data object of its own so the first line (1,4) classification is yes, 2nd line (77,6) classification is no, last data line is (8,9) classification is yes.

I'm not sure how to organize that data where values in the A1 column that A1 > 8 is on the left else on the right.

How would I store the values of my vector in to one node, and map the correct classification to the values for instance right of A1 > 8 would have values
(8, 1) and their respective classification is (yes, yes)



1
2
3
4
5
 struct data
    {
    	string group;
    	vector<double> values;
    };
Last edited on
Topic archived. No new replies allowed.