build_nonlinear_model_bagging

Command-line usage

usage: cell build_nonlinear_model_bagging [-h] [-ccalc-filepath ccalc.pickle]
                                          [-xp-filepath xp.npz]
                                          [-mof model.pickle] [-rm None]
                                          [-sm None] [-thr None] [-nt None]
                                          [-weights-filepath None] [-std]
                                          [-ts None] [-rs 42] [-sh] [-bm None]
                                          property_name
                                          [selection_must_include]

positional arguments:
  property_name         Property to be modelled. Must be present in the
                        StructuresSet object.
  selection_must_include
                        [None]

options:
  -h, --help            show this help message and exit
  -ccalc-filepath ccalc.pickle
                        Path to the pickle file of a serialized
                        CorrelationsCalculator object.
  -xp-filepath xp.npz   Path to the npz file of a serialized correlation
                        matrix (from compute_comat).
  -mof, --model-filepath model.pickle
                        Path to serialize the created Model object.
  -rm, --regression-model None
                        Dictionary of estimator options.
  -sm, --selection-model None
                        Dictionary of estimator options for feature selection
                        model (e.g. LASSO).
  -thr, --selection-threshold None
                        Threshold to interactions.
  -nt, --nonlinear-transformation None
                        Dictionary of nonlinear transformation settings.
  -weights-filepath None
                        Sample weights for fitting and evaluating the weighted
                        MSE.
  -std, --standardize   Standardize the input data.
  -ts, --test-size None
                        Fraction of samples to reserve as a hold-out test set.
                        If not provided or <= 0, no split is performed.
  -rs, --random-state 42
                        Random seed used for the optional train/test split
                        and, if enabled, for bagging.
  -sh, --shuffle        Shuffle samples before the optional train/test split.
  -bm, --bagging-model None
                        Dictionary of bagging ensemble options. If provided,
                        wraps the whole base pipeline in a bagging regressor.

Arguments and behavior

clusterx.cli.build_nonlinear_model_bagging.build_nonlinear_model_bagging(property_name, ccalc_filepath='ccalc.pickle', xp_filepath='xp.npz', model_filepath='model.pickle', regression_model=None, selection_model=None, selection_threshold=None, selection_must_include=None, nonlinear_transformation=None, weights_filepath=None, standardize=False, test_size=None, random_state=42, shuffle=False, bagging_model=None)

Build and serialize a nonlinear cluster expansion (CE) model.

Optionally: - split data into train/test at the beginning - wrap the whole pipeline in a bagging ensemble

The hold-out test set, if requested, is never used during fitting.