我正在尝试在 altair 中绘制图像数据,特别是尝试在 Jake VDP 的书 - https://jakevdp.github.io/PythonDataScienceHandbook/05.07-support-vector-machines.html中的此链接中复制人脸识别示例。
有没有人在 altair 中绘制图像数据很幸运?
我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。
是否可以使用 transform_aggregate 函数对 Altair 中的日期时间对象执行 groupby 操作?我试图从 Jake VDP 的书的“示例:可视化西雅图自行车计数”示例中复制一些时间序列图 - https://jakevdp.github.io/PythonDataScienceHandbook/03.11-working-with-time-series.html
transform_aggregate 是否允许时间序列特定操作,如重新采样?