Python学习笔记:LGB/XGB/CatBoost/NGB之安装

一、安装

数据挖掘比赛最常用预测、分类模型:LGB、XGB、CatBoost、NGB、ANN等。

1.lightgbm

微软开源的 lightgbm 越来越流行。

目前比赛数据量越来越大,想要获得一个比较好的预测精度,同时又要减少内存占用以及提升训练速度,lightgbm 是一个不错的选择,其可达到与 xgboost 相似的预测效果。

pip install lightgbm

2.xgboost

lightgbm 出现之前,打比赛的不二选择,现在由于需要做模型融合 stacking 以提高预测精度,所以也需要使用到 xgboost

pip install xgboost
pip install xgboost -i https://pypi.tuna.tsinghua.edu.cn/simple # 指定清华镜像

第一次直接安装,因为网络问题,没安装上。

换成国内清华镜像解决。

3.catboost

pip install catboost -i https://pypi.tuna.tsinghua.edu.cn/simple

安装 CatBoost 时所安装的依赖。

Installing collected packages: tenacity, python-da
 graphviz, catboost
  Attempting uninstall: python-dateutil
    Found existing installation: python-dateutil 2
    Uninstalling python-dateutil-2.6.1:
      Successfully uninstalled python-dateutil-2.6
  Attempting uninstall: numpy
    Found existing installation: numpy 1.14.0
    Uninstalling numpy-1.14.0:
      Successfully uninstalled numpy-1.14.0
  Attempting uninstall: pandas
    Found existing installation: pandas 0.22.0
    Uninstalling pandas-0.22.0:
      Successfully uninstalled pandas-0.22.0
Successfully installed catboost-1.0.4 graphviz-0.1
plotly-5.6.0 python-dateutil-2.8.2 tenacity-8.0.1

4.ngboost

斯坦福发表的新算法,该算法利用自然梯度将不确定性估计引入到梯度增强中。

pip install ngboost -i https://pypi.tuna.tsinghua.edu.cn/simple

二、加载

import pandas as pd
import lightgbm as lgb
import xgboost as xgb
import catboost as ctb

参考链接:机器学习笔记之Anaconda中命令形式安装XGBoost(pip install)

参考链接:清华镜像源安装 NGboost XGboost Catboost

posted @   Hider1214  阅读(1623)  评论(2编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
点击右上角即可分享
微信分享提示