More Related Content
Similar to 誰でも簡単!機械学習ワークショップ (20)
誰でも簡単!機械学習ワークショップ
- 54. 53
(補足)予測の実施
test_features = test[["Pclass", "Age", "SibSp", "Parch"]].values
#テストデータの目的変数を設定
prediction = mytree.predict(test_features)
#トレーニングデータで作ったモデルを使ってテストデータの生存情報を予測
test_features test
Pclass Age SibSp parch
.values
値を取得
mytree
.predict()
test_features
prediction
予測を実施