当前位置:网站首页>机器学习(二) —— 机器学习基础
机器学习(二) —— 机器学习基础
2022-08-05 05:13:00 【share16】
Python —— 机器学习
机器学习(二) —— 机器学习基础
大家可以关注知乎或微信公众号的share16,我们也会同步更新此文章。
一、补充知识
1.1 xgboost
xgboost和LightGBM等,是目前数据挖掘中最常用的预测算法。xgboost是GBDT(梯度提升树)算法的工程实现,其逻辑是:首先训练一颗树,然后计算出每个样本的误差(也叫梯度),通过去拟合误差训练下一颗树,一直拟合直到训练结果符合要求。
import xgboost as xgb
# from xgboost.sklearn import XGBClassifier
xgb.XGBClassifier()
# objective="binary:logistic" 目标函数,代表是二分类,损失函数是logistic
1.2 LightGBM
LightGBM可以说是xgboost上的延续,在xgboost上做了一些优化,从应用层面上来说最直接的两点就是:①速度变快了很多;②可以支持类别型特征(在xgb中是不可以的,需要one-hot)。
import lightgbm as gbm
gbm.LGBMClassifier()
1.3 BP神经网络
BP神经网络是一种按照误差逆向传播算法训练的多层前馈神经网络,是应用最广泛的神经网络模型之一,也是目前深度学习的理论基础。目前深度学习网络的参数优化是基于BP和梯度回归的。BP神经网络分为前向网络和后向网络,前向网络是计算目标值,后向网络用于梯度计算。
from sklearn.neural_network import MLPClassifier
BP = MLPClassifier()
谢谢大家
边栏推荐
猜你喜欢

【转】什么是etcd

使用二维码解决固定资产管理的难题

Flutter learning 5-integration-packaging-publish

Flutter真机运行及模拟器运行
![[cesium] 3D Tileset model is loaded and associated with the model tree](/img/03/50b7394f33118c9ca1fbf31b737b1a.png)
[cesium] 3D Tileset model is loaded and associated with the model tree

Structured Light 3D Reconstruction (2) Line Structured Light 3D Reconstruction

Qt produces 18 frames of Cupid to express his love, is it your Cupid!!!

数据库 单表查询

Flutter学习2-dart学习

【过一下8】全连接神经网络 视频 笔记
随机推荐
Flutter真机运行及模拟器运行
MySQL中控制导出文件后变为了\N有什么解决方案吗?
RDD和DataFrame和Dataset
flex布局青蛙游戏通关攻略
第二讲 Linear Model 线性模型
u-boot调试定位手段
Flutter learning - the beginning
Flutter 父子组件如何都能收到点击事件
【过一下9】卷积
HQL语句执行过程
[WeChat applet] WXML template syntax - conditional rendering
The underlying mechanism of the class
【Untitled】
redis 缓存清除策略
【记一下1】2022年6月29日 哥和弟 双重痛苦
『递归』递归概念与典型实例
第三讲 Gradient Tutorial梯度下降与随机梯度下降
[cesium] 3D Tileset model is loaded and associated with the model tree
Reverse theory knowledge 4
有用番茄来监督自己的同道中人吗?加一下我的自习室,一起加油