モデル選定まで自動でやってくれるならもうこれでいいじゃん・・・
というわけでauto-sklearnなるものを使ってみようとしたら意外とはまった話
元々の環境:以下のコマンドで作ったdocker上に構築したjupyter環境
$ docker pull jupyter/tensorflow-notebook
上記環境ではデフォルトでauto-sklearnが入っていないが以下のcommandでpython環境にauto-sklearnが導入できる
$ pip install auto-sklearn
早速実行してみたが、pip installerのバージョンが古くて対応していないとのことなので、以下のコマンドを打つこと要求された
$ pip install upgrade pip
コマンドを実施してみるとpipのアップグレードに成功。
改めてauto-sklearnをインストールしようとすると別のエラーが発生
Failed building wheel for pyrfr
Running setup.py clean for pyrfr
Failed to build pyrfr
Installing collected packages: xgboost, pyrfr, smac
Running setup.py install for pyrfr ... error
Complete output from command /opt/conda/bin/python -u -c
"import setuptools, tokenize;__file__='/tmp/pip-install-
52evskv6/pyrfr/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --
record /tmp/pip-record-f6yrgnm4/install-record.txt --single-
version-externally-managed --compile:
running install
running build_ext
building 'pyrfr._regression' extension
swigging pyrfr/regression.i to pyrfr/regression_wrap.cpp
swig -python -c++ -modern -features nondynamic -I./include -o
pyrfr/regression_wrap.cpp pyrfr/regression.i
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
----------------------------------------
Command "/opt/conda/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-install-
52evskv6/pyrfr/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --
record /tmp/pip-record-f6yrgnm4/install-record.txt --single-
version-externally-managed --compile" failed with error code1 in
/tmp/pip-install-52evskv6/pyrfr/
いろいろ調べていたら以下の記事を見つけた
https://github.com/automl/auto-sklearn/issues/347
$ sudo apt-get install swig
を打った後に改めて
$ pip install auto-sklearn
を打ったら成功した
これでauto-skleranをpython上で使えるようになった