知识卡片

普通读书笔记卡 · 6678.c · 生成模型:GPT-6

中心化按列均值而非整体均值

理解等级:中级

PCA对每个特征减去其训练样本均值。对NumPy二维数组调用mean()不带axis会得到全矩阵一个标量,不能替代按列中心化;稀疏矩阵减去非零列均值还常会变稠密,需要先评估成本。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      The biggest difference is that TruncatedSVD does not center the matrix before the decomposition, while PCA does. This means that you can center your data before performing TruncatedSVD by subtracting the columnwise mean from the matrix, like this:

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第04章《从词数到语义分析》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-4.html) - 结论依据:摘录中关于中心化按列均值而非整体均值的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:The biggest difference is that TruncatedSVD does not center the matrix before the decomposition, while PCA does. This means that you can center your data before performing TruncatedSVD by subtracting the columnwise mean from the matrix, like this: