matplotlib - 大型数据集的置信区间
问题描述
我想获得非常大的数据集的置信区间。它由 x 和 y 的大约 700,000 个点组成。我还尝试使用更少的数据,例如 200 个点,这样就可以进行绘图。但是,当涉及到我的特定数据集时,它没有显示置信区间。
为此,我的代码基于:
x_x = np.array(y_test[:, 0]) #about 700,000 points
y_y = np.array(y_pred[:, 0]) #about 700,000 points
sns.set(style = 'whitegrid')
p = sns.FacetGrid(d, size = 4, aspect = 1.5)
p.map(plt.scatter, 'x_x', 'y_y', color = 'red')
p.map(sns.regplot, 'x_x', 'y_y', scatter = False, ci = 95,
fit_reg = True, color = 'blue')
p.map(sns.regplot, 'x_x', 'y_y', scatter = False, ci = 0,
fit_reg = True, color = 'darkgreen')
以及到目前为止的图:
解决方案
推荐阅读
- java-8 - 带有 Azul Mission Control 的 Azul Zulu JDK 8 不配置方法
- azure - 通过 smtp 从安装为 azure 中的 IaaS 的服务器发送电子邮件
- python - 如何将这些扭曲的数据以表格格式放入 csv 文件中
- javascript - 如何使用 React 在渲染中访问数组?
- c# - 如果方法需要更多时间,如何打开 WPF 模式窗口
- java - 数据库 - 枚举类型 - 额外的表或只是一列
- c++ - 如何检查 std::unique_ptr 是否为空,如果它在 std::vector 中?
- jenkins - jenkins 在 jenkinsFile 中导入类,并在共享库的“global_vars”中实例化,但回显“无法解析类”
- docker - 当主机不正常关闭时,docker 容器中的文件会发生什么?
- reactjs - 使用 react-testing-library 在 react-window 列表中测试滚动