#______________________________________________ timestr = '2021-03-29' record_path = '../Records/EXP_03_NMNIST/' print('classic HOTS and homeoHOTS') for name in ['hots', 'homhots']: score_s1 = np.zeros([nb_trials, len(var_jit_s)]) score_t1 = np.zeros([nb_trials, len(std_jit_t)]) score_s12 = np.zeros([nb_trials, len(var_jit_s)]) score_t12 = np.zeros([nb_trials, len(std_jit_t)]) f_name = f'{record_path}{timestr}_results_jitter_{nb_test}_histo_{name}_std.pkl' print(f'{name} clustering...') hotshom, homeotest = netparam(name, filt, tau, nbclust, sigma, homeinv, jitter, timestr, dataset, R) print(f'{name} training...') trainhistomap = hotshom.running(homeotest=homeotest, nb_digit=nb_train, outstyle='histo') print(f'{name} testing...') for trial in [5]: #range(nb_trials): hotshom.date = '2021-03-29_' + str(trial) for id_jit, jit_s in enumerate(var_jit_s): jit_s = round(jit_s, 2) jitonic = [None, jit_s] if jit_s == 0: jitonic = [None, None] testhistomap = hotshom.running(homeotest=homeotest, train=False,
#______________________________________________ #_______________NB_OF_DIGITS___________________ dataset = 'nmnist' nb_test = 10000 nb_train = 60000 ds = 10 nb_test = nb_test//ds nb_train = nb_train//ds print(f'training set size: {nb_train} - testing set: {nb_test}') #______________________________________________ timestr = '2021-03-29' record_path = '../Records/EXP_03_NMNIST/' print('classic HOTS and homeoHOTS') for nbclust in [[8,16],[4,8,16],[8,8,16],[16,8,16],[8,16,32],[16,32,64]]: print(f'architecture: {nbclust}') for name in ['homhots', 'hots']: print('clustering...') hotshom, homeotest = netparam(name, filt, tau, nbclust, sigma, homeinv, jitter, timestr, dataset, R, subset_size = nb_train) print('training...') #trainhistomap = hotshom.running(homeotest=homeotest, nb_digit = nb_train, outstyle='LR') trainhistomap = hotshom.running(homeotest=homeotest, nb_digit = nb_train, outstyle='histo', subset_size = nb_train) print('testing...') testhistomap = hotshom.running(homeotest = homeotest, train=False, nb_digit=nb_test, jitonic=jitonic, subset_size = nb_test) #trainhistomap = hotshom.running(homeotest=homeotest, nb_digit = nb_train, outstyle='histo') #JS_score = histoscore(trainhistomap,testhistomap, verbose = True) #trainhistomap = hotshom.running(homeotest=homeotest, nb_digit = nb_train, outstyle='histav') #JS_score = histoscore_lagorce(trainhistomap,testhistomap, verbose = True)