DEV Community

Himanshu Vishwas
Himanshu Vishwas

Posted on

Verbose in Machine Learning

Verbose

A flag in programming that controls the level of output generated during the execution of a program. It determines how much information is displayed to the user, ranging from no output (silent mode) to detailed logs that include progress updates, metrics, and additional diagnostic information.

Usage:

  • Verbose=0: No output is generated.
  • Verbose=1: Basic output is shown, typically including progress indicators.
  • Verbose=2: Detailed output is provided, including comprehensive metrics and additional logging.

Images

Verbose:0
Verbose 0

Verbose:1
Verbose 1

Verbose:2

Verbose 2

Table: Default Verbosity Levels in Machine Learning Frameworks

Framework Default Verbosity Description
Keras/TensorFlow verbose=1 Basic output with a progress bar.
Scikit-Learn Typically verbose=0 No verbosity set by default; varies by estimator. Most estimators default to 0.
XGBoost verbosity=1 Displays warnings and progress information.
LightGBM verbosity=1 Provides progress information during training.
PyTorch No direct verbose flag Logging can be controlled using different logging libraries.

When to use:

  • Use verbose=0 for silent operations, batch processing, or production runs.
  • Use verbose=1 for general training when you want basic updates.
  • Use verbose=2 when you need to closely monitor every detail or are debugging the model.

Top comments (0)