This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bayes_opt import BayesianOptimization | |
from sklearn.cross_validation import KFold | |
import xgboost as xgb | |
import numpy | |
def xgbCv(train, features, numRounds, eta, gamma, maxDepth, minChildWeight, subsample, colSample): | |
# prepare xgb parameters | |
params = { | |
"objective": "binary:logistic", | |
"booster" : "gbtree", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd; | |
import numpy as np; | |
import lightgbm as lgb | |
from bayes_opt import BayesianOptimization | |
from sklearn.model_selection import cross_val_score | |
def lgb_evaluate( | |
numLeaves, | |
maxDepth, | |
scaleWeight, |