引导式测验 · 中等 等级

K 最近邻测验

涵盖邻居投票、特征缩放、预测成本、度量选择以及存储训练示例时的实际权衡。

相关引导路径K 最近邻
问题 1 的 8

KNN 如何对新数据点进行分类?

预览每个问题8 问题

当您参加测验时,就会出现答案和解释。

  1. KNN 如何对新数据点进行分类?
    • 通过获得 K 个最近邻居的多数票
    • 通过在其上训练神经网络
    • 通过计算加权回归线
    • 通过分配随机类别
  2. 为什么 KNN 通常被称为“惰性学习器”?
    • It never stores training data
    • It stores training examples and can defer much model-specific work until prediction, though indexes may be built during fitting
    • It always trains a deep neural network first
    • It does no work during either fitting or prediction
  3. 为什么特征缩放对于 KNN 很重要?
    • 它使训练更快
    • 它减少了所需邻居的数量
    • 因此,具有大范围的特征不会主导距离
    • 自动改变K
  4. 如果您选择一个非常小的 K,例如 K=1,会发生什么?
    • 模型变得非常平滑
    • 模型忽略数据
    • 预测变得不可能
    • 模型对噪声变得敏感并且可能过度拟合
  5. 在暴力 KNN 实现中,为什么在大型数据集上预测会很慢?
    • It may compute distances from a query to many or all stored examples
    • It must update all model weights for every query
    • It reruns the entire training dataset through a neural network
    • It cannot use an index or approximate search
  6. 哪种现代技术依赖于最近邻思想?
    • 使用 JPEG 进行图像压缩
    • 矢量搜索和检索增强生成
    • 随机数生成
    • 电子表格公式
  7. Why should a feature scaler be fit only on the training split before KNN evaluation?
    • To make the distance metric ignore every feature
    • To guarantee all classes have equal counts
    • To avoid using information from validation or test examples when setting the scale
    • To remove the need to choose K
  8. How can KNN make a prediction for a regression task?
    • Choose the most common class label only
    • Fit a new deep network for each query
    • Ignore the stored examples and use a fixed intercept
    • Aggregate the target values of the K nearest training examples, often by averaging