プリンキピア

第2章準備

2.2.5. Exercises2.2.5 練習問題

  1. Try loading datasets, e.g., Abalone from the UCI Machine Learning Repository and inspect their properties. What fraction of them has missing values? What fraction of the variables is numerical, categorical, or text?
    英語のヒント
    データセットを読み込んでみよ。たとえばUCI機械学習リポジトリのAbaloneで、その性質を調べよ。そのうちどれだけの割合に欠損値があるか。変数のうちどれだけの割合が数値、カテゴリー、文字列か。
  2. Try indexing and selecting data columns by name rather than by column number. The pandas documentation on indexing has further details on how to do this.
    英語のヒント
    列番号ではなく名前で、データの列のインデックス指定と選択を試してみよ。これをどうするかの詳細は、pandasのインデックス指定についての文書にある。
  3. How large a dataset do you think you could load this way? What might be the limitations? Hint: consider the time to read the data, representation, processing, and memory footprint. Try this out on your laptop. What happens if you try it out on a server?
    英語のヒント
    この方法で、どれくらい大きなデータセットを読み込めると思うか。どんな制約がありうるか。ヒント:データを読む時間、表現、処理、メモリの使用量を考えよ。自分のノートパソコンで試してみよ。サーバーで試すとどうなるか。
  4. How would you deal with data that has a very large number of categories? What if the category labels are all unique? Should you include the latter?
    英語のヒント
    カテゴリーの数が非常に多いデータはどう扱えばよいか。カテゴリーのラベルがすべて異なっていたらどうか。後者は含めるべきか。
  5. What alternatives to pandas can you think of? How about loading NumPy tensors from a file? Check out Pillow, the Python Imaging Library.
    英語のヒント
    pandasの代わりに何が考えられるか。ファイルからNumPyのテンソルを読み込むのはどうか。Pythonの画像ライブラリであるPillowも調べてみよ。