Machine Learning (a) - machine learning foundation

Machine learning combat (Peter Haarrington) study notes

Recently, I always have a sound mind, that is, to explore new areas. Cognitive learning in a certain area deepen, will increase their own blind spots in the field of knowledge, forced to work under pressure, my mind will always say to you, you should learn the knowledge needed for the work. But the reality can not define what knowledge is and you really need to work. Similarly in the dark to find a key knowledge areas who want to find the key to the unknown, you will certainly flees to explore.

————2019.9.29

First, the machine learning foundation

1. What is Machine Learning?

机器学习简单来说是机器可以习得人的行为。

2. Key terms of machine learning?

鉴别鸟类,我们需要一些属性,如体重,翼展等。
那么,体重,翼展类别则是特征,鸟的种类则是目标变量

3. The main task of machine learning?

使用多种算法来进行解决同一个事物。
类似:
1.监督学习
k-近邻算法 线性回归 朴素贝叶斯算法 局部加权线性回归 支持向量机 决策树 Ridge回归 Lasso最小回归系数统计
2.无监督学习
K-均值 最大期望算法 DBSCAN Parzen窗设计

类似,如果目标变量是离散型,则选择分类器算法。如果目标变量为连续型,则选择回归算法。

Step 4. Development of machine learning applications?

1.收集数据
2.准备输入数据
3.分析输入数据
4.训练算法
5.测试算法
6.使用算法

5.Python language advantage?

1.语法清晰
2.容易操作文本文件
3.使用广泛,存在大量的开发文档

6.NumPy library foundation

Machine learning algorithms involve a lot of linear algebra, so we often use NumPy library. NumPy library is a separate module Python development environment, and most of the Python release version is not installed by default NumPy library, so we need to be installed separately

from numpy import *
random.rand(4,4)

Input to the array code is a random array of 4 * 4 occurs.

NumPy arrays and matrices difference:

NumPy函数库中有2种不同的数据类型(matrix和array),都可以用于处理行列表示数字元素,看起来很相似,但是执行数学运算会有不同的结果,其中NumPy函数库中的matrix和MATLAB中matrices等价。

Call the mat () function may be a function into a matrix, you can use

randMat=mat(random.rand(4,4))

.I can find the inverse matrix operation

randMat.I

If you do randMat * randMat.I, then we will get the matrix, but this matrix, unlike conventional matrix, in addition to the diagonal are 1, the rest there is a very small element

Function eye (4) create a matrix of 4 * 4

myeye=randMat*ranMat.I
myeye-eye(4)

Chapter Summary Learning

Although no cause of most people's attention, but the machine learning algorithms have been widely used in our daily life. Learning machine learning algorithms, you must understand the data instances, each instance of data composed of a plurality of characteristic values ​​in order to build a classifier training, you must enter the number of known classification data, we will be the training sample data set.

The next section --k- neighbor algorithm

Guess you like

Origin www.cnblogs.com/littlepage/p/11605694.html