本文整理汇总了Python中experiment.Experiment.retrieve_data方法的典型用法代码示例。如果您正苦于以下问题:Python Experiment.retrieve_data方法的具体用法?Python Experiment.retrieve_data怎么用?Python Experiment.retrieve_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类experiment.Experiment
的用法示例。
在下文中一共展示了Experiment.retrieve_data方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from experiment import Experiment [as 别名]
# 或者: from experiment.Experiment import retrieve_data [as 别名]
def main():
try:
folder_name = sys.argv[1]
experiment = Experiment(folder_name)
except IndexError:
experiment = Experiment()
experiment.retrieve_data()
parser = FeatureParser()
parser.initialize_matrix(experiment.raw_data_set)
parser.print_global_names()
示例2: main
# 需要导入模块: from experiment import Experiment [as 别名]
# 或者: from experiment.Experiment import retrieve_data [as 别名]
def main():
data = Experiment()
data.retrieve_data()
emails = []
for example in data.raw_data_set:
emails.append(Email(example[1]))
i = 1
with open("dates.csv", "w") as dates_file:
for email in emails:
dates_file.write(str(i) + ","+str(email.get_hour()) + "\n")
示例3: main
# 需要导入模块: from experiment import Experiment [as 别名]
# 或者: from experiment.Experiment import retrieve_data [as 别名]
def main():
if len(sys.argv) < 2:
sys.stderr.write("Need to pass user folder name\n")
return
folder_name = sys.argv[1]
experiment = Experiment(folder_name)
experiment.retrieve_data()
parser = FeatureParser(experiment.raw_data_set)
(names, secondary_names, body_text) = parser.get_mail_elements("data/beck-s/moscoso__mike/4.")
print names
print secondary_names
print body_text