def create_submission(conf, transform_valid, transform_test=None, features=None):
 if (transform_test is None):
  transform_test = transform_valid
 kwargs = subdict(conf, ['dataset', 'normalize', 'normalize_on_the_fly', 'sparse'])
 kwargs.update(randomize_valid=False, randomize_test=False)
 (valid_set, test_set) = load_data(kwargs)[1:3]
 if (not conf.get('sparse', False)):
  valid_set = valid_set.get_value(borrow=True)
  test_set = test_set.get_value(borrow=True)
 if (features is not None):
  valid_set = valid_set[:, features]
  test_set = test_set[:, features]
 valid_repr = transform_valid(valid_set)
 test_repr = transform_test(test_set)
 save_submission(conf, valid_repr, test_repr)

def create_submission ( conf , transform_valid , transform_test = None , features = None ) : if ( transform_test is None ) : transform_test = transform_valid kwargs = subdict ( conf , [ 'dataset' , 'normalize' , 'normalize_on_the_fly' , 'sparse' ] ) kwargs . update ( randomize_valid = False , randomize_test = False ) ( valid_set , test_set ) = load_data ( kwargs ) [ 1 : 3 ] if ( not conf . get ( 'sparse' , False ) ) : valid_set = valid_set . get_value ( borrow = True ) test_set = test_set . get_value ( borrow = True ) if ( features is not None ) : valid_set = valid_set [ : , features ] test_set = test_set [ : , features ] valid_repr = transform_valid ( valid_set ) test_repr = transform_test ( test_set ) save_submission ( conf , valid_repr , test_repr )
create a submission file given a configuration dictionary and a computation function .