Commit 04719484 authored by linfang.wang's avatar linfang.wang

加入特征工程

parent 042a76e7
......@@ -90,7 +90,7 @@ def automodelfit(clf,param_grid,dftrain,features,resp, kfold=10,scoring='roc_auc
:return:
'''
kflod=StratifiedKFold(n_splits=kfold,shuffle=True,random_state=7)
grid_search=GridSearchCV(clf,param_grid,scoring=scoring,n_jobs=-1,cv=kflod,verbose=2,iid=True,refit=True)
grid_search=GridSearchCV(clf,param_grid,scoring=scoring,n_jobs=2,cv=kflod,verbose=3,iid=True,refit=True)
#== 模型训练
grid_search.fit(dftrain[features].values,dftrain[resp].values)
#== 获取最优参数
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment