Machine learning(4): Quiz 4

  1. you are given a training set represented in the table below:
    在这里插入图片描述
    You want to apply a machine learning algorithm, like a k-nearest neighbour, which is very sensitive to scales used to measure the attribute values. You, therefore, decide to scale all attributes within the range [0,1]. Please report the values of the rescaled attributes of the last training example:
    A1:
    A2:
    A3:
    Correct answer: 0.32;0.26;0.62
    Analysis:
    We can see the table, the minimum of A1 is 415 and the maximum of A1 is 915. So, compared with the last example, the norm is (575-415)/(915-415)=0.32
    as same as A2, the minimum of the A2 is 1.3 and the maximum of A2 is 6.3. So, compared with the last example, the norm is (2.6-1.3)/(6.3-1.3)=0.26
    the same as A3, the minimum of A3 is 1.4 and the maximum of A3 is 11.4. So, compared with the last example, the norm is (7.6-1.4)/(11.4-1.4)= 0.62.
    在这里插入图片描述
  2. Suppose you have an incremental 1 nearest neighbour learning system that uses the number of identical attributes as its similarity measure. The system retains a new example if it satisfies any of the following conditions (tested in this order):
    It has zero similarity to saved examples;
    It has two or more equally similar nearest neighbours of different classes;
    It would have been misclassified using single nearest neighbour.
    Examples that do not satisfy any of these conditions are not retained. The data set given in the table below is presented to this system only once and in the order that it appears in the table.
    在这里插入图片描述
    Explain which examples will be retained and why:
    medium,heavy,yellow : Poor ---------Retained because of condition 1
    small,medium,brown : Good----------Retained because of condition 1
    small,medium,red : Poor--------------Retained because of condition 1
    large,medium,brown : Good ---------not retained
    large,light,yellow : Poor Answer------not retained.
    large,medium,yellow : Good----------not retained.
    large,light,red : Poor -------------------Retained because of condition 2
    在这里插入图片描述
  3. Model selection in regression analysis can be implemented using Forward and Backward Stepwise Regression. Although these specific procedures are used primarily in regression analysis, the general approach is applicable to most ML algorithms where they are known as:
    Greedy forward feature selection
    Greedy backward feature elimination
    Forward Stepwise Regression involves the following steps:
    Initialization:
    Loop:
    Exit:

Backward Stepwise Regression involves the following steps:
Initialization:
Loop:
Exit:

Analysis:
在这里插入图片描述
The steps of this processing are very important when you writing the regression.

  1. We are trying to predict the monthly rent of a flat given the number of trains to London per day from the closest station. The following data is available:
    在这里插入图片描述
    Consider the family of linear models h1(T)=a0+a1T and find the values of a0 and a1 that minimise the Mean Squared Error (MSE) for the data in the table. Then compute the corresponding R2.
    a0:
    a1:
    MSE:
    R2:
    在这里插入图片描述
    MSE:
    R2 :

Analysis:
在这里插入图片描述
在这里插入图片描述
5. Look at following pictures.
在这里插入图片描述
在这里插入图片描述
Analysis:
在这里插入图片描述

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值