Skip to main content

A package to win data competition

Project description

lianyhaii

usage

第一步:安装与测试

pip install lianyhaii
import lianyhaii
print(lianyhaii.__version__)

第二步:准备数据、特征、参数

import pandas as pd 
import numpy  as np 
import lianyhaii
import warnings 
import sys 
warnings.filterwarnings('ignore')

## 定义数据集、label、训练参数、特征名
train = pd.DataFrame({
    'y':(np.random.random(size=500)>0.5).astype(int)
})
test = pd.DataFrame({
    'y':(np.random.random(size=500)>0.5).astype(int)
})
for i in range(10):
    train[f'x{i}'] = np.random.random(size=500)
    test[f'x{i}'] = np.random.random(size=500)
label = 'y'
lgb_params = {
    'objective': 'binary',
    'boosting_type': 'gbdt',
    'metric': 'auc',
    'early_stopping_rounds': 50,
    'verbose':-1,
}
base_features = [f'x{i}' for i in range(10)]

以上是送进模型的主要准备工作,接下来会轻松不少

第三步:快速模型测试

mt = make_test(train,test,base_features=base_features,new_features=[],
            m_score=[[0.0,]],label=label,metrices=['auc'],log_tool=None)
mt.init_CV(seed=412,CV_type='skFold',n_split=5)
oof,pred = mt.lgb_test(lgb_params=lgb_params)
## 得到oof和pred方便后续调整或者提交

获奖经历

2021 山东赛 公积金贷款逾期预测 A榜 rank2/xxx B榜 rank6/xxx
2021 梧桐杯 5G潜客识别 B榜 rank7/xxx
2022 招商银行Fintech rank23/xxx -> 开源 2022 搜狐校园 情感分析 × 推荐排序 算法大赛 rank5/xxx -> 开源

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

lianyhaii-0.0.142.tar.gz (126.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lianyhaii-0.0.142-py3-none-any.whl (115.4 kB view details)

Uploaded Python 3

File details

Details for the file lianyhaii-0.0.142.tar.gz.

File metadata

  • Download URL: lianyhaii-0.0.142.tar.gz
  • Upload date:
  • Size: 126.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.46.1 importlib-metadata/4.8.1 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.13

File hashes

Hashes for lianyhaii-0.0.142.tar.gz
Algorithm Hash digest
SHA256 25026bf778a560ae427b96e9e4d18e7b816695aecf351765495152ebc6750338
MD5 68f472b68b41b8c7cc09aa5e297a5a37
BLAKE2b-256 8f60c09e37bd640d9b8a2751df80f12fe02fe424e879531ad1cbd97c3d60b94c

See more details on using hashes here.

File details

Details for the file lianyhaii-0.0.142-py3-none-any.whl.

File metadata

  • Download URL: lianyhaii-0.0.142-py3-none-any.whl
  • Upload date:
  • Size: 115.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.46.1 importlib-metadata/4.8.1 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.13

File hashes

Hashes for lianyhaii-0.0.142-py3-none-any.whl
Algorithm Hash digest
SHA256 7606b81104f87b53e23ca8b06bdcbcc5e431dae37c887bb99450daddab057b52
MD5 4faa228f92a1ccc98e3aa4be37a2e816
BLAKE2b-256 01b8932c16499f998c07a8ee613b6f29d0e86d4f4f1c510b2c30aef438972242

See more details on using hashes here.

Supported by

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