@@ -0,0 +1,957 @@
+import click%0A%0Afrom . import api, util%0A%0A%0A@click.command()%0A@click.argument(%22fin%22, type=click.Path(exists=True), metavar='%3Cpath to input file%3E')%0A@click.argument(%22fout%22, type=click.Path(), metavar='%3Cpath to output file%3E')%0A@click.argument(%22n_factors%22, type=click.INT, metavar='%3Cnumber of factors%3E')%0A@click.option(%22--max_iter%22, type=click.INT, default=20, help=%22Maximum number of iterations%22)%0A@click.option(%22--min_iter%22, type=click.INT, default=5, help=%22Minimum number of iterations%22)%0Adef cli(fin, fout, n_factors, max_iter, min_iter):%0A    %22%22%22variational Latent Gaussian Process (vLGP)%22%22%22%0A    click.echo(%22Loading %7B%7D%22.format(fin))%0A    trials = util.load(fin)%0A    click.secho(%22%7B%7D loaded%22.format(fin), fg=%22green%22)%0A%0A    result = api.fit(trials, n_factors, max_iter=max_iter, min_iter=min_iter, path=fout)%0A%0A    click.echo(%22Saving %7B%7D%22.format(fout))%0A    util.save(result, fout)%0A    click.secho(%22%7B%7D saved%22.format(fout), fg=%22green%22)%0A%0A%0Aif __name__ == %22__main__%22:%0A    cli()%0A

Add CLI