Adaboost

32 views
Skip to first unread message

Naoki Wake

unread,
Oct 11, 2012, 8:17:06 AM10/11/12
to milk-...@googlegroups.com
Hi
I am learning about boosting and testing adaboost using milk.
I referenced the following page 

and noticed that this example-code creates only one weak learner.
Adaboost uses some weak learners, so I want to know how to combine some weak learners and create a strong learner.

Luis Pedro Coelho

unread,
Oct 11, 2012, 8:55:09 AM10/11/12
to milk-...@googlegroups.com
Hi,

In milk's terminology, a learner is an object which can be called upon to
generate a classifier (what milk calls a model).

Therefore, the code will repeatedly use the learner you pass it to generate
multiple models. So, this will do what you expect.

HTH,
Luis
--
Luis Pedro Coelho | Institute for Molecular Medicine | http://luispedro.org

Naoki Wake

unread,
Oct 11, 2012, 12:39:37 PM10/11/12
to milk-...@googlegroups.com
Luis,
Thank you for reply.
 I understood that the code generate multiple models.
Then, can I set the number of models which are combined?
 
Naoki

Luis Pedro Coelho

unread,
Oct 11, 2012, 12:37:57 PM10/11/12
to milk-...@googlegroups.com
On Thursday, October 11, 2012 09:39:37 AM Naoki Wake wrote:
> Luis,
> Thank you for reply.
> I understood that the code generate multiple models.
> Then, can I set the number of models which are combined?

You can set the max_iters parameter:

learner = milk.supervised.adaboost.boost_learner(weak, max_iters=8)

This is the maximum number of weak learners, but it might be less if the
algorithm believes it is no longer making progress.

HTH

Naoki Wake

unread,
Oct 11, 2012, 1:17:55 PM10/11/12
to milk-...@googlegroups.com
Luis,
I understood how to do that, thank you for your kind reply.

Naoki
Reply all
Reply to author
Forward
0 new messages