Driver#
- class xesn.Driver(config, output_directory=None)#
This is intended to automate
ESNandLazyESNusage. The main methods to use are:run_training(): train readout weightsrun_macro_training(): use the surrogate modeling toolbox to perform Bayesian optimization and learn macro-scale network parametersrun_test(): test a trained network on a number of random samples from a test dataset
Please see this page of the documentation for examples of all of these, and an example configuration file. The experiments are configured with the parameter dict
config. This can be created either by specifying the path to a yaml file or by explicitly passing the dict itself, seeset_config().- Parameters:
config (str or dict) – either a path to a yaml file or dict containing experiment parameters
output_directory (str, optional) – directory to save results and write logs to
Methods
Driver.load(fname)An extension of
yaml.safe_load()that recognizes 1e9 as float not string (i.e., don't require the 1.0 or the sign +9).Driver.overwrite_config(new_config)Overwrite specific parameters with the values in the nested dict new_config.
Driver.print_log(*args, **kwargs)Print to log file as specified in
lognamePerform Bayesian optimization on macro-scale ESN parameters using surrogate modeling toolbox.
Make test predictions using a pre-trained ESN.
Perform
ESNorLazyESNtraining, learn the readout matrix weights.Driver.set_config(config)Read the nested parameter dictionary or take it directly, and write a copy for reference in the
output_directory.Attributes
Driver.configDriver.output_directoryDriver.walltimeDriver.localtimeDriver.esn_nameDriver.ESNDriver.logfileDriver.lognameDriver.logger