<jupyter_start><jupyter_text>make snapshot data frames<jupyter_code>years = [year for year in range(1760, 2021) if year % 10 == 0]
metrics = ['indegree','pagerank']

start = time.time()
get_snapshot_vertex_metrics(G, years, metrics, experiment_data_dir = experiment_data_dir)
runtime = time.time() - start
print runtime<jupyter_output><empty_output><jupyter_text>Make edge data frame<jupyter_code>year_interval = 10
num_non_edges_to_add = len(G.get_edgelist())
start = time.time()
get_snapshot_edge_metrics(G, experiment_data_dir, year_interval, num_non_edges_to_add)
runtime = time.time() - start
print runtime
edge_df = pd.read_csv(experiment_data_dir + 'edge_data.csv', index_col=0)

plt.scatter(edge_df['indegree'],
            np.log(edge_df['pagerank']))
columns_to_use = ['indegree','pagerank']

start = time.time()
LogReg = fit_logistic_regression(experiment_data_dir, columns_to_use)
runtime = time.time() - start
print runtime<jupyter_output>3.50401616096<jupyter_text>compute vertex metrics<jupyter_code>year_interval = 10
R = 500
start = time.time()
ranking_metrics = compute_ranking_metrics(G, LogReg, columns_to_use, experiment_data_dir, year_interval, R)
runtime = time.time() - start
print runtime
ranking_metrics<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11358220810166798, 'fraction_numerical': 0.024622716441620333, 'mean_word_length': 7.873239436619718, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '18225', 'license': 'MIT', 'n_tokens_mistral': 475, 'n_tokens_neox': 448, 'n_words': 83, 'path': 'vertex_metrics_experiment/chalboards/test_experiment_pipeline.ipynb', 'repo_name': 'wethepeopleonline/law-net', 'size': '1259'}