当前位置:网站首页>基于sklearn的决策树应用实战
基于sklearn的决策树应用实战
2022-08-10 07:59:00 【白话机器学习】
在sklearn中,我们主要使用两个决策树方法,均封装在tree模块下。
分别是分类树tree.DecisionTreeClassifier、回归树tree.DecisionTreeRegressor,对应分别基于决策树解决分类问题和回归问题。
本次主要以分类树的使用过程为例进行介绍。在sklearn中分类决策树的函数方法如下:
DecisionTreeClassifier(class_weight=None, criterion='gini', max_depth=None,
max_features=None, max_leaf_nodes=None,
min_impurity_decrease=0.0, min_impurity_split=None,
min_samples_leaf=1, min_samples_split=2,
min_weight_fraction_leaf=0.0, presort=False,
random_state=None, splitter='best')
主要参数介绍:
1、criterion
这个参数是用来指定构造树时,树的“不纯度”的计算方法,主要有两种:
(1)entropy,使用信息熵来构造
(2)gini,使用基尼系数来构造(默认采用此模式)
边栏推荐
- C# 获取PCI等设备的插槽位置信息
- ATH10 sensor reads temperature and humidity
- 差分、前缀和模板
- pytest之parametrize参数化
- [In-depth study of 4G/5G/6G topic-56]: L3 signaling control-5-radio bearer management
- Power function Exponential function Logarithmic function
- Synchronization lock synchronized traces the source
- 自动化测试框架Pytest(三)——自定义allure测试报告
- [深入研究4G/5G/6G专题-56]: L3信令控制-5-无线承载管理
- 2022-08-01 Advanced Network Engineering (24) STP Advanced Knowledge
猜你喜欢

【NeRF】原始论文解读

iwemeta元宇宙:一个娃娃卖9999元,泡泡玛特认为一点也不贵

34. Talk about why you want to split the database?What methods are there?

调试ZYNQ的u-boot 2017.3 不能正常启动,记录调试过程

Solve the problem that the win10win7win8 system cannot find the specified module and cannot register the desert plug-in

机器人控制器编程实践指导书旧版-实践二 传感器(模拟量)

添加spark的相关依赖和打包插件(第六弹)

张驰课堂:老板会武术,谁也挡不住!六西格玛培训的魅力

day16--The use of the packet capture tool Charles

MySQL设置初始密码—注意版本mysql-8.0.30
随机推荐
WooCommerce installation and rest api usage
The sixteenth day & the basic operation of charles
Day36 LeetCode
nrm 使用详解
Obtain - 65 [chances] : "soldiers, subtlety also - 7-36 meter reading - defeat
What is an MQTT gateway?What is the difference with traditional DTU?
Power function Exponential function Logarithmic function
[机缘参悟-65]:《兵者,诡道也》-7-三十六计解读-败战计
Class Notes (7) (1) - #647. Find the root and the child (root)
人工神经网络模型的特点,人工神经网络模型定义
2022-08-01 Advanced Network Engineering (24) STP Advanced Knowledge
CV+Deep Learning——网络架构Pytorch复现系列——classification(三:MobileNet,ShuffleNet)
The probability distribution and its application
NPU架构与算力分析
Complex AB experiment
幂函数 指数函数 对数函数
卷积神经网络卷积层公式,卷积神经网络运算公式
Johnson全源最短路
Day37 LeetCode
Process management (dynamic)