Skip to main content

It is used to quickly build a scorecard project and dichotomy model package.

Project description

Make Scorecard(mksc)

快速构建二分类模型,标准化特征工程以及拓展制作评分卡,文件说明见docs\instruction.md

1. 安装工具包

pip install mksc

2. 创建项目

命令行工具创建项目

mksc project_name

3. 修改项目配置

修改project_name\config\configuration.ini文件,进行项目配置

4. 探索性数据分析

进行探索性数据分析python project_name\eda.py
生成:

  • 数据报告: project_name\result\report.html
  • 抽样数据: project_name\result\sample.xlsx
  • 特征配置: project_name\config\variable_type.csv

5. 修改特征配置

修改project_name\config\variable_type.csv文件,进行特征配置,配置列说明如下:

  • isSave:变量是否保留进行特征工程
    • 取值:0-不保留;1-保留
  • Type: 变量类型
    • 取值: numeric-数值类型;category-类别类型;datetime-日期类型;label-标签列
  • Default: 原始数据设定的默认值

5. 自定义数据清洗

编写自定义数据清洗与特征组合过程函数project_name\custom.py
自定义过程封装在Custom类中,定义了2个静态方法,clean_data用于处理行方向的数据与值修改, feature_combination用于扩展列。

6. 训练模块

完成以上配置后,执行特征工程feature_engineering类,models目录下通过模型模板训练 模型结果、特征工程结果均置于project_name\result下.
至此完成二分类项目构建

7. 评分卡与模型调整

如果训练逻辑回归模型可选制作评分卡

8. 模型应用与预测

python project_name\preict.py

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

mksc-3.0.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

mksc-3.0.0-py3-none-any.whl (35.9 kB view details)

Uploaded Python 3

File details

Details for the file mksc-3.0.0.tar.gz.

File metadata

  • Download URL: mksc-3.0.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.4.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.13

File hashes

Hashes for mksc-3.0.0.tar.gz
Algorithm Hash digest
SHA256 87238b23adf9e68273b60d5602a83195dc54868484e3bcf2ec2fee655c487212
MD5 f58df26ea51e8beeddb25ab14d277022
BLAKE2b-256 5f2ec004445c27bdb4843bd0b80d29715e337a3e4bf048b67bc44b2aae3ca1fd

See more details on using hashes here.

File details

Details for the file mksc-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: mksc-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 35.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.4.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.6.13

File hashes

Hashes for mksc-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c2e49e1def97ab9bc48d4dec21c2905b4122cc88b2564d11d7a3f37f4b3b00f
MD5 447ca40a64e1a08c5255d15a718d8ee8
BLAKE2b-256 a4101314477ff78e2ca253dabfd5ad5c9ca38fd2aa33bcb0ececd5357afe70de

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