def dev__analyze_results(): print(80*'-') print('{:^80}'.format('method -> analyze_results')) testing_set = get_testing_set() i_iteration = testing_set['i_iteration'] config_fn = testing_set['config_fn'] results_data_fn = testing_set['results_fn'] assert os.path.isfile(config_fn) assert os.path.isfile(results_data_fn) o = PyposmatDataAnalyzer(config_fn=config_fn,results_data_fn=results_data_fn) o.analyze_results(i_iteration=i_iteration)
def test__analyze_results(): testing_set = get_testing_set() i_iteration = testing_set['i_iteration'] config_fn = testing_set['config_fn'] results_data_fn = testing_set['results_fn'] assert os.path.isfile(config_fn) assert os.path.isfile(results_data_fn) o = PyposmatDataAnalyzer(config_fn=config_fn,results_data_fn=results_data_fn) is_survive_idx,filter_info = o.analyze_results(i_iteration=i_iteration) assert isinstance(is_survive_idx,set) assert isinstance(filter_info,OrderedDict)
def dev__analyze_results(): print(80*'-') print('{:^80}'.format('method -> analyze_results')) testing_set = get_testing_set() i_iteration = testing_set['i_iteration'] config_fn = testing_set['config_fn'] results_data_fn = testing_set['results_fn'] assert os.path.isfile(config_fn) assert os.path.isfile(results_data_fn) o = PyposmatDataAnalyzer(config_fn=config_fn,results_data_fn=results_data_fn) is_survive_idx,filter_info = o.analyze_results(i_iteration=i_iteration) print('type(is_survive_idx):{}'.format(str(type(is_survive_idx)))) print('type(filter_info):{}'.format(str(type(filter_info))))
def dev__write_kde_file(): kde_data_fn = 'pyposmat.kde.test.out' try: os.remove(kde_data_fn) except FileNotFoundError as e: pass testing_set = get_testing_set() o = PyposmatDataAnalyzer() o.initialize_configuration(config_fn=testing_set['config_fn']) o.initialize_results_data(results_data_fn=testing_set['results_data_fn']) is_survive_idx, filter_info = o.analyze_results( i_iteration=testing_set['i_iteration']) o.write_kde_file(filename=kde_data_fn) print(o.kde_data.df['sim_id'])