class STANOptions(OptionReader): init_only = get_opt('--init') compile_only = get_opt('--compile') joint = get_opt('--joint') variant = get_opt('--var') chains = get_opt('--chains', int) iters = get_opt('--iters', int) warmup = get_opt('--warmup', int) input = get_opt('--input') model = get_opt('MODEL') data = get_opt('DATA') @property def basename(self): v = self.variant if v: return f'{self.model}-{v}' else: return self.model
class TrainOptions(OptionReader): data = get_opt('DATA') algo = get_opt('ALGO') drop_ratings = get_opt('--drop-ratings') default = get_opt('--default') name = get_opt('--name') train_data = get_opt('--train-data') @property def algo_fn(self): afn = self.name if not afn: afn = dt.afname(self.algo) return afn
class EvalOptions(OptionReader): data = get_opt('<dataset>') algo = get_opt('<algorithm>') drop_ratings = get_opt('--drop-ratings') name = get_opt('--name') n = get_opt('-n', int) time = get_opt('--time') default = get_opt('--default') tuning = get_opt('--tuning-data') pretrained = get_opt('--pretrained') rerank = get_opt('--rerank') output_format = get_opt('--output-format') @property def algo_fn(self): afn = self.name if not afn: afn = dt.afname(self.algo) return afn
class SplitOptions(OptionReader): data = get_opt('DATASET') test_users = get_opt('--test-users', int) min_ratings = get_opt('--min-ratings', int) subdir = get_opt('--subdir')
class SampleOptions(OptionReader): data = get_opt('DATASET') sample_size = get_opt('-n', int) min_ratings = get_opt('--min', int)
class InspectOpts(OptionReader): verbose = get_opt('--verbose') path = get_opt('FILE', Path)