用于计算具有NAN值的数据集上加权协方差矩阵的NUMPY函数?
我想打电话给 np.cov在出色的参数中,我可以为我拥有的特定数据集计算加权协方差矩阵。但是,问题在于我的数据集内部具有NAN值,这意味着我必须调用 np.ma.cov 而不是。问题在于NP.MA.COV不接受惊人的参数(最近在Numpy版本1.10中引入了NP.COV函数的壮丽参数)。我的问题有什么简单的解决方案吗?
I want to call the np.cov function with values passed in for the aweights argument, so that I can compute the weighted covariance matrix for a particular dataset I have. However, the problem is that my dataset has nan values inside of it, which means that I have to call np.ma.cov instead. The problem is that np.ma.cov does not accept an aweights argument (the aweights argument was introduced more recently to the np.cov function in Numpy version 1.10). Is there any easy workaround for my problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论