Created
December 2, 2018 13:53
-
-
Save tkazusa/33f3e08de90fd369038bfaa5c59b18fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set class weights | |
classdist = pd.value_counts(val['target']) | |
weights = {i: round(np.sum(classdist) / classdist[i]) for i in classdist.index} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment