Commit 47462e3d authored by Feliks Kiszkurno's avatar Feliks Kiszkurno
Browse files

changes in test definitions and create data

parent eb84287f
......@@ -22,7 +22,7 @@ settings.init()
create_new_data = True # set to True if you need to reassign the classes
create_new_data_only = True # set to False in order to run ML classifications
reassign_classes = False; class_type = 'norm'
param_path = os.path.abspath(os.path.join(os.getcwd()) + '/' + 'TestDefinitions/hor_1layer_varying_depth.csv')
param_path = os.path.abspath(os.path.join(os.getcwd()) + '/' + 'TestDefinitions/hor_1layer_varying_depth_lambda_zweight.csv')
test_definitions.init(path=param_path)
test_definitions.init(path=param_path)
......@@ -72,8 +72,8 @@ else:
test_result_curr, test_rho_max, test_rho_min = slostabcreatedata.create_data(test_name,
test_definitions.test_parameters[test_name],
abs(test_definitions.test_parameters[test_name]['layers_pos'].max()),
lambda_param=test_definitions.test_parameters[test_name]['lambda'],
z_weight=test_definitions.test_parameters[test_name]['z_weight'])
lambda_param=test_definitions.test_parameters[test_name]['lambda'][0],
z_weight=test_definitions.test_parameters[test_name]['z_weight'][0])
test_results.update({test_name: test_result_curr})
del test_result_curr
......
......@@ -20,12 +20,19 @@ def read_test_parameters(path_to_file):
params_temp = params[params['NAME'] == name]
rho_list = []
position = []
lambda_value = []; lambda_temp = []
z_weight = []; z_temp = []
layer_id = 1
for i, row in params_temp.iterrows():
rho_list.append([layer_id, row['RHO']])
lambda_temp.append(row['LAMBDA'])
z_temp.append(row['Z_WEIGHT'])
layer_id += 1
if int(row['POS']) is not 0:
position.append(row['POS'])
test_definitions[name] = {'layer_n': row['LAYER_N'], 'rho_values': rho_list, 'layers_pos': np.array(position)}
lambda_value.append(np.unique(row['LAMBDA'])[0])
z_weight.append(np.unique(row['Z_WEIGHT'])[0])
test_definitions[name] = {'layer_n': row['LAYER_N'], 'rho_values': rho_list, 'layers_pos': np.array(position),
'lambda': lambda_value, 'z_weight': z_weight}
return test_definitions
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment