2
$\begingroup$

I was reading the Decision Trees user guide of sklearn to understand some of the underlying mathematics behind trees. Everything was fine until I stumbled upon some notation I'm not understanding. This is what appears in the documentation:

enter image description here

(link to the documentation can be found here)

My problem is I have no idea how to interpret or even read Q_left and Q_right. Is this some set theory specific notation? Any help would be appreciated.

$\endgroup$
2
  • $\begingroup$ The tree is splitting the data to reduce the error, Q is the data, Q left is the data that goes in the left node, Q right is the data that goes in the right node. The first line is saying that Q left is defined by xj being less than or equal to tm, which is the hypothetical best split. Q right, as Wayne said, is everything else, AKA where xj > tm. $\endgroup$ Commented Sep 24, 2019 at 21:29
  • $\begingroup$ For more information about notation...$Q_{left}$ is defined using set builder notation and $Q_{right}$ is defined using the set difference $\endgroup$
    – user20160
    Commented Sep 24, 2019 at 22:06

1 Answer 1

3
$\begingroup$

Do you mean you literally don't know what $Q_{left}$ means or how to pronounce it, or do you mean what the right-hand sides mean?

In term of the right-hand sides, the $|$ appears to mean a conditional, so $Q_{left}$ is the set of (x,y) pairs such that $x_j <= t_m$ The backslash in $Q_{right}$ appears to be the set complement: $Q_{right}$ is elements of $Q$ not including the elements of $Q_{left}$.

EDIT: I changed the backslash operator name to the more correct "complement". Wikipedia describes here: https://en.wikipedia.org/wiki/Set_(mathematics)

$\endgroup$
1
  • $\begingroup$ It was about the right hand sides. Most time when you read the notation out loud is quite easy to understand what it means. I didn't know about set substraction notation (even though it was kind of evident based on what Qleft and Qright are. Thanks a lot ! $\endgroup$
    – Juan C
    Commented Sep 24, 2019 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.