I fit a logistic regression model with an unbalanced population in R.
The problem that I am getting is I have 0.4 for precision and 0.0018 for recall, so I want to modify the threshold in order to get close both indicators (precision and recall)
Do you have any function in R to modify the cutoff? I have seen some work arounds in Python, but the code that I need is in R.
glm. I think you may want to ask a question "How do I round a value in [0,1] according to a given cut-off value $x \in [0,1]$ so that anything less than $x$ returns 0 and anything greater than $x$ returns 1?" If you need to do that inR, it probably belongs on StackOverflow. – Him Mar 02 '20 at 17:11