what happens when a decision tree can't be split into further unit values? Suppose I have a dataset
A B C D
1 1 1 0
1 1 0 0
1 1 0 1
1 0 1 1

Here A,B,C,D are my independent features and D is my dependent feature. Now if I make a decision tree here.
A -&gt; Yes/No = 2/2 - &gt; Based on value 1-&gt; 2/2 So we go further for B. 
B -&gt; Yes/No = 2/2 -&gt; Based on value 1-&gt; 1/2 So we go further for C
When B=1 &amp; C = 1 then D = 0
When B=1 &amp; C = 0 then D = 0 and as well as D = 1 too. 

So here we have a 50/50 chance, Or we can see we can't go further to get unique value to predict. So how does decision tree solve this problem?
Well, sometimes the features simply do not provide enough information to get 100% accuracy (like in your case), even with a model a flexible as the Decision Tree.
The Decision Tree works by trying to split the data using condition statements (e.g. A &lt; 1), but how does it choose which condition statement is best? Well, it does this by measuring the &quot;purity&quot; of the split (conditional statements split the data in two, so we call it a &quot;split&quot;). The purity is simply how well the statement split up the target variable (so, a good split would be [2, 0], which basically translates to &quot;If I did this split, I would get two $D = 0$ instances, and zero $D = 1$ instances.&quot;, and a bad split would be [1, 1], saying &quot;With this split I would get one $D = 0$ instance and one $D = 1$ instance&quot;). If the model finds that no further splits can reduce the purity, it stops.
If you want to look into it further, there are a couple of measures for measuring purity (or rather, impurity), the main ones being gini and entropy.