Skip to content
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

类别平衡 #12

Open
xiehou-design opened this issue May 6, 2023 · 1 comment
Open

类别平衡 #12

xiehou-design opened this issue May 6, 2023 · 1 comment

Comments

@xiehou-design
Copy link

您好,我想问一下,这个关系抽取中,理论上来说类别样本应该非常不平均吧,特别是0类别特别多,1,2,3类别应该远少于0类别,只是用单纯的交叉熵就可以实现各类别正确分类,而不是将预测的结果全部预测为0,这样的话尽管会出现一些错误,但是损失值应该会很小。我想问一下是不是代码中有调节类别平衡的地方,我遗漏了。

@taishan1994
Copy link
Owner

您好,我想问一下,这个关系抽取中,理论上来说类别样本应该非常不平均吧,特别是0类别特别多,1,2,3类别应该远少于0类别,只是用单纯的交叉熵就可以实现各类别正确分类,而不是将预测的结果全部预测为0,这样的话尽管会出现一些错误,但是损失值应该会很小。我想问一下是不是代码中有调节类别平衡的地方,我遗漏了。

看损失计算那里应该就是直接用的交叉熵,其余的没仔细看。可以着重看下数据预处理那里有什么特殊的操作没。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants