当前位置:网站首页>训练后的随机森林模型导出和加载
训练后的随机森林模型导出和加载
2022-06-23 08:00:00 【毛发浓密的猿工】
运用joblib导出和加载训练后的随机森林模型
""" 构造随机森林模型和预测 """
from sklearn.ensemble import RandomForestRegressor
regressor = RandomForestRegressor(n_estimators=20, oob_score=True)
regressor.fit(meteo_index_del0[:, 1:5], meteo_index_del0[:, 5].reshape(-1, 1).ravel())
print("Score:\n", regressor.oob_score_)
''' 导出和加载随机森林 '''
import joblib
joblib.dump(regressor, "my_random_forest.joblib") # save
loaded_rf = joblib.load("my_random_forest.joblib") # load
边栏推荐
- Regular expression use cases
- PHP file contains -ctf
- vtk.js鼠标左键滑动改变窗位和窗宽
- @Controller和@RestController的区别?
- 6-闪耀的激光-CALayer 的应用
- How to mine keywords and improve user experience before website construction?
- Implementation of AVL tree
- socket编程(多线程)
- On ThreadLocal and inheritablethreadlocal, source code analysis
- What is edge cloud?
猜你喜欢

Commonly used bypass methods for SQL injection -ctf

Ignore overlength parameter violation

RTSP/ONVIF协议视频平台EasyNVR启动服务报错“service not found”,该如何解决?

vtk.js鼠标左键滑动改变窗位和窗宽

Imperva- method of finding regular match timeout

vtk. JS left mouse button sliding to change window level and window width
![[try to hack] IP address](/img/ab/ed91f3094ac913a0d79448a2d19015.png)
[try to hack] IP address

Deep learning ----- different methods to realize vgg16

Implementation principle and source code analysis of ThreadPoolExecutor thread pool

复选框的基本使用与实现全选和反选功能
随机推荐
Go language basic conditional statement if
81 sentences worth repeating
Configuration asmx not accessible
6-闪耀的激光-CALayer 的应用
Easygbs cannot play video streams in webrtc format. What is the reason?
Odoo project sends information to wechat official account or enterprise wechat
Markdown学习
socket编程(多线程)
看了5本书,我总结出财富自由的这些理论
How to start Jupiter notebook in CONDA virtual environment
Vulnhub | DC: 4 | [combat]
Socket programming -- select model
Azure Active Directory brute force attack
一秒钟查看一次文件,并将文件最后一行内容结果发送至syslog服务器
APM performance monitoring practice of jubasha app
Capturing packets to find repeated acks and a large number of TCP retransmissions in TCP sessions -- sack (selective acknowledgement) technology
如何在conda虚拟环境开启jupyter-notebook
Ignore overlength parameter violation
The essence of five good books on wealth and freedom
GTEST死亡测试