#NEWLINE# def get_default_alg_list( ) : #NEWLINE# #INDENT# '\n    If an alg_list is not specified, these are the parameters are the default parameters that \n    govern which algorithms are run and how they are evaluated\n    ' #NEWLINE# supported_alg_ids = get_implemented_algs ( ) #NEWLINE# if ( 'RandomSampling' not in supported_alg_ids ) : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'UncertaintySampling' not in supported_alg_ids ) : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'CrowdKernel' not in supported_alg_ids ) : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( 'STE' not in supported_alg_ids ) : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# alg_list = [ ] #NEWLINE# test_proportion = 0.1 #NEWLINE# test_alg = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# test_alg [ 'proportion' ] = test_proportion #NEWLINE# test_alg [ 'alg_id' ] = 'RandomSampling' #NEWLINE# test_alg [ 'alg_label' ] = 'Test' #NEWLINE# test_alg [ 'test_alg_label' ] = 'Test' #NEWLINE# test_alg [ 'params' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# alg_list . append ( test_alg ) #NEWLINE# num_candidate_algs = 2.0 #NEWLINE# random_alg = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# random_alg [ 'proportion' ] = ( ( 1.0 - test_proportion ) / num_candidate_algs ) #NEWLINE# random_alg [ 'alg_id' ] = 'RandomSampling' #NEWLINE# random_alg [ 'alg_label' ] = 'Random' #NEWLINE# random_alg [ 'test_alg_label' ] = 'Test' #NEWLINE# random_alg [ 'params' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# alg_list . append ( random_alg ) #NEWLINE# uncertainty_sampling_alg = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# uncertainty_sampling_alg [ 'proportion' ] = ( ( 1.0 - test_proportion ) / num_candidate_algs ) #NEWLINE# uncertainty_sampling_alg [ 'alg_id' ] = 'UncertaintySampling' #NEWLINE# uncertainty_sampling_alg [ 'alg_label' ] = 'Uncertainty Sampling' #NEWLINE# uncertainty_sampling_alg [ 'test_alg_label' ] = 'Test' #NEWLINE# uncertainty_sampling_alg [ 'params' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# alg_list . append ( uncertainty_sampling_alg ) #NEWLINE# crowd_kernel_alg = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# crowd_kernel_alg [ 'proportion' ] = ( ( 1.0 - test_proportion ) / num_candidate_algs ) #NEWLINE# crowd_kernel_alg [ 'alg_id' ] = 'CrowdKernel' #NEWLINE# crowd_kernel_alg [ 'alg_label' ] = 'CrowdKernel' #NEWLINE# crowd_kernel_alg [ 'test_alg_label' ] = 'Test' #NEWLINE# crowd_kernel_alg [ 'params' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# alg_list . append ( crowd_kernel_alg ) #NEWLINE# ste_alg = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# ste_alg [ 'proportion' ] = ( ( 1.0 - test_proportion ) / num_candidate_algs ) #NEWLINE# ste_alg [ 'alg_id' ] = 'STE' #NEWLINE# ste_alg [ 'alg_label' ] = 'STE' #NEWLINE# ste_alg [ 'test_alg_label' ] = 'Test' #NEWLINE# ste_alg [ 'params' ] = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# alg_list . append ( ste_alg ) #NEWLINE# return alg_list