小编arj*_*ada的帖子

我们可以在 Altair 中绘制图像数据吗?

我正在尝试在 altair 中绘制图像数据,特别是尝试在 Jake VDP 的书 - https://jakevdp.github.io/PythonDataScienceHandbook/05.07-support-vector-machines.html中的此链接中复制人脸识别示例。

有没有人在 altair 中绘制图像数据很幸运?

python imshow altair

11
推荐指数
1
解决办法
2348
查看次数

使用sklearn时出现“RuntimeWarning: invalid value returned in matmul ret = a @ b”的原因是什么?

Ridge().fit(X_train, y_train)在数据集上使用时遇到了 RuntimeWarning,其中X_train.shape = (9440, 1900)

/Users/username/micromamba/envs/data-science/lib/python3.11/site-packages/sklearn/utils/extmath.py:189: RuntimeWarning: invalid value encountered in matmul
  ret = a @ b
Run Code Online (Sandbox Code Playgroud)

当我减小数据集的大小时,X_train.shape = (1000, 1900)运行时警告就会消失。

可能是什么原因导致此警告以及如何避免它?我确保没有 np.nan、np.inf 和 -np.inf。

python numpy linear-regression scikit-learn

7
推荐指数
1
解决办法
1291
查看次数

Altair 中的 Pandas 时间序列特定操作

是否可以使用 transform_aggregate 函数对 Altair 中的日期时间对象执行 groupby 操作?我试图从 Jake VDP 的书的“示例:可视化西雅图自行车计数”示例中复制一些时间序列图 - https://jakevdp.github.io/PythonDataScienceHandbook/03.11-working-with-time-series.html

transform_aggregate 是否允许时间序列特定操作,如重新采样?

python altair

3
推荐指数
1
解决办法
1224
查看次数

标签 统计

python ×3

altair ×2

imshow ×1

linear-regression ×1

numpy ×1

scikit-learn ×1