本文整理汇总了Python中datamodel.DataModel.read_data方法的典型用法代码示例。如果您正苦于以下问题:Python DataModel.read_data方法的具体用法?Python DataModel.read_data怎么用?Python DataModel.read_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datamodel.DataModel
的用法示例。
在下文中一共展示了DataModel.read_data方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from datamodel import DataModel [as 别名]
# 或者: from datamodel.DataModel import read_data [as 别名]
def main(args):
dm = DataModel(args.gig_file, args.chat_file)
dm.read_data()
exp = Experimenter(dm)
if args.classify is True:
scores = exp.classify_gigs()
if args.feature_values is True:
scores = exp.evaluate_feature_values()
return dm
示例2: main
# 需要导入模块: from datamodel import DataModel [as 别名]
# 或者: from datamodel.DataModel import read_data [as 别名]
def main(args):
dm = DataModel(args.data_file)
dm.read_data(to_read_count=10000)
exp = Experimenter(dm, \
process_datamodel=True, \
serialise=False)
t1 = time.time()
exp.perform_multiclass_experiment(
pred_mode=INDEPENDENT,
use_exclusion=True,
need_to_extract_features=True,
prediction_file='../results/predictions_multiclass_independent_englishonly_legibleonly_wordunibigram_chartrigram_10000.csv',
result_file='../results/results_multiclass_independent_englishonly_legibleonly_wordunibigram_chartrigram_10000.txt',
english_only=True,
legible_only=True)
t2 = time.time()
timeused = t2 - t1
logging.getLogger(LOGGER).info('Time used in experiment (hour:min:sec): %d:%d:%d' % \
(timeused/3600, timeused/60, timeused%60))
return exp
示例3: main
# 需要导入模块: from datamodel import DataModel [as 别名]
# 或者: from datamodel.DataModel import read_data [as 别名]
def main(args):
dm = DataModel()
dm.read_data(to_read_count=10, normalize_data=True)
dm.write_data('../data/data_imp.csv')