作業日誌2018-09-26
作業日誌2018-09-26
【やったこと】
- CourseraのHow to Win a Data Science CompetitionのWeek2、EDAの実践〜Validationまで終了。
【わかったこと / 進捗があったこと】
- index * feature statistic (feature1 *feature1.mean()など)の散布図はなるほど便利。
- plt.plot(x, ‘.’)
- train.nunique(axis=1) == 1のカラムは削除したほうが良い。役に立たないのにモデル作成時にメモリを食うため。
- df.drop_duplicates()で値が丸々被っている行も消しておこう。
- targetの平均と、訓練データのindex順にとった移動平均のグラフを描くことで、訓練データに偏りが無いかどうか確認できる。
- EDAのチェックポイント
- Get domain knowledge.
- Check if the data is intuitive.
- Understand how the data was generated.
- Explore individual features.
- Explore pairs and groups.
- Clean features up.
- Check for leaks!
- 「print 'Train shape', train.shape」の形は出力に便利。
- Numeraiという毎週データが変わるタイプのコンペがあるらしい。
- sorted correlation heatmapで要素のグループ化が捗る。
【考えたこと】
- NULL値の出力:train.isnull().sum(axis=1).head(15)
- pd.info()の方が好きだなあ。