[mlpack] how to get the log information in one's own program

Ryan Curtin ryan at ratml.org
Wed Apr 29 10:46:56 EDT 2015


On Tue, Apr 28, 2015 at 04:33:36PM -0500, Chao Wang wrote:
> Hi Ryan,
> 
> Thank you very much for your reply. Sorry that I should have elaborated
> more. What I wanted to do is in the following scenario.
> 
> I have a cpp program in which I need to call LARS. I want to get more
> verbose output when the function lars.Regress is called during the call. I
> am wondering if it is possible.
> 
> I just take a glimpse into the lars.cpp. It seems that in the lars.cpp,
> there are only Log::Warn, but not things like Log::Info. So I guess it is
> not designed to be able to output more info, is it?

Hi Chao,

You're correct; there is not any more information sent to Log::Info in
the LARS class.  If you think it would be useful to output per-iteration
information or something like this, please feel free to submit a pull
request on Github.

In your code, if you want to enable the output of the Log::Info object
without parsing the command-line parameters, you can simply type

  Log::Info.ignoreInput = false;

and then anything sent to Log::Info after that call will be printed.

I'll add this information to the "mlpack Input and Output" tutorial...

Thanks,

Ryan

-- 
Ryan Curtin    | "Then they attacked a town.  A small town, but a town
ryan at ratml.org | nonetheless.  A town of people.  People who died."



More information about the mlpack mailing list