Pythonではじめる機械学習

4章 データの表現と特徴量エンジニアリング

ワンホットエンコーディング(ダミー変数)

f:id:bitop:20190919060421p:plain
結果
f:id:bitop:20190919060500p:plain
pandasのget_dummies関数を使ってワンホットエンコーデイングする
f:id:bitop:20190919061541p:plain
結果、カラムが7つから46に増えた
f:id:bitop:20190919063546p:plain