本文整理匯總了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')