Upgrade to Pro — share decks privately, control downloads, hide ads and more …

scikit-learnとTFによる実践機械学習7 / Hands-On Machine Learning with Scikit-Learn and TensorFlow 7

scikit-learnとTFによる実践機械学習7 / Hands-On Machine Learning with Scikit-Learn and TensorFlow 7

2018年7月13日
「scikit-learnとTensorFlowによる実践機械学習輪読会#7」にて発表
https://data-refinement.connpass.com/event/91067/

Linus_MK

July 13, 2018
Tweet

More Decks by Linus_MK

Other Decks in Programming

Transcript

  1. Extra-Tree (Extremely Randomized Tree) Extremely Randomized Treeでは、乱数は分割が計算され る方法に関してさらに一歩進んでいます。ランダムフォ レストの場合と同様に、特徴量のランダムなサブセット が使用されますが、最も識別可能なしきい値を探す代わ

    りに、特徴量ごとにランダムにしきい値が描画され、こ れらのランダムに生成されたしきい値のうち最良のもの が分割ルールとして選択されます。 http://scikit-learn.org/stable/modules/ensemble.html を翻訳 12
  2. 勾配ブースティング 新予測器を、前の予測器の残差に適合させる 20 from sklearn.tree import DecisionTreeRegressor tree_reg1 = DecisionTreeRegressor(max_depth=2,

    random_state=42) tree_reg1.fit(X, y) 1つめの予測器を訓練 y2 = y - tree_reg1.predict(X) 残差 tree_reg2 = DecisionTreeRegressor(max_depth=2, random_state=42) tree_reg2.fit(X, y2) 2つめの予測器を訓練 残差を使う y3 = y2 - tree_reg2.predict(X) 残差