You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Grant Ingersoll <gs...@apache.org> on 2008/08/18 14:28:48 UTC
Fwd: [CONF] Apache Lucene Mahout: Watchmaker.GA.Tutorial (page created)
Deneche,
Have you contacted the Watchmaker developers? Perhaps you should
share what you have done over there. I do notice that their website
says they have distributed support. How does that compare to ours?
-Grant
Begin forwarded message:
> From: confluence@apache.org
> Date: August 17, 2008 11:02:01 AM EDT
> To: mahout-commits@lucene.apache.org
> Subject: [CONF] Apache Lucene Mahout: Watchmaker.GA.Tutorial (page
> created)
> Reply-To: mahout-dev@lucene.apache.org
>
> Watchmaker.GA.Tutorial (MAHOUT) created by abdelhakim deneche
> http://cwiki.apache.org/confluence/display/MAHOUT/Watchmaker.GA.Tutorial
>
> Content:
> ---------------------------------------------------------------------
>
> h1. How to distribute the fitness evaluation using Mahout.GA ?
>
> In any Watchmaker program, you'll have to create an instance of a
> StandaloneEvolutionEngine. For the TSP example this is done in the
> EvolutionaryTravellingSalesman class:
>
> {code:java}
> private EvolutionEngine<List<String>>
> getEngine(CandidateFactory<List<String>> candidateFactory,
> EvolutionaryOperator<List<?>> pipeline, Random rng) {
> return new
> StandaloneEvolutionEngine<List<String>>(candidateFactory, pipeline,
> new RouteEvaluator(distances), selectionStrategy, rng);
> }
> {code}
>
> The RouteEvaluator class is where the fitness of each individual is
> evaluated, if we want to distribute the evaluation over a Hadoop
> Cluster, all we have to is wrap the evaluator in a
> MahoutFitnessEvaluator, and instead of a StandaloneEvolutionEngine
> we'll use a STEvolutionEngine :
>
> {code:java}
> private EvolutionEngine<List<String>>
> getEngine(CandidateFactory<List<String>> candidateFactory,
> EvolutionaryOperator<List<?>> pipeline, Random rng) {
> MahoutFitnessEvaluator<List<String>> evaluator = new
> MahoutFitnessEvaluator<List<String>>(new RouteEvaluator(distances));
> return new STEvolutionEngine<List<String>>(candidateFactory,
> pipeline, evaluator, selectionStrategy, rng);
> }
> {code}
>
> And voila! your code is ready to run on Hadoop. The complete running
> example is available with the examples in the org/apache/mahout/ga/
> watchmaker/travellingsalesman directory
>
>
> ---------------------------------------------------------------------
> CONFLUENCE INFORMATION
> This message is automatically generated by Confluence
>
> Unsubscribe or edit your notifications preferences
> http://cwiki.apache.org/confluence/users/viewnotifications.action
>
> If you think it was sent incorrectly contact one of the administrators
> http://cwiki.apache.org/confluence/administrators.action
>
> If you want more information on Confluence, or have a bug to report
> see
> http://www.atlassian.com/software/confluence
>
>
--------------------------
Grant Ingersoll
http://www.lucidimagination.com
Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ