from algos import OptAlg from models import LPMC_DC data_folder = '../../../data/' if __name__ == "__main__": if not os.path.exists('./results'): os.makedirs('./results') print("Train LPMC_DC_L with LS-ABS and hybrid-inv") model = LPMC_DC(data_folder, file='12_13_14.csv') ioa = OptAlg(alg_type='LS-ABS', direction='hybrid-inv') res = {'time': [], 'LL': [], 'epochs': []} for i in range(20): tmp = model.optimize( ioa, **{ 'verbose': False, 'max_epochs': 1000, 'batch': 1000 }) res['time'].append(tmp['opti_time']) res['LL'].append(tmp['fun']) res['epochs'].append(tmp['nep'])
from algos import OptAlg from models import LPMC_RR data_folder = '../../../data/' if __name__ == "__main__": if not os.path.exists('./results'): os.makedirs('./results') print("Train LPMC_RR_L with TR-ABS and bfgs") model = LPMC_RR(data_folder, file='12_13_14.csv') ioa = OptAlg(alg_type='TR-ABS', direction='bfgs') res = {'time': [], 'LL': [], 'epochs': []} for i in range(20): tmp = model.optimize( ioa, **{ 'verbose': False, 'max_epochs': 1000, 'batch': 1000 }) res['time'].append(tmp['opti_time']) res['LL'].append(tmp['fun']) res['epochs'].append(tmp['nep'])
from algos import OptAlg from models import LPMC_RR data_folder = '../../../data/' if __name__ == "__main__": if not os.path.exists('./results'): os.makedirs('./results') print("Train LPMC_RR_L with LS-ABS and grad") model = LPMC_RR(data_folder, file='12_13_14.csv') ioa = OptAlg(alg_type='LS-ABS', direction='grad') res = {'time': [], 'LL': [], 'epochs': []} for i in range(20): tmp = model.optimize( ioa, **{ 'verbose': False, 'max_epochs': 1000, 'batch': 1000 }) res['time'].append(tmp['opti_time']) res['LL'].append(tmp['fun']) res['epochs'].append(tmp['nep'])
from algos import OptAlg from models import LPMC_Full data_folder = '../../../data/' if __name__ == "__main__": if not os.path.exists('./results'): os.makedirs('./results') print("Train LPMC_Full_L with LS-ABS and hess") model = LPMC_Full(data_folder, file='12_13_14.csv') ioa = OptAlg(alg_type='LS-ABS', direction='hess') res = {'time': [], 'LL': [], 'epochs': []} for i in range(20): tmp = model.optimize( ioa, **{ 'verbose': False, 'max_epochs': 1000, 'batch': 1000 }) res['time'].append(tmp['opti_time']) res['LL'].append(tmp['fun']) res['epochs'].append(tmp['nep'])
from algos import OptAlg from models import LPMC_RR data_folder = '../../../data/' if __name__ == "__main__": if not os.path.exists('./results'): os.makedirs('./results') print("Train LPMC_RR_L with LS-ABS and bfgs-inv") model = LPMC_RR(data_folder, file='12_13_14.csv') ioa = OptAlg(alg_type='LS-ABS', direction='bfgs-inv') res = {'time': [], 'LL': [], 'epochs': []} for i in range(20): tmp = model.optimize( ioa, **{ 'verbose': False, 'max_epochs': 1000, 'batch': 1000 }) res['time'].append(tmp['opti_time']) res['LL'].append(tmp['fun']) res['epochs'].append(tmp['nep'])
from algos import OptAlg from models import MTMC data_folder = '../../../data/' if __name__ == "__main__": if not os.path.exists('./results'): os.makedirs('./results') print("Train MTMC with TR-ABS and hybrid") model = MTMC(data_folder) ioa = OptAlg(alg_type='TR-ABS', direction='hybrid') res = {'time': [], 'LL': [], 'epochs': []} for i in range(20): tmp = model.optimize( ioa, **{ 'verbose': False, 'max_epochs': 1000, 'batch': 1000 }) res['time'].append(tmp['opti_time']) res['LL'].append(tmp['fun']) res['epochs'].append(tmp['nep'])
from algos import OptAlg from models import LPMC_RR data_folder = '../../../data/' if __name__ == "__main__": if not os.path.exists('./results'): os.makedirs('./results') print("Train LPMC_RR_L with TR and hess") model = LPMC_RR(data_folder, file='12_13_14.csv') ioa = OptAlg(alg_type='TR', direction='hess') res = {'time': [], 'LL': [], 'epochs': []} for i in range(20): tmp = model.optimize( ioa, **{ 'verbose': False, 'max_epochs': 1000, 'batch': 1000 }) res['time'].append(tmp['opti_time']) res['LL'].append(tmp['fun']) res['epochs'].append(tmp['nep'])
from algos import OptAlg from models import LPMC_RR data_folder = '../../../data/' if __name__ == "__main__": if not os.path.exists('./results'): os.makedirs('./results') print("Train LPMC_RR_M with LS and bfgs") model = LPMC_RR(data_folder) ioa = OptAlg(alg_type='LS', direction='bfgs') res = {'time': [], 'LL': [], 'epochs': []} for i in range(20): tmp = model.optimize( ioa, **{ 'verbose': False, 'max_epochs': 1000, 'batch': 1000 }) res['time'].append(tmp['opti_time']) res['LL'].append(tmp['fun']) res['epochs'].append(tmp['nep'])