Skip to main content

auto build a tree model

Project description

#自动构建树模型 ##自动构建xgboost或lightgbm模型

### 一、训练、自动选变量、自动调参数 1、训练模型

2、shap 或 feature importance自动筛选变量

3、相关性筛选变量

4、PSI筛选变量

5、自动调参

6、逐步剔除变量

7、构建最终模型

### 二、建模相关结果保存 1、将模型文件持久化

2、将变量重要性持久化

3、将模型效果持久化

4、500条x数据用于验证后续部署是否一致

5、模型在建模数据集上的预测结果持久化

## 三、使用教程 请查看ryan_tutorial_code.py。里面有两个例子,一个列子使用的数据集随机生成的数据,一个是虚构现实数据

## 四、依赖包安装(建议先创建虚拟环境,不创建虚拟环境也行,创建虚拟环境是为了不和其它项目有依赖包的冲突,不创建虚拟环境的话在基础python环境执行pip install即可) ####创建虚拟环境 conda create -y –force -n auto_build_tree_model python=3.7.2 ####激活虚拟环境 conda activate auto_build_tree_model

### 依赖包安装方式一

####安装依赖包 pip install pandas==1.2.4

pip install joblib==0.14.1

pip install xgboost==1.2.0

pip install bayesian-optimization==1.1.0

pip install lightgbm==3.2.1

pip install shap==0.36.0

### 依赖包安装方式二,执行如下命令安装依赖的包 pip install -r requirements.txt

History

0.1.0 (2022-11-12)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autotreemodel-0.1.3.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

autotreemodel-0.1.3-py2.py3-none-any.whl (21.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file autotreemodel-0.1.3.tar.gz.

File metadata

  • Download URL: autotreemodel-0.1.3.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.2

File hashes

Hashes for autotreemodel-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f73e7be51679a933377a05e5cd0517d6f56d642ed3ba8407078b3f33ede1e08e
MD5 2efaa2c04f928e76ccc97beceb08da04
BLAKE2b-256 183ac1b6543c7f72055367e20bfba9f056b775f08665923c43930a2fc02ae095

See more details on using hashes here.

File details

Details for the file autotreemodel-0.1.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for autotreemodel-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fcaedef65bd70c7d1220bd1a319b9b3f6d26ff209c6c74cef69e21ae39f90a9f
MD5 1c62dfd9d30907e43b7f35572a9197d5
BLAKE2b-256 f610f3cd4c46fb7f3af5653f8e9faae7a59a3f627d53eaba35ce0062aded8992

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page