Skip to content

Commit cd3c88e

Browse files
committed
14_evaluation.ipynb: Beginnings of saving results to file
In the future the results for the same graph would be appended to, so that we will be able to incrementally increase the sample size.
1 parent e6dbf7c commit cd3c88e

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

14_evaluation.ipynb

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
"import networkx as nx\n",
5555
"import pandas as pd\n",
5656
"\n",
57-
"from math import sqrt"
57+
"from math import sqrt\n",
58+
"from pathlib import Path"
5859
]
5960
},
6061
{
@@ -71,7 +72,7 @@
7172
"outputs": [],
7273
"source": [
7374
"from git_commit_graph_ext.commit_graph import _commit_graph_name, commit_graph\n",
74-
"from git_commit_graph_ext.checkpoint import compute_cached_graph, compute_cached_reachability_labels"
75+
"from git_commit_graph_ext.checkpoint import compute_cached_graph, compute_cached_reachability_labels, save_df_to_file"
7576
]
7677
},
7778
{
@@ -1720,6 +1721,35 @@
17201721
"- exact tree intervals: false negatives 3298 out of 4515 positive queries (73.0454 %)"
17211722
]
17221723
},
1724+
{
1725+
"cell_type": "markdown",
1726+
"metadata": {},
1727+
"source": [
1728+
"## Append results of evaluation to a file (TODO)"
1729+
]
1730+
},
1731+
{
1732+
"cell_type": "code",
1733+
"execution_count": null,
1734+
"metadata": {},
1735+
"outputs": [
1736+
{
1737+
"name": "stdout",
1738+
"output_type": "stream",
1739+
"text": [
1740+
"saving reachability analysis for git-commit_graph to \"datasets/git-commit_graph-df_reachability_sample.csv.gz\"\n"
1741+
]
1742+
}
1743+
],
1744+
"source": [
1745+
"df_filename = 'datasets/' + graph_name + '-df_reachability_sample.csv.gz'\n",
1746+
"if Path(df_filename).exists():\n",
1747+
" print('appending not implemented yet !!!')\n",
1748+
"else:\n",
1749+
" print('saving reachability analysis for {} to \"{}\"'.format(graph_name, df_filename))\n",
1750+
" save_df_to_file(conn_sample_df, df_filename)"
1751+
]
1752+
},
17231753
{
17241754
"cell_type": "markdown",
17251755
"metadata": {},
Binary file not shown.

0 commit comments

Comments
 (0)