I want to model a logistic regression with imbalanced data (9:1).
I wanted to try the weights option in the glm
function in R, but I'm not 100% sure what it does.
Lets say my output variable is c(0,0,0,0,0,0,0,0,0,1)
.
now I want to give the "1" 10 times more weight.
so I give the weights argument weights=c(1,1,1,1,1,1,1,1,1,1,1,10)
.
When I do that, it will be considered in the calculation of the maximum likelihood. Am I right? misclassification of "1" is just 10 times worse then missclassifying a "0".