Predicting a binary variable whose values in the sample are severely unbalanced I have a data set with a binary variable which is 0 for 94% of observations and 1 for 6% of observations. If I fit a model (say logistic regression) to predict this variable in a way that maximizes goodness of fit over the sample then I'm liable to get a model that unconditionally predicts 0 since that predicts accurately for 94 % of the observations.
But that's not very useful for me. Theoretically both the classes are equally interesting to me. So I do a fit giving weight of 1/0.94 to each observation with value 0 and 1/0.06 to each of the observation with value 1.
Is this a sensible thing to do and does it have a standard name?

When you fit a logistic regression, you do not get flat 0 predictions. Rather, you get probabilistic predictions, which are far more useful and informative than hard 0/1 predictions. Evaluate these using proper scoring rules.
Do not blindly compare the predicted class membership probabilities to some threshold, unless you know what you are doing, and know that the threshold you are using is actually useful for your context. (Hint: a threshold of 0.5, or one that maximizes accuracy, will usually not be useful.)
Weighting your model is really the same as oversampling the minority class, which will only bias your parameter estimates, see below. Don't do it, again, unless you know what you are doing.
More information here:

*

*Classification probability threshold

*Are unbalanced datasets problematic, and (how) does oversampling (purport to) help?

*Why is accuracy not the best measure for assessing classification models?
