def xgb_score(param)
    #run XGBoost with parameters'param'
    
def xgb_hyperopt();
 space = {
  'eta' : 0.01,
  'max_depth' :        hp.quniform('max_depth', 10, 30, 1),
  'min_child_weight' : hp.quniform('min_child_weight', 0, 100, 1),
  'subsample' :        hp.quniform('subsample', 0.1, 1.0, 0.1),
  'gamma' :            hp.quniform('gamma', 0.0, 30, 0.5),
  'colsample_bytree' : hp.quniform('colsample_bytree', 0.1, 1.0, 0.1),
  'objective' : 'reg:linear',
  'nthread' : 28,
  'silent' : 1,
  'num_round' : 2500,
  'seed' : 2441,
  'early_stopping_rpund' : 100
        }
        
best = fmin(xgb_score, space, algo=tpe.suggest, max_evals=1000)
第一種根本不足, 第三種又太過, 下列是找出適中的作法
步驟一, 分成紅跟綠兩組 (顏色是舉例)
步驟二, 紅隊參數是牽制住 model 的參數, 綠隊參數則相反
步驟三, 確認紅隊參數的數值改變會讓 overfitting 朝向underfitting
步驟四, 確認綠隊參數的數值改變會讓 underfitting 朝向 overfitting
[後記]
狄米崔又出現了, 英文變得流利多了, 而且短髮狄米崔蠻有精神的, 我也要打起精神在12點前送出今日發文.