I\'m solving a classification problem with sklearn\'s logistic regression in python.
My problem is a general/generic one. I have a dataset with two classes/result (posi
Have you tried to pass to your class_weight="auto"
classifier? Not all classifiers in sklearn support this, but some do. Check the docstrings.
Also you can rebalance your dataset by randomly dropping negative examples and / or over-sampling positive examples (+ potentially adding some slight gaussian feature noise).
@agentscully Have you read the following paper,
[SMOTE] (https://www.jair.org/media/953/live-953-2037-jair.pdf). I have found the same very informative. Here is the link to the Repo. Depending on how you go about balancing your target classes, either you can use
n_samples / (n_classes * np.bincount(y)
Let me know, if more insight is needed.