MCPcopy Create free account
hub / github.com/MarcCoru/locationencoder / fit_models

Function fit_models

experiments/exp_longitudinal_accuracy.py:22–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21
22def fit_models():
23 for pe in ["grid", "spherecplus", "sphericalharmonics"]:
24 for nn in ["fcnet", "siren"]:
25 for seed in np.arange(5):
26 args = Namespace(dataset='checkerboard',
27 pe=pe,
28 nn=nn,
29 save_model=False,
30 log_wandb=False,
31 hparams='hparams.yaml',
32 results_dir='results/train',
33 expname=f'exp_longitudinal/{seed}',
34 legendre_polys=None, # take from hparams file
35 seed=seed,
36 harmonics_calculation="analytic",
37 resume_ckpt_from_results_dir=False,
38 matplotlib=True,
39 matplotlib_show=False,
40 checkerboard_scale=1,
41 use_expnamehps=False,
42 max_epochs=None,
43 accelerator="cpu",
44 gpus=-1,
45 min_radius=None)
46
47 fit(args)
48 return args
49
50def extract_df_to_csv(resultsdir):
51 seeds = [s for s in os.listdir(resultsdir) if os.path.isdir(os.path.join(resultsdir, s))]

Callers 1

mainFunction · 0.70

Calls 1

fitFunction · 0.90

Tested by

no test coverage detected