To handle class imbalance in Machine Learning, there are several methods. One of them is adjusting the class weights. By giving higher weights to the minority class and lower weights to the majority class, we can regularize the loss function. Misclassifying the minority class will result in a higher loss due to the higher weight. To incorporate class weights in Tensorflow, use scikit-learn’s 𝐜𝐨𝐦𝐩𝐮𝐭𝐞_𝐜𝐥𝐚𝐬𝐬_𝐰𝐞𝐢𝐠𝐡𝐭 function.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.