def run_experiment(data_directory, num_browsers=20, num_blocks=10): persona = Experiment(data_directory=data_directory, num_browsers=num_browsers, num_blocks=num_blocks, feature_extract=extract_topics, save_path=TEST_NAME + "_data.txt") persona.add_stage("start", "all", "https://www.youtube.com/", [visit, scroll]) persona.add_stage("measurement", "all", "https://www.youtube.com/", [visit, scroll, save_page_source]) persona.run() persona.save_data() return persona.get_observations(), persona.get_assignments()
def run_experiment(data_directory, num_browsers=20, num_blocks=10): persona = Experiment(data_directory=data_directory, num_browsers=num_browsers, num_blocks=num_blocks, feature_extract=extract_topics, save_path=TEST_NAME + "_data.txt") persona.add_stage("start", "all", "https://www.youtube.com", [visit, scroll]) persona.add_stage( "treatment", "experimental", "https://pnandak1.github.io/treatments/playback_video.html", [visit, click_on_video]) persona.add_stage("measurement", "all", "https://www.youtube.com", [visit, scroll, save_page_source]) persona.run() persona.save_data() return persona.get_observations(), persona.get_assignments()