0
$\begingroup$

I have an sklearn random forest which contains 3 estimators or trees. For a particular sample, I’ve used the “decision path” feature to extract the individual estimators’ decisions which are a set of constraints. I now have tuples as follows <set of constraints, probability> for each of the 3 estimators.

I wanted to know how I could join the “set of constraints” of all the individual estimators to get a combined decision region, i.e., a region where all points inside when passed to the RF will map to that particular sample (class). I am looking for the region to be as precise as possible. In the overlapping regions, the lower probability should be selected.

Any help or insights would be appreciated. Thank you!

$\endgroup$
2
  • $\begingroup$ Just for curiosity, can you show us some examples of those tuples <set of constraints, probability>? $\endgroup$
    – DaSim
    Commented Aug 18, 2022 at 7:24
  • $\begingroup$ ( x1>6.5, x2>=7.5, Prob = 0.67 ) , (x1>7, x2>8, Prob = 0.71) This would be an example of two regions with overlapping parts that have different probabilities $\endgroup$
    – giantjenga
    Commented Aug 18, 2022 at 12:10

1 Answer 1

0
$\begingroup$

I think this question is what you're looking for, just iterate this approach for every set containing multiple rules and you're done. I'd implement it considering different intersections (at first all the intersections of 2 rules, then all those of 3 rules and so on) because they will decrease the bigger is the set of rules you're using for the calculation

$\endgroup$
3
  • $\begingroup$ I am looking to construct a decision region wherein, if I give the system a point in the overlapping regions, it should return the average probability of the overlapping regions. $\endgroup$
    – giantjenga
    Commented Aug 19, 2022 at 12:53
  • $\begingroup$ You can do it by: - finding all overlaps and rating their probabilities - compute calculate in which overlap the point is - return the probability of that region $\endgroup$
    – DaSim
    Commented Aug 19, 2022 at 15:18
  • $\begingroup$ Any idea on how to achieve this in python for a region? If I have these regions - ( x1>6.5, x2>=7.5, Prob = 0.67 ) , (x1>7, x2>8, Prob = 0.71) and my test region is (x1>6.75 and x2 >7.75), How can I get the section of the test region (or point) with the lowest probability? $\endgroup$
    – giantjenga
    Commented Aug 19, 2022 at 15:26

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.