Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for enabling/disabling messages from learners during training. #60

Open
mdabros opened this issue Mar 2, 2018 · 1 comment

Comments

@mdabros
Copy link
Owner

mdabros commented Mar 2, 2018

Currently, some of the learners in SharpLearning will output information during the training period. This includes the early stopping with gradient boost and neural networks. It should be possible to enable and disable these messages, and preferably, also possible to choose where the messages should be outputted. For instance to Console, Trace, or alternatively a log file.

This could be made by adding an Action to receive the message. This should probably be part of a separate interface, for learners supporting this. Something like:

public interface ILogger
{
   public Action<string> Log { get; set }
}

The learners would then add the message to the log. Likewise, other algorithms like the optimizers could also implement this interface.

@ZenBoer
Copy link

ZenBoer commented Aug 3, 2018

We have a running ML solution, but I'm considering replacing the Neural Net bits with SharpLearning. This is one of the first things I will add since the progress given through to the user is important.
I would suggest added an overload to the Learn methods to take a progress Action. Inside the learning process, just check if Progress obj is not null.
Form should be Func<double,string,bool> double = percentage completed, string is some message, bool indicates if learning process should stop. e.g. timelimit of 10 minutes has been reached or user cancels operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants