当前位置:网站首页>机器学习概述
机器学习概述
2022-08-05 04:08:00 【米卡粒】
1.1人工智能概述
达特茅斯会议-人工智能的起点
机器学习是人工智能的一个实现途径
深度学习是机器学习的一个方法发展而来
1.1.2机器学习、深度学习能做些什么
传统预测
图像识别
自然语言处理
1.2什么是机器学习
数据、模型、预测
从历史数据中获得规律?这些历史数据是怎么的格式?
1.2.3数据集构成
特征值+目标值
1.3机器学习算法分类
监督学习
目标值:类别——分类问题
k-近邻算法、贝叶斯分类、决策树与随机森林、逻辑回归
目标值:连续型的数据-回归问题
线性回归、岭回归
目标值:无-无监督学习
聚类 k-means
1、预测明天的气温是多少? 回归
2、预测明天是阴、晴、雨? 分类
3、人脸年龄预测? 回归/分类
4、人脸识别 ? 分类
2.1数据集
2.1.1可用数据集
公司内部 百度
数据接口 花钱
数据集
学习阶段可以用的数据集:
1、sklearn
2、kaggle
3、UCI
1 Scikit-learn工具介绍
2.1.2sklearn数据集
sklearn.datasets
load_* 获取小规模数据集
from sklearn.datasets import load_iris
def datasets_demo():
"""
sklearn数据集使用
:return:
"""
# 获取数据集
iris = load_iris()
print("鸢尾花数据集:\n",iris)
print("鸢尾花数据集描述:\n", iris["DESCR"])
print("鸢尾花特征值的名字:\n", iris.feature_names)
print("鸢尾花特征值:\n", iris.data.shape)
return None
if __name__ == "__main__":
# 代码1:sklearn数据集使用
datasets_demo()运行如下(数据过多,展示部分)
fetch_* 获取大规模数据集
2 sklearn小数据集
sklearn.datasets.load_iris()
3 sklearn大数据集
sklearn.datasets.fetch_20newsgroups(data_home=None)
4 数据集的返回值
datasets.base.Bunch(继承自字典)
dict["key"] = values
bunch.key = values
思考:拿到的数据是否都用来训练一个模型?
2.1.3数据集的划分
训练数据集:用于训练、构建模型
测试数据:在模型检验是使用,用于评估模型是否有效
测试集 20%~30%
sklearn.model_selection.train_test_split(arrays,*options)
训练集特征值,测试集特征值,训练集目标值,测试集目标值
x_train, x_test, y_train, y_test
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
def datasets_demo():
"""
sklearn数据集使用
:return:
"""
# 获取数据集
iris = load_iris()
print("鸢尾花数据集:\n",iris)
print("鸢尾花数据集描述:\n", iris["DESCR"])
print("鸢尾花特征值的名字:\n", iris.feature_names)
print("鸢尾花特征值:\n", iris.data.shape)
# 数据集的划分
x_train, x_test, y_train, y_test = train_test_split(iris.data, iris.target, test_size=0.2, random_state=22)
print("训练数据集的特征:\n", x_train, x_train.shape)
return None
if __name__ == "__main__":
# 代码1:sklearn数据集使用
datasets_demo()部分运行结果如下

边栏推荐
- How to solve the three major problems of bank data collection, data supplementary recording and index management?
- 1007 Climb Stairs (greedy | C thinking)
- UE4 通过与其它Actor互动开门
- 10 years of testing experience, worthless in the face of the biological age of 35
- MySql index learning and use; (I think it is detailed enough)
- 【测量学】速成汇总——摘录高数帮
- Initial solution of the structure
- 【8.2】代码源 - 【货币系统】【硬币】【新年的问题(数据加强版)】【三段式】
- Ice Scorpion V4.0 attack, security dog products can be fully detected
- 开发属于自己的node包
猜你喜欢

A 35-year-old software testing engineer with a monthly salary of less than 2W, resigns and is afraid of not finding a job, what should he do?

UE4 在游戏运行时更改变量 (通过鼠标滑轮来更改第一人称角色的最大行走速度)

Qixi Festival code confession

阿里本地生活单季营收106亿,大文娱营收72亿,菜鸟营收121亿

public static
List asList(T... a) What is the prototype? 
Mysql的undo log详解

多列属性column元素的可见性:display、visibility、opacity、垂直对齐方式:vertical-align、z-index 越大越显示在上层

UE4 后期处理体积 (角色受到伤害场景颜色变淡案例)
![[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters](/img/89/8adef42b0cfd154e6fa7205afaeade.png)
[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters

不看后悔,appium自动化环境完美搭建
随机推荐
阿里本地生活单季营收106亿,大文娱营收72亿,菜鸟营收121亿
Android interview question - how to write with his hands a non-blocking thread safe queue ConcurrentLinkedQueue?
Open-Falcon of operation and maintenance monitoring system
The first performance test practice, there are "100 million" a little nervous
UE4 后期处理体积 (角色受到伤害场景颜色变淡案例)
数据库设计的酸(ACID)碱(BASE)原则
MRTK3 develops Hololens application - gesture drag, rotate, zoom object implementation
36-Jenkins-Job迁移
[MRCTF2020]PYWebsite
2022.8.4-----leetcode.1403
The test salary is so high?20K just graduated
1007 Climb Stairs (greedy | C thinking)
事件解析树Drain3使用方法和解释
There are several common event handling methods in Swing?How to listen for events?
【8.3】代码源 - 【喵 ~ 喵 ~ 喵~】【树】【与】
Getting Started with Kubernetes Networking
BI业务分析思维:现金流量风控分析(二)信用、流动和投资风险
[极客大挑战 2019]FinalSQL
Acid (ACID) Base (BASE) Principles for Database Design
工业级远距离无线传输装置的功能有哪些?