code: def fit_cmd(argv=sys.argv[1:]):  # pragma: no cover
      
      arguments = docopt(fit_cmd.__doc__, argv=argv)
      no_save = arguments['--no-save']
      no_activate = arguments['--no-activate']
      save_if_better_than = arguments['--save-if-better-than']
      evaluate = arguments['--evaluate'] or bool(save_if_better_than)
      if save_if_better_than is not None:
          save_if_better_than = float(save_if_better_than)
      initialize_config(__mode__='fit')
      fit(
          persist=not no_save,
          activate=not no_activate,
          evaluate=evaluate,
          persist_if_better_than=save_if_better_than,
          )
docs: \
  Fit a model and save to database.
  
  Will use 'dataset_loader_train', 'model', and 'model_perister' from
  the configuration file, to load a dataset to train a model with, and
  persist it.
  
  Usage:
    pld-fit [options]
  
  Options:
    -n --no-save              Don't persist the fitted model to disk.
  
    --no-activate             Don't activate the fitted model.
  
    --save-if-better-than=<k> Persist only if test score better than given
                              value.
  
    -e --evaluate             Evaluate fitted model on train and test set and
                              print out results.
  
    -h --help                 Show this screen.