本文整理汇总了Python中bigml.fields.Fields.field_column_number方法的典型用法代码示例。如果您正苦于以下问题:Python Fields.field_column_number方法的具体用法?Python Fields.field_column_number怎么用?Python Fields.field_column_number使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bigml.fields.Fields
的用法示例。
在下文中一共展示了Fields.field_column_number方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_kfold_datasets_file
# 需要导入模块: from bigml.fields import Fields [as 别名]
# 或者: from bigml.fields.Fields import field_column_number [as 别名]
def create_kfold_datasets_file(args, api, common_options, resume=False):
"""Create the kfold dataset resources and store their ids in a file
one per line
"""
message = ('Creating the kfold datasets............\n')
u.log_message(message, log_file=session_file, console=args.verbosity)
if args.output_dir is None:
args.output_dir = a.NOW
# retrieve dataset
dataset_id = bigml.api.get_dataset_id(args.dataset)
if dataset_id:
dataset = api.check_resource(dataset_id, api.get_dataset)
# check that kfold_field is unique
fields = Fields(dataset, {"objective_field": args.objective_field,
"objective_field_present": True})
objective_id = fields.field_id(fields.objective_field)
kfold_field_name = avoid_duplicates(DEFAULT_KFOLD_FIELD, fields)
# create jsons to generate partial datasets
selecting_file_list, resume = create_kfold_json(args, kfold_field_name,
objective_id,
resume=resume)
# generate test datasets
datasets_file, resume = create_kfold_datasets(dataset_id, args,
selecting_file_list,
fields.objective_field,
kfold_field_name,
common_options,
resume=resume)
return datasets_file, fields.field_column_number(objective_id), resume
return None, None, None