留学 7,8,9,10 日目
日常生活
- もう 10 日経った。
- 研究室への入出が普通の鍵で一本しかなく必要な時は警備の人に声をかけなければならない。会津大学は学生証がカードキーになっていて自由に開け閉めできるのでかなり面倒くさい。
- ペドロという名前の人がとても多く日本でいう佐藤とかのような存在のよう。これまで知りあった人の内二人の学生と二人の教授がペドロさんだった (さらに自分が宿泊しているところの道路の名前にもペドロが含まれている。)
- 指導してくれている教授とその息子さんと動物園のようなところに行った。私が一番楽しんでいた。http://www.parquebiologicodevinhais.com/
- Big Data Summer School http://www.ecmlpkdd2015.org/summer-school/about が始まった。
英語
- ンァー!
- 英語の論文を読んで日本語で自分の言葉でまとめ,それを英語で説明するために英語でまとめなおすというのがすごくつらい。
- 質問を何度も繰り返させてしまうのも本当につらい。
研究
- 処理系は Yap Prolog を使う。SWI Prolog でもいいみたいだが Yap の方を指定された。
Induction Logic Prolgram (ILP) とは?
- Induction concept learning のひとつで記述する言語に Logic Programming を利用しているもの。
- ある背景知識 (複数の患者のデータ) を元にある事実の例 (この人はガン・この人はそうではない) を満すような,その判別の判断基準となる性質 (例えば年齢が何歳以上・体重がいくつ以上・ある症状があるかないかなど) の仮説を導き出す。
- その仮説の導出には様々な手法がある。http://www.doc.ic.ac.uk/~shm/ilp.html
今回の研究で ILP には Aleph (A Learning Engine for Proposing Hypotheses) というものを使う。
Aleph の流れ
- 事実の例の中からひとつ選択する。
- その例を満たす具体的な (多くの body からなる) 節を作る。"bottom clause" と呼ばれる。またこのステップ自体を "saturation" と呼ぶ。
- Bottom clause よりも一般的な節を探す。これは bottom clause のリテラルのサブセットとなり、最もうまく事実の例に合致するものが選択される。このステップは "reduction" と呼ばれる。
- 冗長性を取り除く。最も良いものは current theory に加えられ、他の例は取り除かれる。このステップは cover removal と呼ばれる。
実行例
YAP 6.3.3 (i386-darwin14.4.0): 2015年 8月31日 月曜日 17時31分41秒 WEST ?- % consulting /Users/iyahoo/Dropbox/Program/prolog/Aleph/aleph.pl... A L E P H Version 5 Last modified: Sun Mar 11 03:25:37 UTC 2007 Manual: http://www.comlab.ox.ac.uk/oucl/groups/machlearn/Aleph/index.html % consulted /Users/iyahoo/Dropbox/Program/prolog/Aleph/aleph.pl in module user, 49 msec 0 bytes yes ?- read_all(family2). % reconsulting /Users/iyahoo/Dropbox/Program/prolog/Aleph/family2.b... % reconsulted /Users/iyahoo/Dropbox/Program/prolog/Aleph/family2.b in module user, 1 msec 0 bytes [consulting pos examples] [family2.f] [consulting neg examples] [family2.n] yes ?- induce. [select example] [1] [sat] [1] [grandparent(bob,laura)] [bottom clause] grandparent(A,B) :- father(A,C), mother(A,D), mother(D,B). [literals] [4] [saturation time] [0.0] [reduce] [best label so far] [[1,0,2,1]/0] grandparent(A,B). [4/5] grandparent(A,B) :- father(A,C). [4/2] grandparent(A,B) :- mother(A,C). [4/2] grandparent(A,B) :- father(A,C), mother(A,D). [4/2] grandparent(A,B) :- mother(A,C), mother(C,B). [2/0] [-------------------------------------] [found clause] grandparent(A,B) :- mother(A,C), mother(C,B). [pos cover = 2 neg cover = 0] [pos-neg] [2] [clause label] [[2,0,3,2]] [clauses constructed] [5] [-------------------------------------] grandparent(A,B) :- father(A,C), mother(A,D), mother(D,B). [clauses constructed] [6] [search time] [0.0020000000000000018] [best clause] grandparent(A,B) :- mother(A,C), mother(C,B). [pos cover = 2 neg cover = 0] [pos-neg] [2] [atoms left] [2] [positive examples left] [2] [estimated time to finish (secs)] [0.0020000000000000018] [select example] [2] [sat] [2] [grandparent(bob,ken)] [bottom clause] grandparent(A,B) :- father(A,C), mother(A,D), father(D,B). [literals] [4] [saturation time] [0.0] [reduce] [best label so far] [[1,0,2,1]/0] grandparent(A,B). [2/5] grandparent(A,B) :- father(A,C). [2/2] grandparent(A,B) :- mother(A,C). [2/2] grandparent(A,B) :- father(A,C), mother(A,D). [2/2] grandparent(A,B) :- mother(A,C), father(C,B). [2/0] [-------------------------------------] [found clause] grandparent(A,B) :- mother(A,C), father(C,B). [pos cover = 2 neg cover = 0] [pos-neg] [2] [clause label] [[2,0,3,2]] [clauses constructed] [5] [-------------------------------------] [clauses constructed] [5] [search time] [0.000999999999999987] [best clause] grandparent(A,B) :- mother(A,C), father(C,B). [pos cover = 2 neg cover = 0] [pos-neg] [2] [atoms left] [0] [positive examples left] [0] [estimated time to finish (secs)] [0.0] [theory] [Rule 1] [Pos cover = 2 Neg cover = 0] grandparent(A,B) :- mother(A,C), mother(C,B). [Rule 2] [Pos cover = 2 Neg cover = 0] grandparent(A,B) :- mother(A,C), father(C,B). [Training set performance] Actual + - + 4 0 4 Pred - 0 5 5 4 5 9 Accuracy = 1.0 [Training set summary] [[4,0,0,5]] [time taken] [0.00399999999999999] [total clauses constructed] [11] yes