Skip to content

Class imbalance / weights? #38

Answered by isabella
otsaw asked this question in Q&A
Sep 8, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @otsaw! Tangram currently does not automatically handle class imbalance. What we suggest doing is upsampling your minority class or downsampling your majority class. To upsample the minority class, duplicate the rows that correspond to the minority class until the number of minority class and majority class rows are equal in your csv. You will have to create two CSV's and pass the one with the upsampled data as --file-train and the one that does not have upsampling as --file-test. To downsample the majority class, select only 600 of the 6000 majority class rows and the full 600 of the minority class rows and pass this csv with 1200 rows to Tangram. This is obviously not ideal! We want …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@otsaw
Comment options

@isabella
Comment options

@otsaw
Comment options

Answer selected by otsaw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants