Jump to content

What is the mathematical principal of setting class weight in logestic regression in scikit-learn library in Python

Featured Replies

Dear all, 

In machine learning library scikit-learn of python, the logestic regression function has an argument "class_weight". When you set a higher class weight to a class during fitting the logestic model, you will get higher predictive accuracy of this class.  I wish to know what is mathematical principal of setting class_weight. Is it related to modify the target function of logestic regression (https://drive.google.com/open?id=16TKZFCwkMXRKx_fMnn3d1rvBWwsLbgAU) ?

Thank you in advance.

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.