Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Figure out the class distribution percentage and round it to 3 decimal places
- print('Percentage of negative class is {} %'.format(
- round(df[target_class_name].value_counts()[0]/len(df) * 100,3)))
- print('Percentage of Positive class is {} %'.format(
- round(df[target_class_name].value_counts()[1]/len(df) * 100,3)))
- # Watch out for situations where the percentage of one class is really small compared to the other
- # In such a scenario we would need to use SMOTE or other balancing techniques
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement