ocssw
V2022
|
parameters.py
Go to the documentation of this file.
12 parser.add_argument("filename", nargs ="?", help="CSV file containing Rrs values to estimate from")
14 # parser.add_argument("--data_loc", default="/media/brandon/NASA/Data/Insitu", help="Location of in situ data")
15 # parser.add_argument("--sim_loc", default="/media/brandon/NASA/Data/Simulated", help="Location of simulated data")
18 parser.add_argument("--n_redraws", default=50, type=int, help="Number of plot redraws during training (i.e. updates plot every n_iter / n_redraws iterations); only used with --plot_loss.")
19 parser.add_argument("--n_rounds", default=10, type=int, help="Number of models to fit, with median output as the final estimate")
23 parser.add_argument("--threshold", default=None, type=float, help="Output the maximum prior estimate when the prior is above this threshold, and the weighted average estimate otherwise. Set to None, thresholding is not used")
24 parser.add_argument("--avg_est", action ="store_true", help="Use the prior probability weighted mean as the estimate; otherwise, use maximum prior")
25 parser.add_argument("--no_save", action ="store_true", help="Do not save the model after training")
26 parser.add_argument("--no_load", action ="store_true", help="Do load a saved model (and overwrite, if not no_save)")
29 parser.add_argument("--plot_loss", action ="store_true", help="Plot the model loss while training")
30 parser.add_argument("--darktheme", action ="store_true", help="Use a dark color scheme in plots")
31 parser.add_argument("--animate", action ="store_true", help="Store the training progress as an animation (mp4)")
32 parser.add_argument("--save_data", action ="store_true", help="Save the data used for the given args")
33 parser.add_argument("--save_stats",action ="store_true", help="Store partial training statistics & estimates for later analysis")
38 update = parser.add_argument_group('Model Parameters', 'Parameters which require a new model to be trained if they are changed')
39 update.add_argument("--sat_bands", action ="store_true", help="Use bands specific to certain products when utilizing satellite retrieved spectra")
40 update.add_argument("--benchmark", action ="store_true", help="Train only on partial dataset, and use remaining to benchmark")
42 update.add_argument("--sensor", default="OLI", help="Sensor to estimate from (See meta.py for available options)")
43 update.add_argument("--align", default=None, help="Comma-separated list of sensors to align data with; passing \"all\" uses all sensors (See meta.py for available options)")
46 update.add_argument("--subset", default='', help="Comma-separated list of datasets to use when fetching data")
50 flags = parser.add_argument_group('Model Flags', 'Flags which require a new model to be trained if they are changed')
52 # flags.add_argument("--no_noise", action ="store_true", help="Do not add noise when training the model")
53 flags.add_argument("--use_noise", action ="store_true", help="Add noise when training the model")
55 # flags.add_argument("--no_ratio", action ="store_true", help="Do not add band ratios as input features")
56 flags.add_argument("--use_ratio", action ="store_true", help="Add band ratios as input features")
61 # flags.add_argument("--no_tchlfix", action ="store_true", help="Do not correct chl for pheopigments")
66 flags.add_argument("--use_boosting", action ="store_true", help="Use boosting when training in multiple trials (no longer implemented)")
67 # flags.add_argument("--no_boosting",action ="store_true", help="Do not use boosting when training in multiple trials")
69 flags.add_argument("--no_bagging", action ="store_true", help="Do not use bagging when training in multiple trials")
70 # flags.add_argument("--use_bagging", action ="store_true", help="Use bagging when training in multiple trials")
74 flags.add_argument("--use_excl_Rrs", action ="store_true", help="Drop raw Rrs features from the input when using ratio features")
75 flags.add_argument("--use_all_ratio", action ="store_true", help="Use exhaustive list of ratio features instead of only those found in literature (should be combined with --use_kbest)")
77 flags.add_argument("--use_kbest", type=int, nargs='?', const=5, default=0, help="Select top K features to use as input, based on mutual information")
81 hypers = parser.add_argument_group('Hyperparameters', 'Hyperparameters used in training the model (also requires model retrain if changed)')
82 hypers.add_argument("--n_iter", default=10000, type=int, help="Number of iterations to train the model")
83 hypers.add_argument("--n_mix", default=5, type=int, help="Number of gaussians to fit in the mixture model")
84 hypers.add_argument("--batch", default=128, type=int, help="Number of samples in a training batch")
85 hypers.add_argument("--n_hidden", default=100, type=int, help="Number of neurons per hidden layer")
87 hypers.add_argument("--imputations", default=5, type=int, help="Number of samples used for imputation when handling NaNs in the target")
90 hypers.add_argument("--epsilon", default=1e-3, type=float, help="Variance regularization (ensures covariance has a valid decomposition)")
93 dataset = parser.add_mutually_exclusive_group()
def get_args(kwargs={}, use_cmdline=True, **kwargs2)
Definition: parameters.py:100