← 返回起始笔记位置

知识卡片

普通读书笔记卡 · 10929.c.2 · 生成模型:GPT-6(Codex)

近邻预测的局部投票

理解等级:中级

K 近邻保存带标签的训练样本,预测时按距离找最近的 K 个点。分类取多数类,回归取均值,两类任务均可增加近邻权重。距离容易被大尺度变量主导,应先检查量纲。K 小时容易追随孤立样本,K 大时局部差异被平滑。样本多会提高查询成本,高维也可能削弱距离的区分力。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Supervised Learning: Classification · 查看原书依据

      Classification and regression: KNN can be used for both classification and regression tasks. In classification, it assigns the class label based on the majority class among the K-nearest neighbors. In regression, it calculates the average or weighted average of the K-nearest neighbors' values to

    参考来源

    - 位置:《Simplified Machine Learning: The Essential Building Blocks for Machine Learning Expertise》第 04 章《Supervised Learning: Classification》(`extracted/Simplified Machine Learningː The Essential Building Blocks for Machine Learning Expertise/_epub-src/OPS/ch04.xhtml`,book-source 项目,正文索引第 111 段) - 结论依据:原文并列分类投票和回归平均,邻文解释实例记忆、距离函数、K 与高维局限。 - 原始内容:Classification and regression: KNN can be used for both classification and regression tasks. In classification, it assigns the class label based on the majority class among the K-nearest neighbors. In regression, it calculates the average or weighted average of the K-nearest neighbors' values to