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

关于get_mask函数中的missing_rate=0.5 #5

Open
xxxhanxxx opened this issue Dec 19, 2023 · 4 comments
Open

关于get_mask函数中的missing_rate=0.5 #5

xxxhanxxx opened this issue Dec 19, 2023 · 4 comments

Comments

@xxxhanxxx
Copy link

您好,我想请教一下,在get_mask函数中第三行,为什么需要设置missing_rate=0.5呢?我发现这一行会使得,两视图数据和三视图数据的缺失生成使用不同的代码。

@Lin-Yijie
Copy link
Collaborator

您好,def get_mask(view_num, alldata_len, missing_rate) 中missing_rate缺失率定义的是多少百分比的数据有缺失,而第三行missing_rate = 0.5则是保证有缺失的这些样本中,缺失视图的比例大致为0.5。
如果设置missing_rate = 0.5,两视图数据可以刚好产生一半视图的缺失,三视图情况下则通过随机mask去逼近50%的概率,具体实现借鉴的CPM_Net

Given a dataset with v views, we randomly select m samples as incomplete data and randomly remove 1 to v-1 views from each of them. The missing rate is defined as m/n, where n is the number of all examples.

@xxxhanxxx
Copy link
Author

非常感谢您的回答!我还有一个小问题,实验时我发现删除第三行的missing_rate=0.5时,产生的缺失视图相较于不删除第三行时,有比较大的区别。具体来说,当我所希望缺失率是0.1时,如果保持第三行的missing_rate=0.5,那么存在缺失的样本是239个(总样本2386),但是如果删除第三行时,存在缺失的样本只有49个。所以请问,我可以理解为第三行的missing_rate=0.5是必要的,且不能删除的吗? 再次感谢您的帮助。

@Lin-Yijie
Copy link
Collaborator

对的不能删除的,两个missing_rate的含义是不一样的。前面是指我们论文中所指的缺失率(有多少sample有缺失),后者0.5是仅用来生成mask的。抱歉产生了误解。

@xxxhanxxx
Copy link
Author

好的,非常感谢您的回答!

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