Beispiel #1
0
args = parser.parse_args()

if args.nrows == 0:
    nrows = None
else:
    nrows = args.nrows

savedir = pjoin("/data/ml2/vishakh/sap/baselines", args.savedir)

ft = FeatureTester(outDir=savedir)

if args.raw:
    ft.load_from_hdf5_raw(dname=args.dname, cohort=args.cohort, nrows=nrows)

else:
    ft.load_from_hdf5_latent(dname=args.dname, cohort=args.cohort, nrows=nrows)

e = Experiment()
e.begin_experiment(fname=args.fname, baseDir=savedir)
ft.logistic_regression(save_lc=True)
e.log(ft.get_metadata(), ft.get_result())

ft.random_forest()
e.log(ft.get_metadata(), ft.get_result())

ft.nearest_neighbors()
e.log(ft.get_metadata(), ft.get_result())

e.end_experiment()
Beispiel #2
0
from experiment import Experiment
from feature_tester import FeatureTester

e = Experiment()
ft = FeatureTester()
e.begin_experiment(fName="benchmarks-hp",
                   note="More hyperparameters in random_forest")

ft.load_from_csv()
ft.prepare_for_testing()
ft.logistic_regression()
e.log(ft.get_metadata(), ft.get_result())
ft.random_forest()
e.log(ft.get_metadata(), ft.get_result())
ft.nearest_neighbors()
e.log(ft.get_metadata(), ft.get_result())
e.view_experiment()
e.end_experiment()