この本を読んでみようという勉強会にやじうま参加中。途中で挫折予定。この本はhttps://learning.oreilly.comで日本語が読めるのでありがたい
まずは1章
scikit-learnをインストールしろと書いてある。condaで入れとけばいいんじゃね?と書いてあるんだけど、自分のマシンにはcondaはなくて、でもjupyter notebookはある。うーむ・・・どういう状況か覚えてない。
とりあえず、scikit-learn.orgのインストールガイドに従ってpipで入れてみる。
> pip3 install -U scikit-learn DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 Collecting scikit-learn Downloading scikit_learn-1.0.2-cp39-cp39-macosx_10_13_x86_64.whl (8.0 MB) |████████████████████████████████| 8.0 MB 5.2 MB/s Collecting scipy>=1.1.0 Downloading scipy-1.8.0-cp39-cp39-macosx_12_0_universal2.macosx_10_9_x86_64.whl (55.6 MB) |████████████████████████████████| 55.6 MB 418 kB/s Collecting threadpoolctl>=2.0.0 Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB) Collecting numpy>=1.14.6 Downloading numpy-1.22.3-cp39-cp39-macosx_10_14_x86_64.whl (17.6 MB) |████████████████████████████████| 17.6 MB 33.2 MB/s Collecting joblib>=0.11 Downloading joblib-1.1.0-py2.py3-none-any.whl (306 kB) |████████████████████████████████| 306 kB 6.7 MB/s Installing collected packages: numpy, threadpoolctl, scipy, joblib, scikit-learn DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 Successfully installed joblib-1.1.0 numpy-1.22.3 scikit-learn-1.0.2 scipy-1.8.0 threadpoolctl-3.1.0 WARNING: You are using pip version 21.3.1; however, version 22.0.4 is available. You should consider upgrading via the '/usr/local/opt/python@3.9/bin/python3.9 -m pip install --upgrade pip' command.
なんかめっちゃDEPRECATION出てきて気になるが、いったん置いておく。
1.6節で必要なライブラリが指定されている。pandas入ってなかった(笑)。ちまちまpipで入れる。
結果、こんな感じ。
様々なものを使っていて、それぞれリンクが示されているので、ここにまとめとく
- scikit-learn: machine learning in Python — scikit-learn 1.0.2 documentation
- GitHub - amueller/introduction_to_ml_with_python: Notebooks and code for the book "Introduction to Machine Learning with Python"
- Scipy Lecture Notes — Scipy lecture notes
この後、サンプルデータで一回ししてみるところへ続いていくのだけど、今日はセットアップで力尽きた