[kaggle竞赛] 毒蘑菇的二元预测

news2024/9/26 5:21:22

毒蘑菇的二元预测

您提供了很多关于不同二元分类任务的资源和链接,看起来这些都是Kaggle竞赛中的参考资料和高分解决方案。为了帮助您更好地利用这些资源,这里是一些关键点的总结:

Playground Season 4 Episode 8

  • 主要关注的竞赛: 使用银行流失数据集进行二元分类。
  • 数据集: 已经重新组织并发布供参考。
  • 热门解决方案:
    • LightGBM 和 CatBoost 模型 (得分 0.8945)。
    • XGBoost 和随机森林模型。
    • 神经网络分类模型。

其他相关的竞赛和资源

  • 使用生物信号对吸烟者状况进行二元预测
    • EDA 和特征工程。
    • XGBoost 模型。
  • 使用软件缺陷数据集进行二元分类
    • EDA 和建模。
  • 机器故障的二元分类
    • EDA, 集成学习, ML pipeline, SHAP 分析。
  • 使用表格肾结石预测数据集进行二元分类
    • 多种模型对比。
  • 特色竞赛
    • 美国运通 - 违约预测
      • 特征工程和LightGBM模型。
    • 房屋信贷违约风险
      • 完整的EDA和特征重要性分析。

竞争指标 - Mathews 相关性系数

  • 定义: 衡量二元分类器输出质量的度量。
  • 资源:
    • Wikipedia 关于 Phi 系数的页面。
    • Voxco 博客关于 Matthews 相关性系数的文章。
    • 一篇关于 Matthews 相关性系数在生物数据挖掘中的应用的论文。
    • Scikit-learn 文档中关于 Matthews 相关性系数的说明。

希望这些信息能够帮助您更有效地开始学习和参与这些竞赛。如果您有具体的问题或者需要针对某个特定部分的帮助,请告诉我!

# 加载训练数据
train_data = pd.read_csv('train.csv')

# 显示前几行数据以了解数据结构
print(train_data.head())

# 查看数据的基本信息
print(train_data.info())

步骤 2: 数据探索与可视化

在这一步中,我们将对数据进行更深入的探索,并使用可视化工具来更好地理解数据的分布和特征之间的关系。

# 统计每种类型的蘑菇数量
print(train_data['class'].value_counts())

# 可视化不同类型的蘑菇数量
plt.figure(figsize=(8, 6))
sns.countplot(x='class', data=train_data)
plt.title('Distribution of Mushroom Classes')
plt.show()

# 查看各特征与目标变量之间的关系
fig, axs = plt.subplots(5, 5, figsize=(20, 20))
axs = axs.flatten()
for i, col in enumerate(train_data.columns[1:]):
    sns.countplot(x=col, hue='class', data=train_data, ax=axs[i])
    axs[i].set_title(f'Distribution of {col} by Class')
plt.tight_layout()
plt.show()

步骤 3: 数据预处理

接下来,我们将对数据进行预处理,包括特征编码和其他必要的变换。

# 对类别特征进行编码
label_encoder = LabelEncoder()

# 遍历所有非数字特征
for col in train_data.select_dtypes(include=['object']).columns:
    train_data[col] = label_encoder.fit_transform(train_data[col])
    
# 查看编码后的数据
print(train_data.head())

步骤 4: 构建模型

在这一步中,我们将构建 LightGBM 和 CatBoost 模型,并进行训练。

# 分割数据集
X = train_data.drop('class', axis=1)
y = train_data['class']

# 划分训练集和验证集
X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2, random_state=42)

# 定义 LightGBM 模型
lgb_params = {
    'objective': 'binary',
    'metric': 'auc',
    'verbosity': -1,
    'boosting_type': 'gbdt',
    'num_leaves': 31,
    'learning_rate': 0.05,
    'feature_fraction': 0.9,
    'bagging_fraction': 0.8,
    'bagging_freq': 5,
    'lambda_l1': 0.1,
    'lambda_l2': 0.1
}

# 创建 LightGBM 数据集
lgb_train = lgb.Dataset(X_train, y_train)
lgb_val = lgb.Dataset(X_val, y_val, reference=lgb_train)

# 训练 LightGBM 模型
lgb_model = lgb.train(lgb_params, lgb_train, num_boost_round=1000, valid_sets=[lgb_val], early_stopping_rounds=100)

# 定义 CatBoost 模型
cb_params = {
    'loss_function': 'Logloss',
    'eval_metric': 'AUC',
    'learning_rate': 0.05,
    'depth': 6,
    'l2_leaf_reg': 10,
    'bootstrap_type': 'Bayesian',
    'bagging_temperature': 0.2,
    'random_seed': 42,
    'allow_writing_files': False
}

# 创建 CatBoost 数据集
cb_train = Pool(X_train, y_train)
cb_val = Pool(X_val, y_val)

# 训练 CatBoost 模型
cb_model = CatBoostClassifier(**cb_params)
cb_model.fit(X_train, y_train, eval_set=(X_val, y_val), use_best_model=True, verbose=False)

步骤 5: 测试数据预测

最后,我们将使用训练好的模型对测试数据进行预测,并整理预测结果以符合 Kaggle 提交的要求。

# 加载测试数据
test_data = pd.read_csv('test.csv')

# 对测试数据进行相同的特征编码
for col in test_data.select_dtypes(include=['object']).columns:
    test_data[col] = label_encoder.transform(test_data[col])

# 获取测试数据的 ID
test_ids = test_data['id']

# 删除不需要的列
test_features = test_data.drop('id', axis=1)

# 使用模型进行预测
predictions_lgb = lgb_model.predict(test_features, num_iteration=lgb_model.best_iteration)
predictions_cb = cb_model.predict(test_features)

# 将预测结果转换为二进制形式
predictions_lgb_binary = (predictions_lgb > 0.5).astype(int)
predictions_cb_binary = (predictions_cb > 0.5).astype(int)

# 整理预测结果
submission_df = pd.DataFrame({'id': test_ids, 'class': predictions_lgb_binary})
submission_df['class'] = submission_df['class'].map({1: 'p', 0: 'e'})

# 保存预测结果
submission_df.to_csv('submission.csv', index=False)

好的,现在我将为你提供一个完整的代码示例来解决“毒蘑菇的二元预测”问题。我们将使用 LightGBM 和 CatBoost 这两个模型来进行预测,并遵循之前讨论过的步骤。

首先,我们需要安装必要的库。如果你还没有安装它们,可以使用以下命令安装:

pip install pandas numpy scikit-learn lightgbm catboost matplotlib seaborn plotly

下面是完整的代码示例:

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import plotly.express as px
from plotly.subplots import make_subplots
import plotly.graph_objects as go
from sklearn.preprocessing import LabelEncoder
from sklearn.model_selection import train_test_split
import lightgbm as lgb
from catboost import CatBoostClassifier
from sklearn.metrics import matthews_corrcoef

# 忽略警告
import warnings
warnings.filterwarnings('ignore')

# 加载数据
train_data = pd.read_csv('train.csv')
test_data = pd.read_csv('test.csv')

# 数据预处理
def preprocess_data(data):
    # 对类别特征进行编码
    label_encoder = LabelEncoder()
    for col in data.select_dtypes(include=['object']).columns:
        data[col] = label_encoder.fit_transform(data[col])
    return data

# 预处理训练数据
train_data = preprocess_data(train_data)

# 预处理测试数据
test_data = preprocess_data(test_data)

# 数据分割
X = train_data.drop('class', axis=1)
y = train_data['class']
X_train, X_val, y_train, y_val = train_test_split(X, y, test_size=0.2, random_state=42)

# 定义 LightGBM 模型
lgb_params = {
    'objective': 'binary',
    'metric': 'binary_logloss',
    'verbosity': -1,
    'boosting_type': 'gbdt',
    'num_leaves': 31,
    'learning_rate': 0.05,
    'feature_fraction': 0.9,
    'bagging_fraction': 0.8,
    'bagging_freq': 5,
    'lambda_l1': 0.1,
    'lambda_l2': 0.1
}

# 创建 LightGBM 数据集
lgb_train = lgb.Dataset(X_train, y_train)
lgb_val = lgb.Dataset(X_val, y_val, reference=lgb_train)

# 训练 LightGBM 模型
lgb_model = lgb.train(lgb_params, lgb_train, num_boost_round=1000, valid_sets=[lgb_val], early_stopping_rounds=100)

# 定义 CatBoost 模型
cb_params = {
    'loss_function': 'Logloss',
    'eval_metric': 'AUC',
    'learning_rate': 0.05,
    'depth': 6,
    'l2_leaf_reg': 10,
    'bootstrap_type': 'Bayesian',
    'bagging_temperature': 0.2,
    'random_seed': 42,
    'allow_writing_files': False
}

# 训练 CatBoost 模型
cb_model = CatBoostClassifier(**cb_params)
cb_model.fit(X_train, y_train, eval_set=(X_val, y_val), use_best_model=True, verbose=False)

# 测试数据预测
test_ids = test_data['id']
test_features = test_data.drop('id', axis=1)

# 使用 LightGBM 进行预测
predictions_lgb = lgb_model.predict(test_features, num_iteration=lgb_model.best_iteration)
predictions_lgb_binary = (predictions_lgb > 0.5).astype(int)

# 使用 CatBoost 进行预测
predictions_cb = cb_model.predict(test_features)
predictions_cb_binary = (predictions_cb > 0.5).astype(int)

# 评估模型
mcc_lgb = matthews_corrcoef(y_val, lgb_model.predict(X_val, num_iteration=lgb_model.best_iteration) > 0.5)
mcc_cb = matthews_corrcoef(y_val, cb_model.predict(X_val) > 0.5)

print("LightGBM Matthews Correlation Coefficient: ", mcc_lgb)
print("CatBoost Matthews Correlation Coefficient: ", mcc_cb)

# 整理预测结果
submission_df = pd.DataFrame({'id': test_ids, 'class': predictions_lgb_binary})
submission_df['class'] = submission_df['class'].map({1: 'p', 0: 'e'})

# 保存预测结果
submission_df.to_csv('submission.csv', index=False)

# 可视化特征重要性
def plot_feature_importance(model, feature_names, title):
    fig, ax = plt.subplots(figsize=(12, 8))
    lgb.plot_importance(model, max_num_features=20, importance_type='gain', ax=ax)
    ax.set_title(title)
    plt.show()

# 可视化 LightGBM 特征重要性
plot_feature_importance(lgb_model, X_train.columns, 'LightGBM Feature Importance')

# 可视化 CatBoost 特征重要性
cb_model.plot_feature_importances(top_n=20, figsize=(12, 8), title='CatBoost Feature Importance')

这段代码完成了以下任务:

  1. 导入所需的库。
  2. 加载训练数据和测试数据。
  3. 对数据进行预处理,包括对类别特征进行编码。
  4. 划分数据集为训练集和验证集。
  5. 定义并训练 LightGBM 和 CatBoost 模型。
  6. 对测试数据进行预测。
  7. 评估模型的性能(使用 Matthews Correlation Coefficient)。
  8. 整理预测结果,并将其保存为 CSV 文件以供提交。
  9. 可视化特征重要性。

参考

Binary Classification with a Bank Churn Dataset

Playground Series - Season 4, Episode 1

OverviewDataCodeModelsDiscussionLeaderboardRulesTeamSubmissions

Samvel Kocharyan · 17th in this Competition · Posted 7 months ago

arrow_drop_up9

more_vert

17th Place Solution| AutoML + Unicorn's pollen + Lack of sleep

Context

S4E1 Playground "Binary Classification with a Bank Churn Dataset".

  • Business context: https://www.kaggle.com/competitions/playground-series-s4e1/overview
  • Data context: https://www.kaggle.com/competitions/playground-series-s4e1/data

Overview of the approach

Our final submission was a combination of AutoGluon 3-level stack we called "Frankenstein II" and set of averages from our previous models and some public notebooks.

Final submission was trained on the reduced set of features we got from OpenFE. Features were eliminated by BorutaSHAP and RFECV. Final model used 103 features.

Detail of the Submissions

We selected 2 submissions:

  • WeightedEnsemble_L3 0.89372 Public | 0.89637 Private | 0.898947 CV
  • Winning solution 0.90106 Private | 0.89687 Public. We got it from averaging 0.89673 and 0.89565 in last hours of the competition.

Frankenstein II schema

What worked for us?

  • Feature generation - 470 and Feature Elimination - 103
  • Data-Centric Approach (CleanLab)
  • Relabeling
  • AutoGluon 1.0.1 (thanks to @innixma)
  • BorutaSHAP framework and Skleran - RFECV
  • Ideas published by @paddykb, @thomasmeiner and respected community
  • Merging, Stacking, Ensembling, Averaging
  • Tons of experiments. Mainly for educative purposes
  • 🔥 Kaggle Alchemists Secret Society named after Akka från Kebnekajse
  • 🦄 Unicorn's pollen

What doesn't work for us this time?

  • PCA / ICA
  • Standalone Boosting models
  • TabPFN
  • Surnames features
  • Original dataset

Sources

  • https://www.kaggle.com/competitions/playground-series-s4e1/discussion/470363
  • https://www.kaggle.com/competitions/playground-series-s4e1/discussion/471164
  • https://www.kaggle.com/competitions/playground-series-s4e1/discussion/469859
  • https://www.kaggle.com/competitions/playground-series-s4e1/discussion/465192
  • https://www.kaggle.com/competitions/playground-series-s4e1/discussion/470610
  • https://www.kaggle.com/code/arunklenin/ps4e1-advanced-feature-engineering-ensemble
  • https://www.kaggle.com/code/thomasmeiner/ps4e1-eda-feature-engineering-modelling

根据您提供的信息,这是一个关于Kaggle竞赛“Playground Series - Season 4, Episode 1”的解决方案概述。在这个竞赛中,参赛者需要构建一个二分类模型来预测银行客户的流失情况。以下是该解决方案的主要部分:

业务背景

  • 目标:预测客户是否会离开银行。
  • 数据:包括客户的基本信息、交易记录等。

数据背景

  • 数据集:包含了多个特征,用于预测客户是否会选择离开银行。
  • 特征:包括但不限于年龄、性别、地理位置、账户余额、产品持有情况等。

解决方案概览

  • 最终提交:基于AutoGluon的3级堆叠模型,结合了之前模型的平均结果。
  • 特征工程:使用了OpenFE工具进行特征生成和消除,最终使用了103个特征。
  • 模型训练:使用了AutoGluon框架,并结合了BorutaSHAP和RFECV进行特征选择。

关键技术点

  1. 特征生成与消除:通过多种方法生成新特征,并利用BorutaSHAP和RFECV进行特征选择。
  2. 数据清理:使用CleanLab进行数据清洗。
  3. 标签修正:进行了重新标注以提高准确性。
  4. AutoGluon:使用版本1.0.1的AutoGluon进行自动机器学习。
  5. 集成学习:通过堆叠、合并、平均等技术提高了模型的泛化能力。

未成功的方法

  • PCA/ICA:主成分分析和独立成分分析并未提升模型性能。
  • 单独的Boosting模型:单独使用Boosting模型效果不佳。
  • TabPFN:一种用于表格数据的神经网络架构,在本竞赛中未取得显著效果。
  • 姓氏特征:尝试使用客户的姓氏作为特征未能提升模型性能。
  • 原始数据集:仅使用原始数据集的效果不如经过特征工程的数据集。

实现代码

考虑到上述解决方案的复杂性和涉及的技术,下面是一个简化版的示例代码,展示如何使用AutoGluon进行自动机器学习,并结合特征选择的方法:

import pandas as pd
import numpy as np
from autogluon.tabular import TabularPredictor
from boruta import BorutaPy
from sklearn.ensemble import RandomForestClassifier
from sklearn.feature_selection import RFECV
from sklearn.model_selection import StratifiedKFold
from sklearn.pipeline import Pipeline

# 数据路径
train_path = 'train.csv'
test_path = 'test.csv'

# 加载数据
train_data = pd.read_csv(train_path)
test_data = pd.read_csv(test_path)

# 数据预处理
# ...

# 特征选择
# 使用BorutaSHAP进行特征选择
rf = RandomForestClassifier(n_jobs=-1, class_weight='balanced', max_depth=5)
feat_selector = BorutaPy(rf, n_estimators='auto', verbose=2, random_state=1)
feat_selector.fit(train_data.drop('target', axis=1), train_data['target'])

# 使用RFECV进行特征选择
rfecv = RFECV(estimator=RandomForestClassifier(), step=1, cv=StratifiedKFold(5),
              scoring='accuracy', verbose=2)
pipeline = Pipeline([('rfecv', rfecv)])
pipeline.fit(train_data.drop('target', axis=1), train_data['target'])

# 根据特征选择结果更新训练和测试数据
selected_features = list(set(feat_selector.support_) & set(pipeline.named_steps['rfecv'].support_))
train_data_selected = train_data[selected_features + ['target']]
test_data_selected = test_data[selected_features]

# 使用AutoGluon进行自动机器学习
predictor = TabularPredictor(label='target', problem_type='binary').fit(
    train_data=train_data_selected, presets='best_quality', time_limit=1200)

# 预测
predictions = predictor.predict(test_data_selected)

# 保存预测结果
submission = pd.DataFrame({'id': test_data['id'], 'target': predictions})
submission.to_csv('submission.csv', index=False)

注意事项

  • 请确保已安装AutoGluon、BorutaPy和其他必要的库。
  • 以上代码示例假设数据集已经过适当的预处理,例如处理缺失值、转换类别特征等。
  • 根据实际数据集的特点,可能还需要进一步调整参数和方法。

参考资料和入门材料 - Playground Season 4 Episode 8

大家好,

祝您在 Playground 系列(第 4 季第 08 集)的同期剧集中一切顺利。我希望以下编译和入围的参考资料和链接能帮助您有效、快速地入职 -

原始数据集

比赛和原始数据集被重新组织并发布在这里,以供参考。

二元分类器游乐场比赛

使用银行流失数据集进行二元分类

得票最多的内核
  1. https://www.kaggle.com/code/abdmental01/bank-churn-lightgbm-and-catboost-0-8945
  2. https://www.kaggle.com/code/akhiljethwa/playground-s4e1-eda-modeling-xgboost
  3. https://www.kaggle.com/code/hardikgarg03/bank-churn-random-forest-xgboost-and-lightbgm
  4. https://www.kaggle.com/code/marianadeem755/bank-churn-classification-neural-network-xgboost
  5. https://www.kaggle.com/code/mouadberqia/bank-churn-prediction-beginner-friendly-0-88959
  6. https://www.kaggle.com/code/arunklenin/ps4e1-advanced-feature-engineering-ensemble
  7. https://www.kaggle.com/code/danishammar/bank-churn-165034-dl
  8. https://www.kaggle.com/code/aspillai/bank-churn-catboost-0-89626
高分方法和讨论
  1. https://www.kaggle.com/competitions/playground-series-s4e1/discussion/472496 -- 等级2
  2. https://www.kaggle.com/competitions/playground-series-s4e1/discussion/472413 -- 等级3
  3. https://www.kaggle.com/competitions/playground-series-s4e1/discussion/472636 -- 排名17
  4. https://www.kaggle.com/competitions/playground-series-s4e1/discussion/473257 -- 逾期提交
  5. https://www.kaggle.com/competitions/playground-series-s4e1/discussion/472502 -- 等级1
  6. https://www.kaggle.com/competitions/playground-series-s4e1/discussion/472497 -- 等级5
  7. https://www.kaggle.com/competitions/playground-series-s4e1/discussion/472466 -- 排名11

使用生物信号对吸烟者状况进行二元预测

得票最多的内核
  1. https://www.kaggle.com/code/cv13j0/efficient-prediction-of-smoker-status
  2. https://www.kaggle.com/code/arunklenin/ps3e24-eda-feature-engineering-ensemble
  3. https://www.kaggle.com/code/ravi20076/playgrounds3e24-eda-baseline
  4. https://www.kaggle.com/code/oscarm524/ps-s3-ep24-eda-modeling-submission
  5. https://www.kaggle.com/code/ashishkumarak/binary-classification-smoker-or-not-eda-xgboost
高分方法和讨论
  1. https://www.kaggle.com/competitions/playground-series-s3e24/discussion/455248 -- 排名 3
  2. https://www.kaggle.com/competitions/playground-series-s3e24/discussion/455296 -- 排名 4
  3. https://www.kaggle.com/competitions/playground-series-s3e24/discussion/455271 -- 排名 7
  4. https://www.kaggle.com/competitions/playground-series-s3e24/discussion/455268 -- 排名 8

使用软件缺陷数据集进行二元分类

得票最多的内核
  1. https://www.kaggle.com/code/ambrosm/pss3e23-eda-which-makes-sense
  2. https://www.kaggle.com/code/oscarm524/ps-s3-ep23-eda-modeling-submission
  3. https://www.kaggle.com/code/iqbalsyahakbar/ps3e23-binary-classification-for-beginners
  4. https://www.kaggle.com/code/ravi20076/playgrounds3e23-eda-baseline
  5. https://www.kaggle.com/code/zhukovoleksiy/ps-s3e23-explore-data-stacking-ensemble
高分方法和讨论
  1. https://www.kaggle.com/competitions/playground-series-s3e23/discussion/450315 -- 排名 2

机器故障的二元分类

得票最多的内核
  1. https://www.kaggle.com/code/tetsutani/ps3e17-eda-ensemble-ml-pipeline-shap
  2. https://www.kaggle.com/code/yantxx/xgboost-binary-classifier-machine-failure
  3. https://www.kaggle.com/code/manishkumar7432698/pse17-feature-engineering-tuning-optuna
  4. https://www.kaggle.com/code/tumpanjawat/s3e17-mf-eda-clustering-adaboost
  5. https://www.kaggle.com/code/akioonodera/ps-3-17-lgbm-bin
高分方法和讨论
  1. https://www.kaggle.com/competitions/playground-series-s3e17/discussion/419730 -- 排名 3
  2. https://www.kaggle.com/competitions/playground-series-s3e17/discussion/419643 -- 排名 11

使用表格肾结石预测数据集进行二元分类

得票最多的内核
  1. https://www.kaggle.com/code/richeyjay/kidney-stone-prediction-eda-binary-classification
  2. https://www.kaggle.com/code/kimtaehun/nice-eda-and-quick-xgb-baseline-in-2minutes
  3. https://www.kaggle.com/code/tumpanjawat/kidney-stone-eda-prediction-7-model-2-nn
  4. https://www.kaggle.com/code/hardikgarg03/kidney-stone-prediction
  5. https://www.kaggle.com/code/iqbalsyahakbar/ps3e12-simple-eda-fe-and-model-for-beginners
高分方法和讨论
  1. https://www.kaggle.com/competitions/playground-series-s3e12/discussion/402403 -- 等级 5
  2. https://www.kaggle.com/competitions/playground-series-s3e12/discussion/402416 -- 排名 8
  3. https://www.kaggle.com/competitions/playground-series-s3e12/discussion/402398 -- 排名 24

二元分类器特色竞赛

美国运通 - 违约预测

得票最多的内核
  1. https://www.kaggle.com/code/ambrosm/amex-eda-which-makes-sense
  2. https://www.kaggle.com/code/ragnar123/amex-lgbm-dart-cv-0-7977
  3. https://www.kaggle.com/code/kellibelcher/amex-default-prediction-eda-lgbm-baseline
  4. https://www.kaggle.com/code/ambrosm/amex-lightgbm-quickstart
  5. https://www.kaggle.com/code/jiweiliu/rapids-cudf-feature-engineering-xgb
高分内核
  1. https://www.kaggle.com/code/hideyukizushi/amex-inf-blend-onlyteam-v2
  2. https://www.kaggle.com/code/ragnar123/amex-lgbm-dart-cv-0-7977
  3. https://www.kaggle.com/code/thedevastator/the-fine-art-of-hyperparameter-tuning
  4. https://www.kaggle.com/code/rm1000/ensembling-with-vectorization
高分方法和讨论
  1. https://www.kaggle.com/competitions/amex-default-prediction/discussion/348111 -- 排名第一
  2. https://www.kaggle.com/competitions/amex-default-prediction/discussion/347637 -- 排名 2
  3. https://www.kaggle.com/competitions/amex-default-prediction/discussion/349741 -- 等级 3
  4. https://www.kaggle.com/competitions/amex-default-prediction/discussion/348097 -- 排名 5
  5. https://www.kaggle.com/competitions/amex-default-prediction/discussion/350538 -- 排名 9

房屋信贷违约风险

得票最多的内核
  1. https://www.kaggle.com/code/willkoehrsen/start-here-a-gentle-introduction
  2. https://www.kaggle.com/code/codename007/home-credit-complete-eda-feature-importance
  3. https://www.kaggle.com/code/willkoehrsen/introduction-to-manual-feature-engineering
高分方法和讨论
  1. https://www.kaggle.com/competitions/home-credit-default-risk/discussion/64821 -- 排名 1
  2. https://www.kaggle.com/competitions/home-credit-default-risk/discussion/64722 -- 排名 2
  3. https://www.kaggle.com/competitions/home-credit-default-risk/discussion/64596 -- 排名 3

Home Credit - 信用风险模型稳定性

得票最多的内核
  1. https://www.kaggle.com/code/greysky/home-credit-baseline
  2. https://www.kaggle.com/code/sergiosaharovskiy/home-credit-crms-2024-eda-and-submission
  3. https://www.kaggle.com/code/pereradulina/credit-risk-prediction-with-lightgbm-and-catboost
高分方法和讨论
  1. https://www.kaggle.com/competitions/home-credit-credit-risk-model-stability/discussion/508337 -- 排名第一
  2. https://www.kaggle.com/competitions/home-credit-credit-risk-model-stability/discussion/508113 -- 排名 10

竞争指标 - Mathews 相关性

  1. https://en.wikipedia.org/wiki/Phi_coefficient
  2. https://www.voxco.com/blog/matthewss-correlation-coefficient-definition-formula-and-advantages/
  3. The Matthews correlation coefficient (MCC) is more reliable than balanced accuracy, bookmaker informedness, and markedness in two-class confusion matrix evaluation | BioData Mining | Full Text
  4. matthews_corrcoef — scikit-learn 1.5.1 documentation -- 这是 scikit-learn 指标文档

祝你这一集一切顺利,学习愉快!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2067380.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

2024/8/22 英语每日一段

Belgian triathlete Claire Michel ultimately said it was a virus and not bacteria from the water that made her sick after a swim. But Belgium’s Olympic committee said in a statement that it hoped “lessons will be learned” for future Olympics. “We are th…

鸿蒙(API 12 Beta3版)【使用ImageEffect编辑图片】图片开发指导

场景介绍 ImageEffect提供了一系列接口用于图像的编辑。开发者可以通过ImageEffect接口处理不同图像输入类型Pixelmap、NativeWindow、NativeBuffer或Uri,获得滤镜处理效果。 针对ImageEffect,常见的开发场景如下: 通过ImageEffect提供的N…

iOS 18 Beta 7测试版本体验,无新功能,修复已知bug

近日苹果公司发布了iOS 18 beta7版本,版本号22A5346a。那iOS 18beta7版本是否比其他的测试版要更好用呢?以下测试结果仅供果粉参考,一机一况,以个人实际体验为准。 一、日常使用体验 1、App响应非常快,动画过渡时间稍…

【高等代数笔记】线性方程组的解法(三、四、五)

1. 线性方程组的解法 由于这个视频课的分p十分抽象,我还是把一节完整的课学完再发表笔记吧,要不然太零碎了。 接上一篇文章 阶梯形方程组为 { x 1 − x 2 2 x 3 − 1 0 0 \left\{\begin{array}{l} x_{1}-x_{2}2 \\ x_{3}-1 \\ 00 \end{array}\righ…

dll错误修复工具:一键解决系统DLL错误产生的程序问题(新手入门)

dll错误修复工具,主要解决导致Windows系统上程序出错的各种dll相关问题。金舟DirectXDLL一键修复提供了全面的且快速的扫描功能,能够检测出导致程序故障的任何dll错误,并且一键进行修复。 一、什么是dll文件 dll是系统的动态链接库文件&…

6年赚了300亿孙悟空才是真财神!带火文旅、引发装机热潮、搅动A股....这波热度你蹭到了吗?

《黑神话:悟空》上线后一博主连续32小时直播,观看人数超3000万,涨粉近46万!该主播个人收益或高达85万元!游戏里的36个取景地中,山西独占27个。8月20日,小西天景区出售门票比去年同期增长300%。 …

前端面试题-vue框架

1. 聊聊为什么会出现 React、vue 这样的框架,他们的出现解决了什么问题 用户界面越来越复杂,框架采用声明式的写法,将界面的构建和数据的管理分离出来,大大提升开发效率和维护效率。 (1)原生JS实现不太方…

如何在Visio中画精准的圆弧,角度标记,弧度标记(已解决)

1、导入 “绘图工具形状” 打开 Visio--》 然后: 点击 绘制工具形状 之后, 在界面会出现 绘制工具形状的选项 如下 本人 使用圆弧 ,弧线功能,然后两头增加箭头,实现角度标注,如下

【Qt开发】建立自己的Qt基本类、函数库封装 包括图表、多线程、串口等

【Qt开发】建立自己的Qt基本类、函数库 包括图表、多线程、串口等 文章目录 前言QtCharts绘图继承QObject的QThread多线程QSerialPort串口配置、发送、接收回调函数附录:C语言到C的入门知识点(主要适用于C语言精通到Qt的C开发入门)C语言与C的…

2024年企业记账最主流的8大财务软件大对比

企业记账的8大主流财务软件:1.合思;2.用友好会计财务软件;3.浪潮云会计;4.金蝶精斗云财务软件;5.Zoho Books;6.管家婆;7.QuickBooks;8.云账房。 对小企业主来说,采用高效…

Linux | 探究C语言文件接口与Linux系统文件接口的区别与联系 | fopen和open的区别与联系

什么是尘土?从大地之肺发出的一声叹息。 - 《阿多尼斯诗集》(阿多尼斯) 2024.8.23 目录 1、C语言IO接口 示例代码:使用 fopen 和 fclose 读写文件 示例1:通过write写文件 示例2:通过read写文件 C语言的标准流:std…

集合及数据结构第十节(上)————优先级队列,堆的创建、插入、删除与用堆模拟实现优先级队列

系列文章目录 集合及数据结构第十节(上)————优先级队列,堆的创建、插入、删除与用堆模拟实现优先级队列 优先级队列,堆的创建、插入、删除与用堆模拟实现优先级队列 优先级队列的概念堆的概念堆的存储方式堆的创建变量的作…

谷粒商城实战笔记-250-商城业务-消息队列-RabbitMQ安装-Docker

一,docker安装RabbitMq RabbitMQ 是一个开源的消息代理软件,广泛用于实现异步通信和应用程序解耦。 使用 Docker 容器化技术可以简化 RabbitMQ 的安装和部署过程。 以下是使用 Docker 安装 RabbitMQ 的详细步骤。 步骤 1: 安装 Docker 如果您的系统…

Linux 软件编程 网络 tcp

1.TCP粘包问题: TCP发送数据是连续的,两次发送的数据可能粘连成一包被接收到 1.解决粘包问题方法: 1.接收指定长度:(不稳定) 发送5个字节 接收5个字节 2.睡眠&#x…

【数据库】Mysql 批量变更所有字段类型为varchar的字符集

生成变更语句 SELECT CONCAT(ALTER TABLE , TABLE_NAME, MODIFY , COLUMN_NAME, , COLUMN_TYPE, , CHARACTER SET utf8 COLLATE utf8_general_ci , CASE WHEN IS_NULLABLE YES THEN NULL DEFAULT NULL WHEN IS_NULLABLE NO AND ISNULL(COLUMN_DEFAULT) THEN NOT NULL EL…

Adobe Illustrator矢量绘图软件win/mac软件下载安装

一、软件概述 1.1 Adobe Illustrator简介 Adobe Illustrator是一款由Adobe Systems开发的强大矢量绘图软件,专为设计师、艺术家及图形专家设计。它广泛应用于平面设计、插画、UI设计、图标设计、排版及数字媒体制作等领域。Illustrator以其独特的矢量图形处理能力…

Datawhale X 魔搭 AI夏令营第四期 | AIGC文生图——进阶上分 实战优化 Task3笔记

Hi,大家好,我是半亩花海。在上一个任务中,我们逐行精读baseline,掌握了利用AI工具提升学习效率,并制作了话剧连环画,初步了解Secpter WebUI。今天,我们将深入探讨微调的基本原理及其参数&#x…

海外版多语言互助盘三三复制超级人脉系统

此套源码是全新二开的超级人脉系统,面向海外操作新增多语言,后台可新增其他语言.

【图机器学习系列】(二)从传统机器学习角度理解图(一)

微信公众号:leetcode_algos_life,代码随想随记 小红书:412408155 CSDN:https://blog.csdn.net/woai8339?typeblog ,代码随想随记 GitHub: https://github.com/riverind 抖音【暂未开始,计划开始】&#xf…

java 中的设计模式

文章目录 一、前言二、设计模式的分类三、设计模式的原则1、开闭原则(Open Close Principle)2、里氏代换原则(Liskov Substitution Principle)3、依赖倒转原则(Dependence Inversion Principle)4、接口隔离…