[mlpack] Applying GSoC project

Ryan Curtin gth671b at mail.gatech.edu
Thu Apr 11 11:40:37 EDT 2013


On Thu, Apr 11, 2013 at 11:24:45PM +0800, zhijie he wrote:
> Hi Ryan,
> 
> Thank you for your reply.
> 
> CF project is difficult for me since I don't have the domain knowledge
> about CF. So I change to the improvement of tree traversers project:)
> 
> Currently I am trying to get familiar with the source code. Could you tell
> me how to generate the profile data about the number of base case
> computations? I enabled the profile option when complied mlpack. But I only
> find how many nodes are pruned in the output when running the knn example.

Counting the number of base cases can be done one of two ways:

 - Add a variable to NeighborSearchRules (or whatever ruleset you are
   considering) which is incremented each time a base case is computed.
   Then when the traversal is complete, print that variable.

 - Compile with profiling and debugging options (so that BaseCase()
   isn't inlined) and then take a look at the output of gprof:

   gprof bin/allknn gmon.out | less

   (or something like that) and you should be able to see how many times
   BaseCase() was called.

Does this answer your question?

-- 
Ryan Curtin       | "Bye-bye, goofy woman.  I enjoyed repeatedly
ryan at igglybob.com | throwing you to the ground." - Ben Jabituya


More information about the mlpack mailing list