
In scikit-learn, a lot of classifiers comes with a built-in method of handling imbalanced classes. If we have highly imbalanced classes and have no addressed it during preprocessing, we have the option of using the class_weight parameter to weight the classes to make certain we have a balanced mix of each class. Specifically, the balanced argument will automatically weigh classes inversely proportional to their frequency. This video demonstrates the power class_weight='balanced' Link to the notebook - https://github.com/bhattbhavesh91/imb... If you do have any questions with what we covered in this video then feel free to ask in the comment section below & I'll do my best to answer those. If you enjoy these tutorials & would like to support them then the easiest way is to simply like the video & give it a thumbs up & also it's a huge help to share these videos with anyone who you think would find them useful. Be sure to subscribe for future videos & thank you all for watching. You can find me on: GitHub - https://github.com/bhattbhavesh91 Medium - https://medium.com/@bhattbhavesh91 #ClassImbalance #ClassWeight #machinelearning #python #deeplearning #datascience #youtube
Class Weights for Handling Imbalanced Datasets | Python | Machine Learning - YouTube |
| 21 Likes | 21 Dislikes |
| 490 views views | 4,589 followers |
| Education | Upload TimePublished on 7 May 2019 |
No comments:
Post a Comment