-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
balance_index: (int) balance class index, should be specific when alpha is float #9
Comments
It only apply |
It seems that So, what does the balance_index actually do ? thx. |
@DeeDive Alpha should be between 0 and 1 and reflects the relative weight of the classes. For example, if you have binary classification and you want to overweight the positive (index 1) class, I believe you can set alpha=0.7 and balance_index to 1. Then the alpha matrix will have all 0.3 (i.e. 1-alpha) for column 0, and 0.7 for column 1. This is used then for weighting the loss later in the computation |
Thanks for your reply. Can I set alpha to a vector of integer? For instance, [1,7].------------------ 原始邮件 ------------------
发件人: "Karthik Sarma"<[email protected]>
发送时间: 2019年8月18日(星期天) 凌晨0:03
收件人: "Hsuxu/Loss_ToolBox-PyTorch"<[email protected]>;
抄送: "DeeDive"<[email protected]>;"Mention"<[email protected]>;
主题: Re: [Hsuxu/Loss_ToolBox-PyTorch] balance_index: (int) balance classindex, should be specific when alpha is float (#9)
@DeeDive Alpha should be between 0 and 1 and reflects the relative weight of the classes. For example, if you have binary classification and you want to overweight the positive (index 1) class, I believe you can set alpha=0.7 and balance_index to 1. Then the alpha matrix will have all 0.3 (i.e. 1-alpha) for column 0, and 0.7 for column 1. This is used then for weighting the loss later in the computation
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi @Hsuxu ,
I'm a little bit confused about balance_index.
What happens to the loss when alpha is of type float?
Millions of thanks in advance.
The text was updated successfully, but these errors were encountered: