0
$\begingroup$

How can i set the threshold value for the target variable. For example if a target variable is chance_of_admit and it has values from 0 to 1, how can I pick a value and so that I can convert it to 0's and 1's to perform logistic regression

$\endgroup$
  • $\begingroup$ Hi, I would say see how the distribution of the the target variable is and if its normal then probably .t threshold will be fine otherwise if it is skewed you should defined lower or higher the threshold based on skewness.. $\endgroup$ – cap Dec 7 '19 at 15:58
  • $\begingroup$ @Cini09 It is negative skew . So how I must proceed $\endgroup$ – user12490809 Dec 7 '19 at 16:17
  • $\begingroup$ @Cini09 do u have a solution for this $\endgroup$ – user12490809 Dec 7 '19 at 16:31
  • $\begingroup$ It depends but you can try to increase the threshold to like 65-70 and see how dies it cover your majority of sample. $\endgroup$ – cap Dec 7 '19 at 16:32
  • $\begingroup$ And create a different column and compare with the original one or with another column which has .50 threshold. Doing so will let you know if you have covered enough sample in class 1. And then you can proceed with the modelling $\endgroup$ – cap Dec 7 '19 at 16:34
1
$\begingroup$

So there two ways of doing this, IMHO,

  1. By creating a well balanced target variable by choosing the right threshold. As I suggested in the comments above. In doing so we are simply taking care of values which should be treated as positive which would otherwise become negative if we take lower threshold.

  2. By using the mean threshold and that will generate imbalanced target variable and when you perform the modelling, you can see the ROC and PRC curves and decide the threshold based on that. But keep in mind, it also depends what kind of problem you are solving.

$\endgroup$
0
$\begingroup$

Usually, the threshold is 0.5. So when you make a prediction from a binary classification model, the prediction will be a probability, and 0.5 is the threshold for assigning classes based on this (estimated) probability.

However, in your case, the dependent variable $y$ is something like a (pseudo) probability, as far as I understand. So you could also check if predicting this value, using a regression approach, would be an option.

You could look into beta regression in this case: https://stats.stackexchange.com/a/29042/224077

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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