Machine learning in python2019-12-22

Today, I will learn scikit-learn by the notes of scipy-lecture. (You can see the scipy-lecture notes on www.scipy-lectures.org/ and there was a PDF of Chinese Sample version in the internet)

1. Introduction

Machine learning is about building programs with tunable parameters that are adjusted automatically so as to improve their behavior by adapting to previously seen data.
Machine learning can be considered as a subfield of Artificial Intelligence since those algorithms can be seen as building blocks to make computers learn to behave more intelligently by somehow generalizing rather that just storing and retrieving data items like a database system would do.

1.1 Two machine learning problems: Classification and Regression

1.1.1 Classification
Figure 1. A classification problem.png
1.1.2 Regression
Figure 2. A regression problem.png

1.2 Data in scikit-learn

Machine learning algorithms implemented in scikit-learn expect data to be stored in a two-dimensional array or matrix.
The size of the array is expected to be [n_samples, n_features]

iris data was introduced in previous study.
(two ways of import data shown as follows)

from sklearn.datasets import load_iris
iris = load_iris()
from sklearn import datasets
iris = datasets.load_iris()
Figure 3. Iris of three different types.png
Figure 4. Building blocks of iris data.png

2. KNN分类器

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容