Datawhale 零基础入门数据挖掘-Task4建模与调参

建模与调参

赛题:零基础入门数据挖掘 - 二手车交易价格预测
地址:
https://tianchi.aliyun.com/competition/entrance/231784/introduction?spm=5176.12281957.1004.1.38b02448ausjSX

基于XGBoost与LightGBM的模型融合

在kaggle比赛中,XGBoost和LightGBM是两大利器,所以我只针对这两个模型进行建模与调参

基于LightGBM的模型的调参

from sklearn.model_selection import GridSearchCV
parameters = {'objective': objective , 'num_leaves': num_leaves, 'max_depth': max_depth}
model = LGBMRegressor()
clf = GridSearchCV(model, parameters, cv=5)
clf = clf.fit(train_X, train_y)
clf.best_params_

基于XGBoost模型的调参

import xgboost as xgb
parameters = {'objective': objective , 'num_leaves': num_leaves, 'max_depth': max_depth}
model = xgbr()
clf = GridSearchCV(model, parameters, cv=5)
clf = clf.fit(train_X, train_y)
clf.best_params_

模型融合loading

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值