Verbose#

Verbose objects are capable of logging important events to any PSR-3 compatible logger such as Monolog, Analog, or the included Screen Logger. Logging is especially useful for monitoring the progress of the underlying learning algorithm in real-time.

Set the Logger#

To set the logger pass in any PSR-3 compatible logger instance:

public setLogger(LoggerInterface $logger) : void

Return the Logger#

Return the logger or null if not set:

public logger() : ?LoggerInterface

Example

use Rubix\ML\Regressors\Adaline;
use Rubix\ML\Other\Loggers\Screen;

$estimator = new Adaline();

$estimator->setLogger(new Screen('example'));

$logger = $estimator->logger();