blue storm wrote:
On 1/16/09, Hugo Ferreira <h...@inescporto.pt> wrote:
I have implemented a simple Prolog like inference engine
to be used in machine learning algorithms (ILP). My first
basic test shows that inference is dismally slow (compared
to a Prolog compiler). Consequently I am looking for
information on optimizing the code.

Before trying low-level optimizations, i suggest you check carefully
your implementation. It's a bit strange that your performance is so
bad, and i suspect there could be improvement of algorithmic nature.


Don't think it is algorithmic. The test specifically targets the
discriminant tree I developed according to the descriptions found
in various articles.

Note that the Prolog implementation tested also requires some time to
solve the problem. Now, I don't expect to have the same performance
as an optimized inference engine but... its so much slower.


There have been successful translations of Prolog to OCaml before :
http://groups.google.com/group/comp.lang.prolog/msg/28c4361bb5f865b8?pli=1
, wich is quite different as it uses the ocaml compiler itself to get
good performances.


Yes I know of this. However the need to some additional stuff (forward
clause subsumption testing, coverage counting, clause ranking, etc.)
that are specific to the learning algorithm has prompted me to develop
this code.

Regards,
Hugo F.


_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to