Machine learning framework ML.NET Study Notes [1] The basic concept of a series of articles directory

I. Preamble

       Microsoft's machine learning framework in 2018 moonrise version 0.1, released in May 2019 version 1.0. During the differences between the versions (including namespaces, methods, etc.) is quite large, with the version 1.0 release, it should become stable. Before the garden also see a lot of articles related to the introduction of my study provided a lot of help. Due to the current data is not very rich, so the learning process is also quite a few detours, this series of articles mainly recorded some of my experiences in the learning process, and some of the details will be explained in detail, hoping to learn the basis of zero for the machine students provide some help. (C # can not do zero-based)

 

Second, the basic concept

1. What is Machine Learning?
Definition: a computer program to complete the task (T), if the computer experience acquired on T (E) on the performance of the more (P), the better, then we can say that this program 'learning' experience on T's.

Simple explanation of what is called "machine learning": If you enter, the more experience the better the performance, which is called "learning." For example: the traditional program logic is based on the algorithm, the same algorithm in the case of the program is to run for 100 years will not have the ability to upgrade, but the machine learning is based on the data (sample), and in the case of the same algorithm under the more valid the data accumulated, the stronger program performance capability.

 

2, learning to solve the problem of the difference between the traditional algorithm and problem solving through the machine

Problems to be solved: meeting rooms come in on a boy and asked him to stand in front of the camera, evaluate the program through a body if the boy well.

(1) Traditional Solutions

  First, we analyze to determine how well a person body, the main judgments features include: height, weight, measurements, etc., and then through a measure algorithm (such as BMI) is calculated, the process is as follows:

 

(2) machine learning algorithms

   Machine learning is dependent on sample data, so the idea is to solve this problem like this:

① First, you have to take to the streets to collect data, asking height, weight, measurements data you interviewed, and based on your experience gave him a judge, to form the following table:

② The data collected for training the model is formed, and then judge objects to be determined by the model. Process is as follows:

 

小结:通过这个问题的解决,感觉通过机器学习来解决问题比传统方法麻烦多了,是的,对于身材判断这样的问题,人类可以很简单找到一个逻辑分析的方法,所以通过逻辑算法解决就比较方便,但有时候很多事情我们人类是很容易处理的,但我们却不知道其中的逻辑,比如:判断一张图片是否是18+图片,判断一片论文是否写得很好,判断一个人是否长得漂亮等等。这些问题人类很轻松就能处理,但无法总结出其中的规律并交给机器去执行,这时候机器学习算法就可以派上用场了。

 

 三、机器学习的流程

 机器学习的流程如下:

数据准备 -> 建模 -> 训练 -> 评估 -> 应用
在实际应用时,由于训练的过程可能时间比较长,所以我们会分两个阶段进行:
1、学习阶段:数据准备 -> 建模 -> 训练 -> 评估 -> 保存模型
2、消费阶段:读取模型 -> 应用

评估的过程就是对模型的检验,我们一般会把样本数据随机分成两份,其中一部分用来学习,另一部分用来检验模型效果,判断一下我们的模型能力。

 

以上是涉及到机器学习的有些最基础的理论知识,下面几篇文章会由浅入深介绍ML.NET的一些应用。

系列文章目录:

机器学习框架ML.NET学习笔记【1】基本概念

机器学习框架ML.NET学习笔记【2】入门之二元分类

机器学习框架ML.NET学习笔记【3】文本特征分析

机器学习框架ML.NET学习笔记【4】手写数字识别

机器学习框架ML.NET学习笔记【5】手写数字识别(续)

机器学习框架ML.NET学习笔记【6】TensorFlow图片分类

机器学习框架ML.NET学习笔记【7】人物图片颜值判断

机器学习框架ML.NET学习笔记【8】目标检测

机器学习框架ML.NET学习笔记【9】自动学习

 

资源下载:

项目源码:https://github.com/seabluescn/Study_ML.NET

资源文件:https://gitee.com/seabluescn/ML_Assets

(由于资源文件较大,所以放在码云平台提供下载)

 

一、序言

       微软的机器学习框架于2018年5月出了0.1版本,2019年5月发布1.0版本。期间各版本之间差异(包括命名空间、方法等)还是比较大的,随着1.0版发布,应该是趋于稳定了。之前在园子里也看到不少相关介绍的文章,对我的学习提供了不少帮助。由于目前资料不是很丰富,所以学习过程中也走了不少弯路,本系列的文章主要记录我学习过程中的一些心得体会,并对一些细节会做详细的解释,希望能为机器学习零基础的同学提供一些帮助。(C#零基础可不行)

 

二、基本概念

1、什么是机器学习?
定义:一个电脑程序要完成任务(T),如果电脑获取的关于T的经验(E)越多就表现(P)得越好,那么我们就可以说这个程序‘学习’了关于T的经验。

简单解释什么叫“机器的学习”:如果输入的经验越多表现的越好,这就叫“学习”。举个例子:传统的程序逻辑是基于算法的,在算法不变的情况下,程序就是运行100年能力也不会有提升,但机器学习是基于数据(样本)的,在算法不变的情况下,累计的有效数据越多,程序表现能力就越强。

 

2、通过机器学习解决问题和传统算法解决问题的区别

需要解决的问题:会议室进来一位男生,请他站在摄像头前面,通过一个程序评价一下这位男生身材是否很好。

(1)传统解决方案

  首先我们分析要判断一个人身材是否很好,主要的判断特征包括:身高、体重、三围等等,然后通过一个衡量算法(比如BMI)进行计算,流程如下:

 

(2)机器学习算法

   机器学习是依赖样本数据的,所以解决这个问题的思路是这样的:

①首先你得上街去收集数据,询问你采访对象的身高、体重、三围数据,然后根据你的经验给他一个评判,形成下表:

②对收集到的数据进行训练,形成模型,然后通过模型对要判断的对象进行评判。流程如下:

 

小结:通过这个问题的解决,感觉通过机器学习来解决问题比传统方法麻烦多了,是的,对于身材判断这样的问题,人类可以很简单找到一个逻辑分析的方法,所以通过逻辑算法解决就比较方便,但有时候很多事情我们人类是很容易处理的,但我们却不知道其中的逻辑,比如:判断一张图片是否是18+图片,判断一片论文是否写得很好,判断一个人是否长得漂亮等等。这些问题人类很轻松就能处理,但无法总结出其中的规律并交给机器去执行,这时候机器学习算法就可以派上用场了。

 

 三、机器学习的流程

 机器学习的流程如下:

数据准备 -> 建模 -> 训练 -> 评估 -> 应用
在实际应用时,由于训练的过程可能时间比较长,所以我们会分两个阶段进行:
1、学习阶段:数据准备 -> 建模 -> 训练 -> 评估 -> 保存模型
2、消费阶段:读取模型 -> 应用

评估的过程就是对模型的检验,我们一般会把样本数据随机分成两份,其中一部分用来学习,另一部分用来检验模型效果,判断一下我们的模型能力。

 

以上是涉及到机器学习的有些最基础的理论知识,下面几篇文章会由浅入深介绍ML.NET的一些应用。

系列文章目录:

机器学习框架ML.NET学习笔记【1】基本概念

机器学习框架ML.NET学习笔记【2】入门之二元分类

机器学习框架ML.NET学习笔记【3】文本特征分析

机器学习框架ML.NET学习笔记【4】手写数字识别

机器学习框架ML.NET学习笔记【5】手写数字识别(续)

机器学习框架ML.NET学习笔记【6】TensorFlow图片分类

机器学习框架ML.NET学习笔记【7】人物图片颜值判断

机器学习框架ML.NET学习笔记【8】目标检测

机器学习框架ML.NET学习笔记【9】自动学习

 

资源下载:

项目源码:https://github.com/seabluescn/Study_ML.NET

资源文件:https://gitee.com/seabluescn/ML_Assets

(由于资源文件较大,所以放在码云平台提供下载)

 

Guess you like

Origin www.cnblogs.com/owenzh/p/11208047.html