Slide 1

Slide 1 text

異常検知パッケージを作ってみたお話 Netadashi Meetup #6 Jun 29, 2018

Slide 2

Slide 2 text

Yu Ohori (a.k.a. Kon) ML Researcher at NSSOL (2017-) ● semi-supervised learning ● anomaly detection PyCon JP Staff (2018-) @Y_oHr_N @Y-oHr-N 2

Slide 3

Slide 3 text

我々は通常と異なる挙動(異常)に関心がある サーバに対する不正アクセス (intrusion detection) クレジットカードの不正利用 (fraud detection) 医療誤診 (medical anomaly detection) 設備故障 (industrial damage detection) 3

Slide 4

Slide 4 text

4 異常は大きく 3 種類に分けられる Chandola, V., et al., "Anomaly detection: A survey," ACM computing surveys, 41(3), 2009. point anomaly contextual anomaly collective anomaly

Slide 5

Slide 5 text

kenchi is a scikit-learn compatible library for anomaly detection 5 https://github.com/HazureChi/kenchi

Slide 6

Slide 6 text

これからのお話 異常検知パッケージ kenchi について 開発時に利用した サービスについて 6

Slide 7

Slide 7 text

7 https://github.com/scikit-learn-contrib/project-template 利用サービス一覧 Travis CI Coveralls Read the Docs AppVeyor Code Climate Anaconda Cloud binder GitHub PyPI build push, pull request upload hook

Slide 8

Slide 8 text

GitHub ソースコードをホスティングするサービス ● Issue, Label, MileStone で進捗管理 ● Redmine? JIRA? 知らない子ですね 8

Slide 9

Slide 9 text

Travis CI Linux, macOS に対応した CI サービス push, pull request 時に hook で起動 ● テストに失敗すると通知 ● Coveralls を起動 9

Slide 10

Slide 10 text

AppVeyor Windows に対応した CI サービス push, pull request 時に hook で起動 ● テスト,ビルドに失敗すると通知 10

Slide 11

Slide 11 text

Coveralls テストカバレッジを計測するサービス(16 言語対応) ● 最近は Codecov が優勢? push, pull request 時に Travis CI から起動 11

Slide 12

Slide 12 text

Code Climate ソースコードの品質を検査するサービス(8 言語対応) ● テストカバレッジを計測可能 ● PEP8, Radon プラグインの追加を推奨 push, pull request 時に hook で起動 12

Slide 13

Slide 13 text

Read the Docs Sphinx ドキュメントをホスティングするサービス push, pull request 時に hook で起動 ● ドキュメントのビルドを実行 13

Slide 14

Slide 14 text

PyPI Python パッケージを管理するサービス $ python setup.py sdist bdist_wheel $ twine upload dist/* $ pip install 14 https://packaging.python.org/tutorials/packaging-projects/

Slide 15

Slide 15 text

Anaconda Cloud Python パッケージや環境の諸々を管理するサービス $ conda skelton pypi $ conda build $ anaconda login $ anaconda upload \ > ~/miniconda/conda-bld//kenchi--.tar.bz2 $ conda install -c 15 https://conda.io/docs/user-guide/tutorials/build-pkgs-skeleton.html

Slide 16

Slide 16 text

binder Git リポジトリから Jupyter サーバを構築するサービス https://mybinder.org/v2/gh///?filepath= ● Project Jupyter が 2016 年にリリース ● 誰でも,いつでも,どこでも,環境を再現可能 ● 内部で repo2docker を利用 16 Freeman J., and Osheroff, A., "Toward publishing reproducible computation with binder," eLife, 2016.