概览
2023-02-24

CatBoost API

CatBoost 参数 Objectives and metrics Regression MAE MAPE Poisson Quantile RMSE LogLinQuantile Lq Huber Expectile FairLoss NumErrors SMAPE R2 MSLE …

Machine learning 阅读
2022-08-04

CatBoost

CatBoost 简介 CatBoost,Categorical Boosting CatBoost 由俄罗斯公司 Yandex 设计,并于 2017 年在 Github 上开源。在 2017 年刚刚开源的时候, CatBoost 的效果并不理想,而且因为 CatBoost 在 CPU 上训练很慢,并不是很受大家的欢 …

Machine learning 阅读
概览
2023-02-24

GBDT API

GBDT 参数类型 决策树参数 min_samples_split 要分裂的树节点需要的最小样本数量, 若低于某个阈值, 则在此节点不分裂 用于控制过拟合, 过高会阻止模型学习, 并导致欠拟合 需要使用CV进行调参 min_samples_leaf 叶子节点中所需的最小样本数, 若低于某个阈值, 则此节点的父节点将不分 …

Machine learning 阅读
2022-07-31

GBDT

GBDT 简介 GBDT 特点 集成学习 Boosting 一族将多个弱学习器(或称基学习器)提升为强学习器, 像 AdaBoost、GBDT 等都属于“加性模型”(Additive Model),即基学习器的线性组合 1997年 Freund 和 Schapire 提出的 AdaBoost 先从初始训练集训练出一个基 …

Machine learning 阅读
概览
2024-09-18

LightGBM 安装

LightGBM 的安装非常简单,在 Linux 下很方便的就可以开启 GPU 训练。可以优先选用从 pip 安装,如果失败再从源码安装。 pip 安装 pip install lightgbm pip install --no-binary :all: lightgbm # 从源码编译安装 pip install …

Machine learning 阅读
2023-03-07

LightGBM baseline

import numpy as np import pandas as pd import lightgbm as lgb from sklearn.model_selection import KFold from sklearn.metrics import f1_score, roc_auc_score …

Machine learning 阅读
2023-02-24

LightGBM API

LightGBM 核心数据结构 数据格式 数据保存在 lightgbm.Dataset 对象中 LibSVM(zero-based)、TSV、CSV、TXT 文本文件 可以包含标题 可以指定 label 列、权重列、query/group id 列 可以指定一个被忽略的列的列表 numpy 二维数组 pandas …

Machine learning 阅读
2022-08-03

LightGBM

LightGBM 简介 LightGBM 特点 LightGBM is a gradient boosting framework that uses tree based learning algorithms. It is designed to be distributed and efficient with …

Machine learning 阅读
概览
2024-09-18

XGBoost 安装

Linux 下载源码 $ git clone --recursive https://github.com/dmlc/xgboost 编译 libxgboost.so $ cd xgboost $ make -j4 如果需要支持 GPU,则需要执行以下步骤 $ cd xgboost $ mkdir build $ cd …

Machine learning 阅读
2023-03-02

XGBoost 使用

参数 通用参数 控制整个模型的通用性能 booster:基本学习器类型,默认 gbtree gbtree:基于树的模型 gblinear:线性模型。gblinear 使用带 l1,l2 正则化的线性回归模型作为基学习器。 因为 boost 算法是一个线性叠加的过程,而线性回归模型也是一个线性叠加的过程。 因此叠加的最终 …

Machine learning 阅读
2022-08-02

XGBoost

XGBoost 简介 XGBoost,eXtreme Gradient Boosting XGBoost is an optimized distributed gradient boosting library designed to be highly efficient, flexible and …

Machine learning 阅读