知识卡片

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

稀疏矩阵仍需固定维数与类型

理解等级:中级

稀疏存储记录非零值及其坐标,减少大词表中零元素成本,和逐文档固定特征维并不矛盾。数据框补零再转整数适于演示,却可能占大内存;CountVectorizer常输出SciPy稀疏结构,并非普通稠密NumPy数组。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      You might be thinking that if you process a huge corpus, you’ll probably end up with thousands, or even millions, of unique tokens in your vocabulary. This would mean you would have to store a lot of zeros in your vector representation of the 20-token sentence about Liesel. A dict would use much less memory than a vector; any paired mapping of words to their

    参考来源

    - 位置:《Natural Language Processing in Action, Second Edition》第02章《思维的词元》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Natural Language Processing in Action, Second Edition/_epub-src/OEBPS/Text/chapter-2.html) - 结论依据:摘录中关于稀疏矩阵仍需固定维数与类型的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:You might be thinking that if you process a huge corpus, you’ll probably end up with thousands, or even millions, of unique tokens in your vocabulary. This would mean you would have to store a lot of zeros in your vector representation of the 20-token sentence about Liesel. A dict would use much less memory than a vector; any paired mapping of words to their