1.A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.

2. Machine Learning is learning from experience. It’s also called supervised learning. E consists of features and labels.

    Pattern Recognition is finding patterns without experience. It’s also called unsupervised learning. E consists of only features.

3.

machine learning 

4. There are two types of parameters for any ML model:

    --Intrinsic parameters: e.g. weights in linear regression or Artificial Neural Network

--Hyper-parameters: Must be learned by establishing generalisation error

5. Squared error cost function(L2 cost function):

machine learning 

即predict值与label值相减后开平方,前面多除了一个2的原因是为了方便求导,因为平方求导后有个2,正好和除2约掉

6. L1_norm:

machine learning 

7. 
machine learning
machine learning

8. 
machine learning
多项式回归模型可以被理解为对一群非线性基函数的线性组合,
如对于Multivariate linear regression with third-order polynomial:
machine learning

相当于machine learning

这里的基函数machine learning
(注:向量默认是竖向量,即向量w表示竖向量,machine learning才是横向量)

9. 
machine learning
machine learning

 

 

 

 

 

 

 

1.vector inner product:

machine learning 

machine learning 

 

2.向量的几何含义:
machine learning          machine learning
向量[3, 2]的含义即x轴上3倍基向量(basis vector)i,和y轴上为两倍基向量j的拼接。

线性变换:
machine learning
那么对于不同的基向量,同个向量的表示是不同的,如上图,在基向量为b1和b2的坐标系下,黄线表示的是向量[-1,2],因为它是由-1倍的基向量b1和两倍的基向量b2拼接而成。而在基向量为[0,1]和[1,0]的坐标系下,黄线表示的向量应该是[-4,1]

那么已知在b1,b2为基向量的坐标系下的向量值为[-1,2],怎么求得其在基向量为i,j的坐标系下的向量表示呢?
machine learning
(先求得基向量b1和b2在以i,j为基向量的坐标系下的表示,为[2,1][-1,1],将其拼成矩阵后于要转换的向量[-1,2]相乘得出转换后的向量表示。通过矩阵和向量的相乘,我们将坐标系A下的向量[-1,2]映射到了坐标系B下([-4,1]),这个过程就称为线性变换)

3.两个向量内积为0 <=>这两个向量垂直。

 

 

4.
machine learning

machine learning  (10个数据中有6个machine learning)(marginal probabilities)

machine learning  (同时满足x=0.2, machine learning的概率)(joint probability)

machine learning  (在machine learning的前提下,x=0.2的概率)(conditional probability)

machine learning 

machine learning 

5. RULES OF PROBABILITY THEORY:

machine learning 

machine learning 

machine learning 

machine learning 

 

 

 

6. BAYES’ THEOREM: 

machine learningmachine learningmachine learning 

machine learning
7. when two (sets of) random variables are NOT correlated(statistically independent)

This happens iff for two random variables:  p(x, y) = p(x)p(y)

解释:两个事件A,B,若p(A|B)=p(A),即A事件发生的概率与B事件是否发生没有关系,则根据product rule,p(A, B)=p(A)p(B),则称A和B相互独立。

8. Linearly separable data:不同类型的数据可以被一条直线或平面超平面完全划分开
machine learning

9.

machine learning 

10.

Sign function:
machine learning                       machine learning

Sigmoid function:

machine learning         

machine learning 

11. K-CLASS LDA(Linear discriminant analysis):

machine learning 

假设有三个类别machine learning,machine learning,则对每个类别有各自独立的分类器machine learning,machine learning,和各自独立的参数w,对于输入x,被判定为machine learning类的前提是,machine learningmachine learning

12.Fisher LDA

对于分类器y = ωx,Fisher LDA将其看作是一种降维,即将高维的输入向量x与参数ω相乘后变成一个数字,即降维成了一维,Fisher LDA是希望调整这个参数使得用这个参数对训练集中的所有数据降维后,在这个一维数据中不同类别的类内方差尽可能小,类间方差尽可能大,(方差表示一堆数据的离散程度,若各数据都很接近于平均值,没什么很大的波动,则方差小,反之大),类内方差小表示同个类的不同数据被降维后得到的值是很接近的,都是在类内数据的平均值附近,而类间方差大表示不同类的数据被降维后得到的值是相差很大的,这样降维就能使得很清晰的分离两个类。所以据此得出下式:

machine learning 

machine learning是类别k的降维成一维后的类内均值,machine learning是类别k的类内方差

分子是类间方差(由machine learning省略系数后得出)

分母是各类类内方差的和

以该函数的倒数作为cost function进行梯度下降就能学出一个恰当的ω,使得通过式子y = ωx对数据进行降维后,得出的一维数据非常易于区分,此时可以取某个值,让大于该值的y归于一类,小于该值的归于另一类。

Decision Tree:

1.

machine learning 

2. Branch criteria must result in mutually exclusive and exhaustive branching decisions

3.所有的树都可以转换成如下的binary tree的形式

machine learning 

4.建树的过程:我们会对一组数据D={X,y},用各种属性对其进行划分,若划分后,子节点中所有数据的标签y都是相同的,则称该节点是pure的,则该节点停止继续向下划分,否则还要用其他的属性对这个不是pure的节点继续划分直至pure为止。

But it is not always desirable to reach pure subsets, so termination strategies need to be a bit more sophisticated.
我们总能将任何一组数据划分成所有节点都是pure的,因为当节点中只有一个元素时,他就是pure的了,但是这并不是好的,这样会有过拟合问题。

解决方法是 STOPPING CRITERIA: Keep splitting nodes level by level, or even node by node, using only the training data to learn decisions, until the error on the validation set stops going down.

5.请看机器学习decision_tree_note

 

6.

machine learning 

有C1和C2两个类,每个类有8个数据,每个数据有x1和x2两个特征(最后那个什么36*32+的不用管..我也不知道是啥)

machine learning 

红色的是entropy impurity,machine learning表示这个node已经全部是C1了,machine learning表示这个node已经全部是C2了(有空可以算算)

那么是如何确定用什么样的条件对数据进行划分的呢,如上面的x1<0.6,为什么不是x1<0.7 或者x1>0.8呢

做法:将所有数据按x1的大小排序

x1

.08

.09

.10

.15

.23

.29

.38

.47

.52

.57

.62

.65

.70

.73

.75

.91

 

C2

C1

C2

C1

C2

C1

C1

C1

C1

C1

C2

C2

C2

C1

C2

C2

 

每次取两个数的中间值作为条件,如取条件x1<.085,将.08划分到左节点,其余在右节点;取x1<.095将.08和.09划分到了左节点,其余在右节点;取x1<.125将.08 .09 .10划分到了左节点,其余在右节点…

上述16组数据,共有15种划分方式,然后对x2也以同样的方式进行划分,也有15种

然后计算这30种划分方式的信息增益,取信息增益最大的划分方式作为当前节点的划分方式,之后对每个节点都以这种方式进行条件的选择。(不确定上面那棵树的划分方式是不是最佳的划分方式..没验算过)

 

 

7.前面说的tree都是monothetic的(如下图左),即每次进行条件判断时只会对一个属性进行,如只对color属性进行划分,只对x1属性进行划分,而polythetic的则如下图右,是会对两个属性进行划分,具体要怎么做请待下回分解

machine learningmachine learning 

8.计算impurity的四种方式,考试会考,请记下。

machine learning 

 

8. Bayes’ Error:The Bayes Error rate is the theoretical lowest possible error rate for a given classifier and a given problem (dataset).

For real data, it is not possible to calculate the Bayes Error rate, although upper bounds can be given when certain assumptions on the data are made.

 

 

相关文章: