-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_score_learn.py
More file actions
32 lines (21 loc) · 899 Bytes
/
run_score_learn.py
File metadata and controls
32 lines (21 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Project in probabilistic models
# Aaro Salosensaari
# runner for score learner
import numpy as np
import scipy.special
import warnings
np.random.seed(42)
np.seterr(all='warn')
curdir = '..'
from score_structure_learn import run_bic_climber
if __name__ == "__main__":
for outletter in "ABCDEFGH":
outname = "bic_dnp_2500_{0}".format(outletter)
A_best, s_best, s_history, A_init, bic_valid_init, bic_valid, ll_valid_init, ll_valid = run_bic_climber(outname)
print('best train score', s_best)
print('valid bic scores: init, best', bic_valid_init, bic_valid)
print('valid ll scores: init, best', ll_valid_init, ll_valid)
np.savez(curdir+'/testoutput-2017-04-12b/testrun{0}'.format(outname), A_best=A_best, s_history=s_history, A_init=A_init, bic_valid=bic_valid, ll_valid=ll_valid)
pass