I have 50,000 samples. Of these 23,000 belong to the desired class $A$. I can sacrifice the number of instances that are classified as belonging to the desired class $A$. It will be enough for me to get 7000 instances in the desired class $A$, provided that most of these instances classified as belonging to $A$ really belong to the desired class $A$. How can I do this?
The following is the confusion matrix in the case the instances are perfectly classified.
[[23000 0]
[ 0 27000]]
But it is unlikely to obtain this confusion matrix, so I'm quite satisfied with the following confusion matrix.
[[7000 16000]
[ 500 26500]]
I am currently using the sklearn
library. I mainly use algorithms based on decision trees, as they are quite fast in the calculation.