diff --git a/examples/dataset_process/__init__.py b/examples/dataset_process/__init__.py index 0310e8d..856e3fa 100644 --- a/examples/dataset_process/__init__.py +++ b/examples/dataset_process/__init__.py @@ -4,5 +4,6 @@ from .utils import ( idx2mask, split_random, - even_quantile_labels + even_quantile_labels, + get_iso_nodes_mapping ) \ No newline at end of file diff --git a/examples/dataset_process/linkx.py b/examples/dataset_process/linkx.py index 74edf3f..fc9787a 100644 --- a/examples/dataset_process/linkx.py +++ b/examples/dataset_process/linkx.py @@ -203,3 +203,13 @@ def forward(self, data: Any) -> Any: data.y = torch.tensor(y, dtype=torch.long) del data['node_year'] return data + + +class T_ogbn_mag(BaseTransform): + def forward(self, data: Any) -> Any: + new_data = Data( + x=data.x_dict['paper'], + edge_index=data.edge_index_dict[('paper', 'cites', 'paper')], + y=data.y_dict['paper'], + num_nodes=data.x_dict['paper'].shape[0]) + return new_data diff --git a/examples/dataset_process/utils.py b/examples/dataset_process/utils.py index 5f8bde3..9221c39 100644 --- a/examples/dataset_process/utils.py +++ b/examples/dataset_process/utils.py @@ -57,3 +57,16 @@ def even_quantile_labels(vals, nclasses, verbose=True): for class_idx, interval in enumerate(interval_lst): print(f'Class {class_idx}: [{interval[0]}, {interval[1]})]') return label + + +def get_iso_nodes_mapping(dataset): + data = dataset.get(dataset.indices()[0]) + edge_index = data.edge_index + src, dst = edge_index[0], edge_index[1] + bin = torch.zeros(data.num_nodes, dtype=torch.bool) + bin[src] = True + bin[dst] = True + kept_nodes = torch.where(bin)[0] + mapping = torch.zeros(data.num_nodes, dtype=torch.long) - 1 + mapping[kept_nodes] = torch.arange(kept_nodes.shape[0]) + return mapping diff --git a/examples/scripts/pfb_bank_s.sh b/examples/scripts/pfb_bank_s.sh index 24aacd7..c7114f2 100644 --- a/examples/scripts/pfb_bank_s.sh +++ b/examples/scripts/pfb_bank_s.sh @@ -29,7 +29,9 @@ ARGS_S=( "--suffix" "fb_bank" ) -DATAS=("cora" "citeseer" "pubmed" "flickr" "chameleon_filtered" "squirrel_filtered" "actor" "roman_empire") +# DATAS=("cora" "citeseer" "pubmed" "flickr" "chameleon_filtered" "squirrel_filtered" "actor" "roman_empire") +# DATAS=("amazon_ratings" "minesweeper" "tolokers" "questions" "reddit" "penn94") +DATAS=("ogbn-arxiv" "arxiv-year" "genius" "twitch-gamer" "ogbn-mag" "pokec") for data in ${DATAS[@]}; do PARLIST="normg,dp_lin,dp_conv,lr_lin,lr_conv,wd_lin,wd_conv" diff --git a/examples/scripts/pfb_fix_s.sh b/examples/scripts/pfb_fix_s.sh index 897c1cf..26035a0 100644 --- a/examples/scripts/pfb_fix_s.sh +++ b/examples/scripts/pfb_fix_s.sh @@ -27,7 +27,10 @@ ARGS_S=( "--suffix" "fb_fix" ) -DATAS=("cora" "citeseer" "pubmed" "flickr" "chameleon_filtered" "squirrel_filtered" "actor" "roman_empire") +# DATAS=("cora" "citeseer" "pubmed" "flickr" "chameleon_filtered" "squirrel_filtered" "actor" "roman_empire") +# DATAS=("amazon_ratings" "minesweeper" "tolokers" "questions" "reddit" "penn94") +# DATAS=("ogbn-arxiv" "arxiv-year" "genius" "twitch-gamer" "ogbn-mag" "pokec") +DATAS=("twitch-gamer" "ogbn-mag" "pokec") MODELS=("DecoupledFixed") CONVS=AdjConv SCHEMES=("impulse" "mono" "appr" "hk" "gaussian") diff --git a/examples/scripts/pfb_var_s.sh b/examples/scripts/pfb_var_s.sh index 2f59c65..dda0a1a 100644 --- a/examples/scripts/pfb_var_s.sh +++ b/examples/scripts/pfb_var_s.sh @@ -31,7 +31,9 @@ ARGS_S=( "--suffix" "fb_var" ) -DATAS=("cora" "citeseer" "pubmed" "flickr" "chameleon_filtered" "squirrel_filtered" "actor" "roman_empire") +# DATAS=("cora" "citeseer" "pubmed" "flickr" "chameleon_filtered" "squirrel_filtered" "actor" "roman_empire") +# DATAS=("amazon_ratings" "minesweeper" "tolokers" "questions" "reddit" "penn94") +DATAS=("ogbn-arxiv" "arxiv-year" "genius" "twitch-gamer" "ogbn-mag" "pokec") MODELS=("DecoupledVar") CONVS=("AdjConv" "ChebConv" "ChebConv2" "BernConv" "ClenhawConv" "HornerConv") diff --git a/examples/tab_res_fb.ipynb b/examples/tab_res_fb.ipynb index d380669..8e7ca2d 100644 --- a/examples/tab_res_fb.ipynb +++ b/examples/tab_res_fb.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 120, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -16,7 +16,7 @@ }, { "cell_type": "code", - "execution_count": 121, + "execution_count": 2, "metadata": {}, "outputs": [ { @@ -188,128 +188,128 @@ " ...\n", " \n", " \n", - " 595\n", + " 895\n", " 21\n", - " roman_empire\n", + " penn94\n", " DecoupledFixedCompose\n", " Adji2Conv,Adji2Conv-gaussian,gaussian\n", - " 327\n", + " 287\n", " 500\n", - " 14.1943\n", - " 1.151\n", - " 0.635\n", - " 45.778\n", - " 54.001\n", - " 42.922\n", - " 50.827\n", - " 41.352\n", - " 49.834\n", - " 0.0077\n", - " 1.151\n", - " 0.635\n", - " \n", - " \n", - " 596\n", + " 107.7445\n", + " 3.517\n", + " 1.861\n", + " 81.109\n", + " 81.124\n", + " 77.627\n", + " 77.638\n", + " 76.942\n", + " 76.981\n", + " 0.0092\n", + " 3.517\n", + " 1.861\n", + " \n", + " \n", + " 896\n", " 22\n", - " roman_empire\n", + " penn94\n", " DecoupledFixedCompose\n", " Adji2Conv,Adji2Conv-gaussian,gaussian\n", - " 470\n", + " 37\n", " 500\n", - " 14.1967\n", - " 1.172\n", - " 0.635\n", - " 44.940\n", - " 53.273\n", - " 41.533\n", - " 49.945\n", - " 40.087\n", - " 49.018\n", - " 0.0067\n", - " 1.172\n", - " 0.635\n", - " \n", - " \n", - " 597\n", + " 106.8353\n", + " 3.517\n", + " 1.861\n", + " 67.480\n", + " 67.547\n", + " 65.441\n", + " 65.542\n", + " 66.203\n", + " 66.289\n", + " 0.0093\n", + " 3.517\n", + " 1.861\n", + " \n", + " \n", + " 897\n", " 20\n", - " roman_empire\n", + " penn94\n", " DecoupledFixedCompose\n", " AdjDiffConv,AdjDiffConv-appr,appr\n", - " 347\n", + " 111\n", " 500\n", - " 9.2672\n", - " 1.075\n", - " 0.366\n", - " 46.826\n", - " 65.127\n", - " 45.282\n", - " 63.733\n", - " 44.960\n", - " 64.026\n", - " 0.0057\n", - " 1.075\n", - " 0.366\n", - " \n", - " \n", - " 598\n", + " 58.1150\n", + " 3.006\n", + " 1.393\n", + " 86.051\n", + " 86.178\n", + " 75.013\n", + " 75.216\n", + " 75.237\n", + " 75.564\n", + " 0.0093\n", + " 3.006\n", + " 1.393\n", + " \n", + " \n", + " 898\n", " 21\n", - " roman_empire\n", + " penn94\n", " DecoupledFixedCompose\n", " AdjDiffConv,AdjDiffConv-appr,appr\n", - " 262\n", + " 107\n", " 500\n", - " 8.3608\n", - " 1.162\n", - " 0.366\n", - " 47.674\n", - " 65.407\n", - " 46.886\n", - " 64.284\n", - " 45.645\n", - " 64.335\n", - " 0.0061\n", - " 1.162\n", - " 0.366\n", - " \n", - " \n", - " 599\n", + " 55.9517\n", + " 3.508\n", + " 1.393\n", + " 85.290\n", + " 85.401\n", + " 75.421\n", + " 75.589\n", + " 74.585\n", + " 74.907\n", + " 0.0085\n", + " 3.508\n", + " 1.393\n", + " \n", + " \n", + " 899\n", " 22\n", - " roman_empire\n", + " penn94\n", " DecoupledFixedCompose\n", " AdjDiffConv,AdjDiffConv-appr,appr\n", - " 303\n", + " 49\n", " 500\n", - " 8.3529\n", - " 1.162\n", - " 0.366\n", - " 47.474\n", - " 65.671\n", - " 45.656\n", - " 63.777\n", - " 45.282\n", - " 63.672\n", - " 0.0059\n", - " 1.162\n", - " 0.366\n", + " 56.8672\n", + " 3.526\n", + " 1.393\n", + " 79.103\n", + " 79.355\n", + " 75.118\n", + " 75.499\n", + " 74.872\n", + " 75.151\n", + " 0.0093\n", + " 3.526\n", + " 1.393\n", " \n", " \n", "\n", - "

600 rows × 18 columns

\n", + "

900 rows × 18 columns

\n", "" ], "text/plain": [ - " seed data model \\\n", - "0 20 cora Iterative \n", - "1 21 cora Iterative \n", - "2 22 cora Iterative \n", - "3 20 cora Iterative \n", - "4 21 cora Iterative \n", - ".. ... ... ... \n", - "595 21 roman_empire DecoupledFixedCompose \n", - "596 22 roman_empire DecoupledFixedCompose \n", - "597 20 roman_empire DecoupledFixedCompose \n", - "598 21 roman_empire DecoupledFixedCompose \n", - "599 22 roman_empire DecoupledFixedCompose \n", + " seed data model \\\n", + "0 20 cora Iterative \n", + "1 21 cora Iterative \n", + "2 22 cora Iterative \n", + "3 20 cora Iterative \n", + "4 21 cora Iterative \n", + ".. ... ... ... \n", + "895 21 penn94 DecoupledFixedCompose \n", + "896 22 penn94 DecoupledFixedCompose \n", + "897 20 penn94 DecoupledFixedCompose \n", + "898 21 penn94 DecoupledFixedCompose \n", + "899 22 penn94 DecoupledFixedCompose \n", "\n", " conv epoch_best epoch_learn \\\n", "0 AdjConv 63 500 \n", @@ -318,11 +318,11 @@ "3 ChebConv 47 500 \n", "4 ChebConv 46 500 \n", ".. ... ... ... \n", - "595 Adji2Conv,Adji2Conv-gaussian,gaussian 327 500 \n", - "596 Adji2Conv,Adji2Conv-gaussian,gaussian 470 500 \n", - "597 AdjDiffConv,AdjDiffConv-appr,appr 347 500 \n", - "598 AdjDiffConv,AdjDiffConv-appr,appr 262 500 \n", - "599 AdjDiffConv,AdjDiffConv-appr,appr 303 500 \n", + "895 Adji2Conv,Adji2Conv-gaussian,gaussian 287 500 \n", + "896 Adji2Conv,Adji2Conv-gaussian,gaussian 37 500 \n", + "897 AdjDiffConv,AdjDiffConv-appr,appr 111 500 \n", + "898 AdjDiffConv,AdjDiffConv-appr,appr 107 500 \n", + "899 AdjDiffConv,AdjDiffConv-appr,appr 49 500 \n", "\n", " time_learn mem_ram_train mem_cuda_train f1macro_train f1micro_train \\\n", "0 4.1765 1.080 0.059 92.248 93.169 \n", @@ -331,11 +331,11 @@ "3 6.4711 1.100 0.071 99.386 99.508 \n", "4 6.2731 1.147 0.071 98.865 99.077 \n", ".. ... ... ... ... ... \n", - "595 14.1943 1.151 0.635 45.778 54.001 \n", - "596 14.1967 1.172 0.635 44.940 53.273 \n", - "597 9.2672 1.075 0.366 46.826 65.127 \n", - "598 8.3608 1.162 0.366 47.674 65.407 \n", - "599 8.3529 1.162 0.366 47.474 65.671 \n", + "895 107.7445 3.517 1.861 81.109 81.124 \n", + "896 106.8353 3.517 1.861 67.480 67.547 \n", + "897 58.1150 3.006 1.393 86.051 86.178 \n", + "898 55.9517 3.508 1.393 85.290 85.401 \n", + "899 56.8672 3.526 1.393 79.103 79.355 \n", "\n", " f1macro_val f1micro_val f1macro_test f1micro_test time_eval \\\n", "0 88.792 90.037 87.530 89.094 0.0011 \n", @@ -344,11 +344,11 @@ "3 69.611 73.432 73.348 75.416 0.0017 \n", "4 72.122 75.461 73.184 75.231 0.0017 \n", ".. ... ... ... ... ... \n", - "595 42.922 50.827 41.352 49.834 0.0077 \n", - "596 41.533 49.945 40.087 49.018 0.0067 \n", - "597 45.282 63.733 44.960 64.026 0.0057 \n", - "598 46.886 64.284 45.645 64.335 0.0061 \n", - "599 45.656 63.777 45.282 63.672 0.0059 \n", + "895 77.627 77.638 76.942 76.981 0.0092 \n", + "896 65.441 65.542 66.203 66.289 0.0093 \n", + "897 75.013 75.216 75.237 75.564 0.0093 \n", + "898 75.421 75.589 74.585 74.907 0.0085 \n", + "899 75.118 75.499 74.872 75.151 0.0093 \n", "\n", " mem_ram_eval mem_cuda_eval \n", "0 1.080 0.059 \n", @@ -357,16 +357,16 @@ "3 1.100 0.071 \n", "4 1.147 0.071 \n", ".. ... ... \n", - "595 1.151 0.635 \n", - "596 1.172 0.635 \n", - "597 1.075 0.366 \n", - "598 1.162 0.366 \n", - "599 1.162 0.366 \n", + "895 3.517 1.861 \n", + "896 3.517 1.861 \n", + "897 3.006 1.393 \n", + "898 3.508 1.393 \n", + "899 3.526 1.393 \n", "\n", - "[600 rows x 18 columns]" + "[900 rows x 18 columns]" ] }, - "execution_count": 121, + "execution_count": 2, "metadata": {}, "output_type": "execute_result" } @@ -379,7 +379,7 @@ }, { "cell_type": "code", - "execution_count": 122, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -416,409 +416,24 @@ " \n", " \n", " \n", - " \n", - " 557\n", - " 22\n", - " flickr\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 5.7232\n", - " 1.173\n", - " 0.147\n", - " 26.842\n", - " 0.0020\n", - " \n", - " \n", - " 556\n", - " 21\n", - " flickr\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 5.6911\n", - " 1.146\n", - " 0.147\n", - " 26.447\n", - " 0.0019\n", - " \n", - " \n", - " 555\n", - " 20\n", - " flickr\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 6.8945\n", - " 1.061\n", - " 0.147\n", - " 24.474\n", - " 0.0019\n", - " \n", - " \n", - " 548\n", - " 22\n", - " pubmed\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 9.6916\n", - " 1.187\n", - " 0.334\n", - " 83.359\n", - " 0.0042\n", - " \n", - " \n", - " 547\n", - " 21\n", - " pubmed\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 10.1231\n", - " 1.183\n", - " 0.334\n", - " 84.450\n", - " 0.0036\n", - " \n", - " \n", - " 546\n", - " 20\n", - " pubmed\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 11.1456\n", - " 1.064\n", - " 0.334\n", - " 83.511\n", - " 0.0044\n", - " \n", - " \n", - " 539\n", - " 22\n", - " citeseer\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 3.8818\n", - " 1.220\n", - " 0.115\n", - " 74.962\n", - " 0.0022\n", - " \n", - " \n", - " 538\n", - " 21\n", - " citeseer\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 3.5475\n", - " 1.216\n", - " 0.115\n", - " 74.962\n", - " 0.0021\n", - " \n", - " \n", - " 537\n", - " 20\n", - " citeseer\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 7.2217\n", - " 1.081\n", - " 0.115\n", - " 74.198\n", - " 0.0022\n", - " \n", - " \n", - " 530\n", - " 22\n", - " cora\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 6.0491\n", - " 1.109\n", - " 0.070\n", - " 88.909\n", - " 0.0031\n", - " \n", - " \n", - " 529\n", - " 21\n", - " cora\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 5.9403\n", - " 1.108\n", - " 0.070\n", - " 87.061\n", - " 0.0022\n", - " \n", - " \n", - " 528\n", - " 20\n", - " cora\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 7.2765\n", - " 1.061\n", - " 0.070\n", - " 88.909\n", - " 0.0028\n", - " \n", - " \n", - " 527\n", - " 22\n", - " flickr\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 7.8784\n", - " 1.172\n", - " 0.147\n", - " 26.842\n", - " 0.0019\n", - " \n", - " \n", - " 526\n", - " 21\n", - " flickr\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 7.7992\n", - " 1.146\n", - " 0.147\n", - " 26.447\n", - " 0.0020\n", - " \n", - " \n", - " 525\n", - " 20\n", - " flickr\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 8.6017\n", - " 1.061\n", - " 0.147\n", - " 24.474\n", - " 0.0019\n", - " \n", - " \n", - " 524\n", - " 22\n", - " pubmed\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 10.2297\n", - " 1.212\n", - " 0.334\n", - " 83.359\n", - " 0.0036\n", - " \n", - " \n", - " 523\n", - " 21\n", - " pubmed\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 9.9435\n", - " 1.212\n", - " 0.334\n", - " 84.450\n", - " 0.0043\n", - " \n", - " \n", - " 522\n", - " 20\n", - " pubmed\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 10.8228\n", - " 1.092\n", - " 0.334\n", - " 83.511\n", - " 0.0044\n", - " \n", - " \n", - " 521\n", - " 22\n", - " citeseer\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 6.2555\n", - " 1.201\n", - " 0.115\n", - " 74.962\n", - " 0.0022\n", - " \n", - " \n", - " 520\n", - " 21\n", - " citeseer\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 6.1511\n", - " 1.199\n", - " 0.115\n", - " 74.962\n", - " 0.0021\n", - " \n", - " \n", - " 519\n", - " 20\n", - " citeseer\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 5.9303\n", - " 1.064\n", - " 0.115\n", - " 74.198\n", - " 0.0022\n", - " \n", - " \n", - " 518\n", - " 22\n", - " cora\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 4.4525\n", - " 1.109\n", - " 0.070\n", - " 88.909\n", - " 0.0021\n", - " \n", - " \n", - " 517\n", - " 21\n", - " cora\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 4.1088\n", - " 1.105\n", - " 0.070\n", - " 87.061\n", - " 0.0023\n", - " \n", - " \n", - " 516\n", - " 20\n", - " cora\n", - " DecoupledFixedCompose\n", - " AdjiConv,AdjiConv-mono,mono\n", - " 500\n", - " 5.5701\n", - " 1.058\n", - " 0.070\n", - " 88.909\n", - " 0.0021\n", - " \n", " \n", "\n", "" ], "text/plain": [ - " seed data model conv \\\n", - "557 22 flickr DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "556 21 flickr DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "555 20 flickr DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "548 22 pubmed DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "547 21 pubmed DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "546 20 pubmed DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "539 22 citeseer DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "538 21 citeseer DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "537 20 citeseer DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "530 22 cora DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "529 21 cora DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "528 20 cora DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "527 22 flickr DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "526 21 flickr DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "525 20 flickr DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "524 22 pubmed DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "523 21 pubmed DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "522 20 pubmed DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "521 22 citeseer DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "520 21 citeseer DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "519 20 citeseer DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "518 22 cora DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "517 21 cora DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "516 20 cora DecoupledFixedCompose AdjiConv,AdjiConv-mono,mono \n", - "\n", - " epoch_learn time_learn mem_ram_train mem_cuda_train f1micro_test \\\n", - "557 500 5.7232 1.173 0.147 26.842 \n", - "556 500 5.6911 1.146 0.147 26.447 \n", - "555 500 6.8945 1.061 0.147 24.474 \n", - "548 500 9.6916 1.187 0.334 83.359 \n", - "547 500 10.1231 1.183 0.334 84.450 \n", - "546 500 11.1456 1.064 0.334 83.511 \n", - "539 500 3.8818 1.220 0.115 74.962 \n", - "538 500 3.5475 1.216 0.115 74.962 \n", - "537 500 7.2217 1.081 0.115 74.198 \n", - "530 500 6.0491 1.109 0.070 88.909 \n", - "529 500 5.9403 1.108 0.070 87.061 \n", - "528 500 7.2765 1.061 0.070 88.909 \n", - "527 500 7.8784 1.172 0.147 26.842 \n", - "526 500 7.7992 1.146 0.147 26.447 \n", - "525 500 8.6017 1.061 0.147 24.474 \n", - "524 500 10.2297 1.212 0.334 83.359 \n", - "523 500 9.9435 1.212 0.334 84.450 \n", - "522 500 10.8228 1.092 0.334 83.511 \n", - "521 500 6.2555 1.201 0.115 74.962 \n", - "520 500 6.1511 1.199 0.115 74.962 \n", - "519 500 5.9303 1.064 0.115 74.198 \n", - "518 500 4.4525 1.109 0.070 88.909 \n", - "517 500 4.1088 1.105 0.070 87.061 \n", - "516 500 5.5701 1.058 0.070 88.909 \n", - "\n", - " time_eval \n", - "557 0.0020 \n", - "556 0.0019 \n", - "555 0.0019 \n", - "548 0.0042 \n", - "547 0.0036 \n", - "546 0.0044 \n", - "539 0.0022 \n", - "538 0.0021 \n", - "537 0.0022 \n", - "530 0.0031 \n", - "529 0.0022 \n", - "528 0.0028 \n", - "527 0.0019 \n", - "526 0.0020 \n", - "525 0.0019 \n", - "524 0.0036 \n", - "523 0.0043 \n", - "522 0.0044 \n", - "521 0.0022 \n", - "520 0.0021 \n", - "519 0.0022 \n", - "518 0.0021 \n", - "517 0.0023 \n", - "516 0.0021 " + "Empty DataFrame\n", + "Columns: [seed, data, model, conv, epoch_learn, time_learn, mem_ram_train, mem_cuda_train, f1micro_test, time_eval]\n", + "Index: []" ] }, - "execution_count": 122, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "dlst = [\"cora\", \"citeseer\", \"pubmed\", \"flickr\", \"chameleon_filtered\", \"squirrel_filtered\", \"actor\", \"roman_empire\"]\n", + "dlst = [\"cora\", \"citeseer\", \"pubmed\", \"flickr\", \"chameleon_filtered\", \"squirrel_filtered\", \"actor\", \"roman_empire\", \\\n", + " \"amazon_ratings\", \"minesweeper\", \"tolokers\", \"questions\", \"reddit\", \"penn94\"]\n", "id_cols = [\"seed\", 'data', 'model', 'conv',]\n", "m_cols = ['epoch_learn', 'time_learn', 'mem_ram_train', 'mem_cuda_train', 'f1micro_test', 'time_eval',]\n", "t = tori[tori['data'].isin(dlst)][id_cols+m_cols].sort_values(by=['data', 'model', 'conv', 'seed'])\n", @@ -827,7 +442,7 @@ }, { "cell_type": "code", - "execution_count": 128, + "execution_count": 4, "metadata": { "vscode": { "languageId": "ruby" @@ -878,12 +493,12 @@ " 1.100886\n", " 1.230000\n", " 0.058847\n", - " 0.413\n", - " 0.0\n", + " 0.413000\n", + " 0.000000\n", " 32.675667\n", " 2.957597\n", - " 0.007400\n", - " 0.000265\n", + " 7.400000\n", + " 0.264575\n", " \n", " \n", " 4\n", @@ -893,12 +508,12 @@ " 1.578104\n", " 1.170667\n", " 0.049075\n", - " 0.141\n", - " 0.0\n", + " 0.141000\n", + " 0.000000\n", " 38.070333\n", " 0.833196\n", - " 0.001467\n", - " 0.000115\n", + " 1.466667\n", + " 0.115470\n", " \n", " \n", " 5\n", @@ -908,12 +523,12 @@ " 0.443809\n", " 1.130667\n", " 0.049075\n", - " 0.108\n", - " 0.0\n", + " 0.108000\n", + " 0.000000\n", " 37.236667\n", " 0.840125\n", - " 0.001300\n", - " 0.000173\n", + " 1.300000\n", + " 0.173205\n", " \n", " \n", " 6\n", @@ -923,12 +538,12 @@ " 1.504255\n", " 1.151667\n", " 0.057274\n", - " 0.109\n", - " 0.0\n", + " 0.109000\n", + " 0.000000\n", " 37.763333\n", " 0.174053\n", - " 0.001400\n", - " 0.000200\n", + " 1.400000\n", + " 0.200000\n", " \n", " \n", " 7\n", @@ -938,12 +553,12 @@ " 1.131418\n", " 1.120000\n", " 0.050269\n", - " 0.108\n", - " 0.0\n", + " 0.108000\n", + " 0.000000\n", " 35.679667\n", " 0.665349\n", - " 0.001100\n", - " 0.000173\n", + " 1.100000\n", + " 0.173205\n", " \n", " \n", " ...\n", @@ -961,148 +576,151 @@ " ...\n", " \n", " \n", - " 169\n", - " squirrel_filtered\n", - " Chebyshev\n", - " 9.255467\n", - " 1.081134\n", - " 1.137333\n", - " 0.036019\n", - " 0.072\n", - " 0.0\n", - " 37.086667\n", - " 2.491115\n", - " 0.001533\n", - " 0.000058\n", - " \n", - " \n", - " 170\n", - " squirrel_filtered\n", + " 285\n", + " tolokers\n", " ChebInterp\n", - " 34.821667\n", - " 3.078537\n", - " 1.149667\n", - " 0.034385\n", - " 0.073\n", - " 0.0\n", - " 36.711667\n", - " 1.406646\n", - " 0.006433\n", - " 0.000058\n", - " \n", - " \n", - " 171\n", - " squirrel_filtered\n", + " 59.358267\n", + " 1.791183\n", + " 1.199667\n", + " 0.069400\n", + " 0.235667\n", + " 0.000577\n", + " 79.129333\n", + " 0.673138\n", + " 9.633333\n", + " 1.365040\n", + " \n", + " \n", + " 286\n", + " tolokers\n", " Clenhaw\n", - " 12.782000\n", - " 0.840600\n", - " 1.139000\n", - " 0.036373\n", - " 0.072\n", - " 0.0\n", - " 32.732667\n", - " 2.939555\n", - " 0.001867\n", - " 0.000058\n", - " \n", - " \n", - " 172\n", - " squirrel_filtered\n", + " 25.748867\n", + " 2.445461\n", + " 1.215333\n", + " 0.071143\n", + " 0.234000\n", + " 0.000000\n", + " 78.576667\n", + " 0.780269\n", + " 3.166667\n", + " 0.057735\n", + " \n", + " \n", + " 287\n", + " tolokers\n", " Horner\n", - " 12.707733\n", - " 0.547591\n", - " 1.138667\n", - " 0.034385\n", - " 0.072\n", - " 0.0\n", - " 32.207333\n", - " 2.172103\n", - " 0.001667\n", - " 0.000058\n", - " \n", - " \n", - " 173\n", - " squirrel_filtered\n", + " 27.344933\n", + " 2.159201\n", + " 1.192667\n", + " 0.062164\n", + " 0.228667\n", + " 0.000577\n", + " 78.236333\n", + " 0.619582\n", + " 2.966667\n", + " 0.152753\n", + " \n", + " \n", + " 288\n", + " tolokers\n", " FiGURe\n", - " 38.183200\n", - " 5.885026\n", - " 1.135000\n", - " 0.036387\n", - " 0.232\n", - " 0.0\n", - " 39.489333\n", - " 0.566767\n", - " 0.010833\n", - " 0.000115\n", + " 169.319467\n", + " 5.167309\n", + " 1.213667\n", + " 0.069759\n", + " 1.082000\n", + " 0.000000\n", + " 78.137000\n", + " 0.449778\n", + " 43.800000\n", + " 0.435890\n", + " \n", + " \n", + " 289\n", + " tolokers\n", + " Identity\n", + " 3.601533\n", + " 1.109408\n", + " 1.151333\n", + " 0.065241\n", + " 0.069000\n", + " 0.000000\n", + " 78.321333\n", + " 0.580410\n", + " 0.600000\n", + " 0.100000\n", " \n", " \n", "\n", - "

136 rows × 12 columns

\n", + "

252 rows × 12 columns

\n", "" ], "text/plain": [ - " data name time_learn_mean time_learn_std \\\n", - "3 actor ACMGNN 42.606200 1.100886 \n", - "4 actor AdaGNN 10.009533 1.578104 \n", - "5 actor PPR 9.703267 0.443809 \n", - "6 actor Gaussian 9.855933 1.504255 \n", - "7 actor HK 9.421800 1.131418 \n", - ".. ... ... ... ... \n", - "169 squirrel_filtered Chebyshev 9.255467 1.081134 \n", - "170 squirrel_filtered ChebInterp 34.821667 3.078537 \n", - "171 squirrel_filtered Clenhaw 12.782000 0.840600 \n", - "172 squirrel_filtered Horner 12.707733 0.547591 \n", - "173 squirrel_filtered FiGURe 38.183200 5.885026 \n", + " data name time_learn_mean time_learn_std \\\n", + "3 actor ACMGNN 42.606200 1.100886 \n", + "4 actor AdaGNN 10.009533 1.578104 \n", + "5 actor PPR 9.703267 0.443809 \n", + "6 actor Gaussian 9.855933 1.504255 \n", + "7 actor HK 9.421800 1.131418 \n", + ".. ... ... ... ... \n", + "285 tolokers ChebInterp 59.358267 1.791183 \n", + "286 tolokers Clenhaw 25.748867 2.445461 \n", + "287 tolokers Horner 27.344933 2.159201 \n", + "288 tolokers FiGURe 169.319467 5.167309 \n", + "289 tolokers Identity 3.601533 1.109408 \n", "\n", " mem_ram_train_mean mem_ram_train_std mem_cuda_train_mean \\\n", - "3 1.230000 0.058847 0.413 \n", - "4 1.170667 0.049075 0.141 \n", - "5 1.130667 0.049075 0.108 \n", - "6 1.151667 0.057274 0.109 \n", - "7 1.120000 0.050269 0.108 \n", + "3 1.230000 0.058847 0.413000 \n", + "4 1.170667 0.049075 0.141000 \n", + "5 1.130667 0.049075 0.108000 \n", + "6 1.151667 0.057274 0.109000 \n", + "7 1.120000 0.050269 0.108000 \n", ".. ... ... ... \n", - "169 1.137333 0.036019 0.072 \n", - "170 1.149667 0.034385 0.073 \n", - "171 1.139000 0.036373 0.072 \n", - "172 1.138667 0.034385 0.072 \n", - "173 1.135000 0.036387 0.232 \n", + "285 1.199667 0.069400 0.235667 \n", + "286 1.215333 0.071143 0.234000 \n", + "287 1.192667 0.062164 0.228667 \n", + "288 1.213667 0.069759 1.082000 \n", + "289 1.151333 0.065241 0.069000 \n", "\n", " mem_cuda_train_std f1micro_test_mean f1micro_test_std time_eval_mean \\\n", - "3 0.0 32.675667 2.957597 0.007400 \n", - "4 0.0 38.070333 0.833196 0.001467 \n", - "5 0.0 37.236667 0.840125 0.001300 \n", - "6 0.0 37.763333 0.174053 0.001400 \n", - "7 0.0 35.679667 0.665349 0.001100 \n", + "3 0.000000 32.675667 2.957597 7.400000 \n", + "4 0.000000 38.070333 0.833196 1.466667 \n", + "5 0.000000 37.236667 0.840125 1.300000 \n", + "6 0.000000 37.763333 0.174053 1.400000 \n", + "7 0.000000 35.679667 0.665349 1.100000 \n", ".. ... ... ... ... \n", - "169 0.0 37.086667 2.491115 0.001533 \n", - "170 0.0 36.711667 1.406646 0.006433 \n", - "171 0.0 32.732667 2.939555 0.001867 \n", - "172 0.0 32.207333 2.172103 0.001667 \n", - "173 0.0 39.489333 0.566767 0.010833 \n", + "285 0.000577 79.129333 0.673138 9.633333 \n", + "286 0.000000 78.576667 0.780269 3.166667 \n", + "287 0.000577 78.236333 0.619582 2.966667 \n", + "288 0.000000 78.137000 0.449778 43.800000 \n", + "289 0.000000 78.321333 0.580410 0.600000 \n", "\n", " time_eval_std \n", - "3 0.000265 \n", - "4 0.000115 \n", - "5 0.000173 \n", - "6 0.000200 \n", - "7 0.000173 \n", + "3 0.264575 \n", + "4 0.115470 \n", + "5 0.173205 \n", + "6 0.200000 \n", + "7 0.173205 \n", ".. ... \n", - "169 0.000058 \n", - "170 0.000058 \n", - "171 0.000058 \n", - "172 0.000058 \n", - "173 0.000115 \n", + "285 1.365040 \n", + "286 0.057735 \n", + "287 0.152753 \n", + "288 0.435890 \n", + "289 0.100000 \n", "\n", - "[136 rows x 12 columns]" + "[252 rows x 12 columns]" ] }, - "execution_count": 128, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "conv_repr = {\n", + " 'MLP': {\n", + " 'Identity': 'Identity',\n", + " },\n", " 'DecoupledFixed': {\n", " 'AdjConv-impulse': 'Impulse',\n", " 'AdjConv-mono': 'Monomial',\n", @@ -1115,7 +733,7 @@ " 'HornerConv': 'Horner',\n", " 'ChebConv': 'Chebyshev',\n", " 'ChebConv2': 'ChebInterp',\n", - " 'ClenhawConv': 'Clenhaw',\n", + " 'ClenhawConv': 'Clenshaw',\n", " 'BernConv': 'Bernstein',\n", " },\n", " 'AdaGNN': {'AdaConv': 'AdaGNN'},\n", @@ -1144,6 +762,8 @@ "df.columns = ['_'.join(col).strip() for col in df.columns.values]\n", "df['time_learn_mean'] = df['time_learn_mean'] * 1000 / df['epoch_learn_mean']\n", "df['time_learn_std'] = df['time_learn_std'] * 1000 / df['epoch_learn_mean']\n", + "df['time_eval_mean'] = df['time_eval_mean'] * 1000\n", + "df['time_eval_std'] = df['time_eval_std'] * 1000\n", "df.drop(columns=['epoch_learn_mean', 'epoch_learn_std'], inplace=True)\n", "df.reset_index(inplace=True)\n", "\n", @@ -1163,7 +783,49 @@ }, { "cell_type": "code", - "execution_count": 130, + "execution_count": 107, + "metadata": { + "vscode": { + "languageId": "ruby" + } + }, + "outputs": [], + "source": [ + "def calc_ranks(mean, std, ascending=False, exc=[]):\n", + " rank = pd.Series(np.nan, index=mean.index)\n", + " na_indices = mean[mean.isna()].index\n", + " nrows = len(mean)\n", + " rank[na_indices] = nrows\n", + "\n", + " mean = mean.dropna()\n", + " mean = mean[~mean.index.isin(exc)]\n", + " std = std.loc[mean.index]\n", + " idx_pend = mean.sort_values(ascending=ascending).index\n", + " current_rank = 1\n", + " while not idx_pend.empty and current_rank <= nrows:\n", + " idx_top = idx_pend[0]\n", + " top_mean = mean[idx_top]\n", + " top_std = std[idx_top]\n", + " rank[idx_top] = current_rank\n", + "\n", + " if ascending:\n", + " idx_same = idx_pend[mean[idx_pend] <= top_mean + top_std]\n", + " else:\n", + " idx_same = idx_pend[mean[idx_pend] >= top_mean - top_std]\n", + " rank[idx_same] = current_rank\n", + "\n", + " idx_pend = idx_pend.difference(idx_same)\n", + " idx_pend = mean.loc[idx_pend].sort_values(ascending=ascending).index\n", + " current_rank += len(idx_same)\n", + "\n", + " return rank\n", + "\n", + "rk = ['a', 'b', 'c']" + ] + }, + { + "cell_type": "code", + "execution_count": 36, "metadata": { "vscode": { "languageId": "ruby" @@ -1199,10 +861,33 @@ " squirrel_filtered\n", " actor\n", " roman_empire\n", + " amazon_ratings\n", + " minesweeper\n", + " tolokers\n", + " questions\n", + " reddit\n", + " penn94\n", " \n", " \n", " \n", " \n", + " Identity\n", + " 75.17\\tpm{1.36}\n", + " 72.93\\tpm{0.35}\n", + " 87.81\\tpm{0.37}\n", + " 35.46\\tpm{0.17}\n", + " 30.52\\tpm{1.81}\n", + " 32.13\\tpm{4.23}\n", + " 37.02\\tpm{0.50}\n", + " 65.30\\tpm{0.64}\n", + " 43.29\\tpm{1.21}\n", + " 80.53\\tpm{0.87}\n", + " 78.32\\tpm{0.58}\n", + " 96.93\\tpm{0.17}\n", + " 36.91\\tpm{0.91}\n", + " 74.61\\tpm{0.50}\n", + " \n", + " \n", " Impulse\n", " 86.20\\tpm{1.55}\n", " 75.27\\tpm{0.26}\n", @@ -1212,21 +897,33 @@ " 34.83\\tpm{1.50}\n", " 25.44\\tpm{0.72}\n", " 28.22\\tpm{0.80}\n", + " 43.34\\tpm{0.51}\n", + " 80.20\\tpm{0.70}\n", + " 78.73\\tpm{0.59}\n", + " 96.96\\tpm{0.03}\n", + " 23.71\\tpm{3.60}\n", + " 56.61\\tpm{0.70}\n", " \n", " \n", " Monomial\n", - " 88.85\\tpm{1.19}\n", + " \\rkb{88.85\\tpm{1.19}}\n", " 77.00\\tpm{0.98}\n", " 89.37\\tpm{0.34}\n", - " 37.41\\tpm{0.63}\n", + " \\rkb{37.41\\tpm{0.63}}\n", " 32.40\\tpm{2.53}\n", " 34.99\\tpm{3.12}\n", " 28.18\\tpm{8.12}\n", " 64.85\\tpm{0.89}\n", + " 41.64\\tpm{0.50}\n", + " 77.28\\tpm{5.05}\n", + " 78.70\\tpm{0.90}\n", + " 96.97\\tpm{0.06}\n", + " 36.45\\tpm{0.86}\n", + " 75.85\\tpm{0.30}\n", " \n", " \n", " PPR\n", - " 89.09\\tpm{1.82}\n", + " \\rka{89.09\\tpm{1.82}}\n", " 77.10\\tpm{0.46}\n", " 88.94\\tpm{0.52}\n", " 36.62\\tpm{0.44}\n", @@ -1234,6 +931,12 @@ " 35.89\\tpm{3.94}\n", " 37.24\\tpm{0.84}\n", " 65.48\\tpm{1.26}\n", + " \\rkc{43.97\\tpm{0.81}}\n", + " 80.53\\tpm{0.87}\n", + " 78.25\\tpm{0.60}\n", + " 94.35\\tpm{4.48}\n", + " 36.03\\tpm{0.82}\n", + " 74.97\\tpm{0.17}\n", " \n", " \n", " HK\n", @@ -1245,6 +948,12 @@ " 32.96\\tpm{1.69}\n", " 35.68\\tpm{0.67}\n", " 64.64\\tpm{0.24}\n", + " 41.98\\tpm{0.21}\n", + " 80.50\\tpm{0.74}\n", + " \\rkb{78.92\\tpm{0.79}}\n", + " 96.95\\tpm{0.06}\n", + " 35.68\\tpm{0.70}\n", + " 63.48\\tpm{10.13}\n", " \n", " \n", " Gaussian\n", @@ -1255,29 +964,47 @@ " 35.21\\tpm{1.30}\n", " 36.19\\tpm{1.97}\n", " 37.76\\tpm{0.17}\n", - " 66.41\\tpm{1.00}\n", + " \\rkc{66.41\\tpm{1.00}}\n", + " 43.38\\tpm{1.14}\n", + " 81.00\\tpm{1.61}\n", + " 78.34\\tpm{0.59}\n", + " \\rkb{96.98\\tpm{0.08}}\n", + " 37.08\\tpm{0.46}\n", + " 75.56\\tpm{0.17}\n", " \n", " \n", " Var-Monomial\n", " 85.46\\tpm{5.07}\n", - " 77.25\\tpm{0.67}\n", + " \\rkc{77.25\\tpm{0.67}}\n", " 88.38\\tpm{0.35}\n", - " 37.22\\tpm{0.78}\n", + " \\rkc{37.22\\tpm{0.78}}\n", " 35.21\\tpm{2.27}\n", - " 40.99\\tpm{1.84}\n", + " \\rka{40.99\\tpm{1.84}}\n", " 36.51\\tpm{0.87}\n", " 65.67\\tpm{2.13}\n", + " 42.75\\tpm{0.53}\n", + " 79.48\\tpm{3.62}\n", + " 78.59\\tpm{0.69}\n", + " \\rkc{96.97\\tpm{0.07}}\n", + " 36.32\\tpm{1.60}\n", + " 78.95\\tpm{2.89}\n", " \n", " \n", " Horner\n", " 87.49\\tpm{0.91}\n", " 75.42\\tpm{2.38}\n", - " 89.69\\tpm{0.62}\n", + " \\rkc{89.69\\tpm{0.62}}\n", " 35.20\\tpm{1.14}\n", " 35.39\\tpm{4.46}\n", " 32.21\\tpm{2.17}\n", " 37.76\\tpm{0.70}\n", - " 67.39\\tpm{1.53}\n", + " \\rka{67.39\\tpm{1.53}}\n", + " 41.67\\tpm{0.91}\n", + " \\rkb{85.48\\tpm{0.42}}\n", + " 78.24\\tpm{0.62}\n", + " 96.96\\tpm{0.03}\n", + " \\rkc{37.32\\tpm{0.44}}\n", + " 80.17\\tpm{3.48}\n", " \n", " \n", " Chebyshev\n", @@ -1289,17 +1016,29 @@ " 37.09\\tpm{2.49}\n", " 37.87\\tpm{0.76}\n", " 64.92\\tpm{0.57}\n", + " 40.17\\tpm{2.03}\n", + " 75.28\\tpm{0.52}\n", + " 78.24\\tpm{0.62}\n", + " 96.96\\tpm{0.03}\n", + " 37.24\\tpm{0.46}\n", + " 75.54\\tpm{0.41}\n", " \n", " \n", " ChebInterp\n", " 82.13\\tpm{4.68}\n", " 76.49\\tpm{0.55}\n", - " 90.03\\tpm{0.41}\n", + " \\rka{90.03\\tpm{0.41}}\n", " 32.24\\tpm{3.37}\n", - " 40.82\\tpm{1.17}\n", + " \\rka{40.82\\tpm{1.17}}\n", " 36.71\\tpm{1.41}\n", " 31.93\\tpm{7.55}\n", " 65.63\\tpm{0.81}\n", + " \\rka{45.03\\tpm{0.40}}\n", + " 81.37\\tpm{1.08}\n", + " \\rka{79.13\\tpm{0.67}}\n", + " \\rka{97.03\\tpm{0.07}}\n", + " 31.40\\tpm{4.18}\n", + " 73.72\\tpm{15.51}\n", " \n", " \n", " Clenhaw\n", @@ -1309,8 +1048,14 @@ " 28.73\\tpm{4.31}\n", " 30.90\\tpm{6.81}\n", " 32.73\\tpm{2.94}\n", - " 38.03\\tpm{1.20}\n", + " \\rkc{38.03\\tpm{1.20}}\n", " 65.92\\tpm{1.98}\n", + " \\rkb{44.07\\tpm{0.08}}\n", + " \\rkc{85.18\\tpm{0.58}}\n", + " 78.58\\tpm{0.78}\n", + " 96.96\\tpm{0.03}\n", + " 37.13\\tpm{1.85}\n", + " \\rka{83.41\\tpm{0.76}}\n", " \n", " \n", " Bernstein\n", @@ -1318,21 +1063,33 @@ " 57.86\\tpm{22.35}\n", " 76.97\\tpm{17.77}\n", " 34.17\\tpm{0.08}\n", - " 36.70\\tpm{3.24}\n", + " \\rkc{36.70\\tpm{3.24}}\n", " 35.36\\tpm{3.25}\n", " 37.17\\tpm{1.26}\n", " 61.91\\tpm{1.59}\n", + " 37.36\\tpm{1.23}\n", + " 78.30\\tpm{4.76}\n", + " 78.52\\tpm{0.48}\n", + " 96.64\\tpm{0.33}\n", + " \\rkb{37.65\\tpm{0.88}}\n", + " 77.75\\tpm{0.61}\n", " \n", " \n", " AdaGNN\n", " 88.60\\tpm{0.95}\n", " 76.69\\tpm{1.17}\n", " 89.66\\tpm{0.32}\n", - " 37.41\\tpm{1.81}\n", + " \\rka{37.41\\tpm{1.81}}\n", " 35.58\\tpm{1.72}\n", " 36.11\\tpm{2.69}\n", - " 38.07\\tpm{0.83}\n", - " 66.73\\tpm{1.69}\n", + " \\rka{38.07\\tpm{0.83}}\n", + " \\rkb{66.73\\tpm{1.69}}\n", + " 43.45\\tpm{2.62}\n", + " 82.37\\tpm{0.98}\n", + " 78.24\\tpm{0.65}\n", + " 96.96\\tpm{0.03}\n", + " \\rka{38.36\\tpm{0.80}}\n", + " \\rkc{81.87\\tpm{0.11}}\n", " \n", " \n", " ACMGNN\n", @@ -1341,31 +1098,49 @@ " 87.96\\tpm{0.76}\n", " 31.36\\tpm{0.51}\n", " 31.84\\tpm{4.14}\n", - " 37.84\\tpm{2.29}\n", + " \\rkc{37.84\\tpm{2.29}}\n", " 32.68\\tpm{2.96}\n", " 64.02\\tpm{6.26}\n", + " 40.36\\tpm{1.10}\n", + " \\rka{90.00\\tpm{0.82}}\n", + " 78.51\\tpm{0.31}\n", + " 96.96\\tpm{0.03}\n", + " 29.30\\tpm{4.09}\n", + " 69.61\\tpm{1.87}\n", " \n", " \n", " FAGNN\n", - " 88.29\\tpm{0.95}\n", - " 74.71\\tpm{0.39}\n", - " 83.77\\tpm{0.53}\n", - " 25.92\\tpm{1.13}\n", + " 88.29\\tpm{1.07}\n", + " 74.71\\tpm{0.44}\n", + " 83.77\\tpm{0.59}\n", + " 25.92\\tpm{1.27}\n", " 36.33\\tpm{1.81}\n", " 34.68\\tpm{2.06}\n", " 24.61\\tpm{1.45}\n", " 28.82\\tpm{0.75}\n", + " 42.57\\tpm{0.32}\n", + " 71.00\\tpm{13.74}\n", + " \\rkc{78.79\\tpm{0.54}}\n", + " 96.95\\tpm{0.04}\n", + " 24.08\\tpm{1.03}\n", + " 55.30\\tpm{2.81}\n", " \n", " \n", " G$^2$CN\n", " 82.25\\tpm{3.11}\n", - " 77.40\\tpm{0.67}\n", + " \\rkb{77.40\\tpm{0.67}}\n", " 88.27\\tpm{0.39}\n", " 24.56\\tpm{0.27}\n", " 30.52\\tpm{0.65}\n", " 33.71\\tpm{2.48}\n", " 34.80\\tpm{1.34}\n", " 49.25\\tpm{0.51}\n", + " 42.98\\tpm{1.15}\n", + " 80.45\\tpm{0.98}\n", + " 78.62\\tpm{0.81}\n", + " 96.97\\tpm{0.04}\n", + " 35.66\\tpm{0.66}\n", + " 65.46\\tpm{11.96}\n", " \n", " \n", " GNN-LF/HF\n", @@ -1377,107 +1152,255 @@ " 21.55\\tpm{2.19}\n", " 35.00\\tpm{1.66}\n", " 64.01\\tpm{0.33}\n", + " 41.47\\tpm{0.69}\n", + " 79.20\\tpm{3.17}\n", + " 78.21\\tpm{0.61}\n", + " 96.95\\tpm{0.03}\n", + " 35.77\\tpm{0.94}\n", + " 75.21\\tpm{0.33}\n", " \n", " \n", " FiGURe\n", - " 88.60\\tpm{0.28}\n", - " 77.96\\tpm{0.64}\n", - " 89.70\\tpm{0.16}\n", + " \\rkc{88.60\\tpm{0.28}}\n", + " \\rka{77.96\\tpm{0.64}}\n", + " \\rkb{89.70\\tpm{0.16}}\n", " 35.35\\tpm{0.94}\n", - " 36.70\\tpm{1.81}\n", - " 39.49\\tpm{0.57}\n", - " 38.05\\tpm{0.99}\n", + " \\rkb{36.70\\tpm{1.81}}\n", + " \\rkb{39.49\\tpm{0.57}}\n", + " \\rkb{38.05\\tpm{0.99}}\n", " 64.28\\tpm{2.61}\n", + " 42.63\\tpm{0.79}\n", + " 80.85\\tpm{0.93}\n", + " 78.14\\tpm{0.45}\n", + " 96.96\\tpm{0.03}\n", + " 35.75\\tpm{1.46}\n", + " \\rkb{83.31\\tpm{0.36}}\n", " \n", " \n", "\n", "" ], "text/plain": [ - " cora citeseer pubmed \\\n", - "Impulse 86.20\\tpm{1.55} 75.27\\tpm{0.26} 83.12\\tpm{0.83} \n", - "Monomial 88.85\\tpm{1.19} 77.00\\tpm{0.98} 89.37\\tpm{0.34} \n", - "PPR 89.09\\tpm{1.82} 77.10\\tpm{0.46} 88.94\\tpm{0.52} \n", - "HK 86.81\\tpm{3.89} 77.15\\tpm{1.04} 89.34\\tpm{0.11} \n", - "Gaussian 88.36\\tpm{1.78} 77.15\\tpm{0.89} 89.03\\tpm{0.26} \n", - "Var-Monomial 85.46\\tpm{5.07} 77.25\\tpm{0.67} 88.38\\tpm{0.35} \n", - "Horner 87.49\\tpm{0.91} 75.42\\tpm{2.38} 89.69\\tpm{0.62} \n", - "Chebyshev 73.81\\tpm{1.26} 71.40\\tpm{0.54} 88.53\\tpm{0.52} \n", - "ChebInterp 82.13\\tpm{4.68} 76.49\\tpm{0.55} 90.03\\tpm{0.41} \n", - "Clenhaw 86.20\\tpm{0.77} 72.98\\tpm{7.28} 78.04\\tpm{19.26} \n", - "Bernstein 74.37\\tpm{0.85} 57.86\\tpm{22.35} 76.97\\tpm{17.77} \n", - "AdaGNN 88.60\\tpm{0.95} 76.69\\tpm{1.17} 89.66\\tpm{0.32} \n", - "ACMGNN 71.66\\tpm{1.72} 38.32\\tpm{4.20} 87.96\\tpm{0.76} \n", - "FAGNN 88.29\\tpm{0.95} 74.71\\tpm{0.39} 83.77\\tpm{0.53} \n", - "G$^2$CN 82.25\\tpm{3.11} 77.40\\tpm{0.67} 88.27\\tpm{0.39} \n", - "GNN-LF/HF 85.71\\tpm{0.59} 74.86\\tpm{0.38} 88.60\\tpm{0.83} \n", - "FiGURe 88.60\\tpm{0.28} 77.96\\tpm{0.64} 89.70\\tpm{0.16} \n", + " cora citeseer \\\n", + "Identity 75.17\\tpm{1.36} 72.93\\tpm{0.35} \n", + "Impulse 86.20\\tpm{1.55} 75.27\\tpm{0.26} \n", + "Monomial \\rkb{88.85\\tpm{1.19}} 77.00\\tpm{0.98} \n", + "PPR \\rka{89.09\\tpm{1.82}} 77.10\\tpm{0.46} \n", + "HK 86.81\\tpm{3.89} 77.15\\tpm{1.04} \n", + "Gaussian 88.36\\tpm{1.78} 77.15\\tpm{0.89} \n", + "Var-Monomial 85.46\\tpm{5.07} \\rkc{77.25\\tpm{0.67}} \n", + "Horner 87.49\\tpm{0.91} 75.42\\tpm{2.38} \n", + "Chebyshev 73.81\\tpm{1.26} 71.40\\tpm{0.54} \n", + "ChebInterp 82.13\\tpm{4.68} 76.49\\tpm{0.55} \n", + "Clenhaw 86.20\\tpm{0.77} 72.98\\tpm{7.28} \n", + "Bernstein 74.37\\tpm{0.85} 57.86\\tpm{22.35} \n", + "AdaGNN 88.60\\tpm{0.95} 76.69\\tpm{1.17} \n", + "ACMGNN 71.66\\tpm{1.72} 38.32\\tpm{4.20} \n", + "FAGNN 88.29\\tpm{1.07} 74.71\\tpm{0.44} \n", + "G$^2$CN 82.25\\tpm{3.11} \\rkb{77.40\\tpm{0.67}} \n", + "GNN-LF/HF 85.71\\tpm{0.59} 74.86\\tpm{0.38} \n", + "FiGURe \\rkc{88.60\\tpm{0.28}} \\rka{77.96\\tpm{0.64}} \n", + "\n", + " pubmed flickr \\\n", + "Identity 87.81\\tpm{0.37} 35.46\\tpm{0.17} \n", + "Impulse 83.12\\tpm{0.83} 23.49\\tpm{3.96} \n", + "Monomial 89.37\\tpm{0.34} \\rkb{37.41\\tpm{0.63}} \n", + "PPR 88.94\\tpm{0.52} 36.62\\tpm{0.44} \n", + "HK 89.34\\tpm{0.11} 36.18\\tpm{1.03} \n", + "Gaussian 89.03\\tpm{0.26} 35.64\\tpm{1.62} \n", + "Var-Monomial 88.38\\tpm{0.35} \\rkc{37.22\\tpm{0.78}} \n", + "Horner \\rkc{89.69\\tpm{0.62}} 35.20\\tpm{1.14} \n", + "Chebyshev 88.53\\tpm{0.52} 35.90\\tpm{0.33} \n", + "ChebInterp \\rka{90.03\\tpm{0.41}} 32.24\\tpm{3.37} \n", + "Clenhaw 78.04\\tpm{19.26} 28.73\\tpm{4.31} \n", + "Bernstein 76.97\\tpm{17.77} 34.17\\tpm{0.08} \n", + "AdaGNN 89.66\\tpm{0.32} \\rka{37.41\\tpm{1.81}} \n", + "ACMGNN 87.96\\tpm{0.76} 31.36\\tpm{0.51} \n", + "FAGNN 83.77\\tpm{0.59} 25.92\\tpm{1.27} \n", + "G$^2$CN 88.27\\tpm{0.39} 24.56\\tpm{0.27} \n", + "GNN-LF/HF 88.60\\tpm{0.83} 37.15\\tpm{1.55} \n", + "FiGURe \\rkb{89.70\\tpm{0.16}} 35.35\\tpm{0.94} \n", + "\n", + " chameleon_filtered squirrel_filtered \\\n", + "Identity 30.52\\tpm{1.81} 32.13\\tpm{4.23} \n", + "Impulse 36.52\\tpm{3.93} 34.83\\tpm{1.50} \n", + "Monomial 32.40\\tpm{2.53} 34.99\\tpm{3.12} \n", + "PPR 35.21\\tpm{2.34} 35.89\\tpm{3.94} \n", + "HK 32.02\\tpm{1.49} 32.96\\tpm{1.69} \n", + "Gaussian 35.21\\tpm{1.30} 36.19\\tpm{1.97} \n", + "Var-Monomial 35.21\\tpm{2.27} \\rka{40.99\\tpm{1.84}} \n", + "Horner 35.39\\tpm{4.46} 32.21\\tpm{2.17} \n", + "Chebyshev 35.58\\tpm{3.19} 37.09\\tpm{2.49} \n", + "ChebInterp \\rka{40.82\\tpm{1.17}} 36.71\\tpm{1.41} \n", + "Clenhaw 30.90\\tpm{6.81} 32.73\\tpm{2.94} \n", + "Bernstein \\rkc{36.70\\tpm{3.24}} 35.36\\tpm{3.25} \n", + "AdaGNN 35.58\\tpm{1.72} 36.11\\tpm{2.69} \n", + "ACMGNN 31.84\\tpm{4.14} \\rkc{37.84\\tpm{2.29}} \n", + "FAGNN 36.33\\tpm{1.81} 34.68\\tpm{2.06} \n", + "G$^2$CN 30.52\\tpm{0.65} 33.71\\tpm{2.48} \n", + "GNN-LF/HF 34.83\\tpm{3.13} 21.55\\tpm{2.19} \n", + "FiGURe \\rkb{36.70\\tpm{1.81}} \\rkb{39.49\\tpm{0.57}} \n", "\n", - " flickr chameleon_filtered squirrel_filtered \\\n", - "Impulse 23.49\\tpm{3.96} 36.52\\tpm{3.93} 34.83\\tpm{1.50} \n", - "Monomial 37.41\\tpm{0.63} 32.40\\tpm{2.53} 34.99\\tpm{3.12} \n", - "PPR 36.62\\tpm{0.44} 35.21\\tpm{2.34} 35.89\\tpm{3.94} \n", - "HK 36.18\\tpm{1.03} 32.02\\tpm{1.49} 32.96\\tpm{1.69} \n", - "Gaussian 35.64\\tpm{1.62} 35.21\\tpm{1.30} 36.19\\tpm{1.97} \n", - "Var-Monomial 37.22\\tpm{0.78} 35.21\\tpm{2.27} 40.99\\tpm{1.84} \n", - "Horner 35.20\\tpm{1.14} 35.39\\tpm{4.46} 32.21\\tpm{2.17} \n", - "Chebyshev 35.90\\tpm{0.33} 35.58\\tpm{3.19} 37.09\\tpm{2.49} \n", - "ChebInterp 32.24\\tpm{3.37} 40.82\\tpm{1.17} 36.71\\tpm{1.41} \n", - "Clenhaw 28.73\\tpm{4.31} 30.90\\tpm{6.81} 32.73\\tpm{2.94} \n", - "Bernstein 34.17\\tpm{0.08} 36.70\\tpm{3.24} 35.36\\tpm{3.25} \n", - "AdaGNN 37.41\\tpm{1.81} 35.58\\tpm{1.72} 36.11\\tpm{2.69} \n", - "ACMGNN 31.36\\tpm{0.51} 31.84\\tpm{4.14} 37.84\\tpm{2.29} \n", - "FAGNN 25.92\\tpm{1.13} 36.33\\tpm{1.81} 34.68\\tpm{2.06} \n", - "G$^2$CN 24.56\\tpm{0.27} 30.52\\tpm{0.65} 33.71\\tpm{2.48} \n", - "GNN-LF/HF 37.15\\tpm{1.55} 34.83\\tpm{3.13} 21.55\\tpm{2.19} \n", - "FiGURe 35.35\\tpm{0.94} 36.70\\tpm{1.81} 39.49\\tpm{0.57} \n", + " actor roman_empire \\\n", + "Identity 37.02\\tpm{0.50} 65.30\\tpm{0.64} \n", + "Impulse 25.44\\tpm{0.72} 28.22\\tpm{0.80} \n", + "Monomial 28.18\\tpm{8.12} 64.85\\tpm{0.89} \n", + "PPR 37.24\\tpm{0.84} 65.48\\tpm{1.26} \n", + "HK 35.68\\tpm{0.67} 64.64\\tpm{0.24} \n", + "Gaussian 37.76\\tpm{0.17} \\rkc{66.41\\tpm{1.00}} \n", + "Var-Monomial 36.51\\tpm{0.87} 65.67\\tpm{2.13} \n", + "Horner 37.76\\tpm{0.70} \\rka{67.39\\tpm{1.53}} \n", + "Chebyshev 37.87\\tpm{0.76} 64.92\\tpm{0.57} \n", + "ChebInterp 31.93\\tpm{7.55} 65.63\\tpm{0.81} \n", + "Clenhaw \\rkc{38.03\\tpm{1.20}} 65.92\\tpm{1.98} \n", + "Bernstein 37.17\\tpm{1.26} 61.91\\tpm{1.59} \n", + "AdaGNN \\rka{38.07\\tpm{0.83}} \\rkb{66.73\\tpm{1.69}} \n", + "ACMGNN 32.68\\tpm{2.96} 64.02\\tpm{6.26} \n", + "FAGNN 24.61\\tpm{1.45} 28.82\\tpm{0.75} \n", + "G$^2$CN 34.80\\tpm{1.34} 49.25\\tpm{0.51} \n", + "GNN-LF/HF 35.00\\tpm{1.66} 64.01\\tpm{0.33} \n", + "FiGURe \\rkb{38.05\\tpm{0.99}} 64.28\\tpm{2.61} \n", "\n", - " actor roman_empire \n", - "Impulse 25.44\\tpm{0.72} 28.22\\tpm{0.80} \n", - "Monomial 28.18\\tpm{8.12} 64.85\\tpm{0.89} \n", - "PPR 37.24\\tpm{0.84} 65.48\\tpm{1.26} \n", - "HK 35.68\\tpm{0.67} 64.64\\tpm{0.24} \n", - "Gaussian 37.76\\tpm{0.17} 66.41\\tpm{1.00} \n", - "Var-Monomial 36.51\\tpm{0.87} 65.67\\tpm{2.13} \n", - "Horner 37.76\\tpm{0.70} 67.39\\tpm{1.53} \n", - "Chebyshev 37.87\\tpm{0.76} 64.92\\tpm{0.57} \n", - "ChebInterp 31.93\\tpm{7.55} 65.63\\tpm{0.81} \n", - "Clenhaw 38.03\\tpm{1.20} 65.92\\tpm{1.98} \n", - "Bernstein 37.17\\tpm{1.26} 61.91\\tpm{1.59} \n", - "AdaGNN 38.07\\tpm{0.83} 66.73\\tpm{1.69} \n", - "ACMGNN 32.68\\tpm{2.96} 64.02\\tpm{6.26} \n", - "FAGNN 24.61\\tpm{1.45} 28.82\\tpm{0.75} \n", - "G$^2$CN 34.80\\tpm{1.34} 49.25\\tpm{0.51} \n", - "GNN-LF/HF 35.00\\tpm{1.66} 64.01\\tpm{0.33} \n", - "FiGURe 38.05\\tpm{0.99} 64.28\\tpm{2.61} " + " amazon_ratings minesweeper \\\n", + "Identity 43.29\\tpm{1.21} 80.53\\tpm{0.87} \n", + "Impulse 43.34\\tpm{0.51} 80.20\\tpm{0.70} \n", + "Monomial 41.64\\tpm{0.50} 77.28\\tpm{5.05} \n", + "PPR \\rkc{43.97\\tpm{0.81}} 80.53\\tpm{0.87} \n", + "HK 41.98\\tpm{0.21} 80.50\\tpm{0.74} \n", + "Gaussian 43.38\\tpm{1.14} 81.00\\tpm{1.61} \n", + "Var-Monomial 42.75\\tpm{0.53} 79.48\\tpm{3.62} \n", + "Horner 41.67\\tpm{0.91} \\rkb{85.48\\tpm{0.42}} \n", + "Chebyshev 40.17\\tpm{2.03} 75.28\\tpm{0.52} \n", + "ChebInterp \\rka{45.03\\tpm{0.40}} 81.37\\tpm{1.08} \n", + "Clenhaw \\rkb{44.07\\tpm{0.08}} \\rkc{85.18\\tpm{0.58}} \n", + "Bernstein 37.36\\tpm{1.23} 78.30\\tpm{4.76} \n", + "AdaGNN 43.45\\tpm{2.62} 82.37\\tpm{0.98} \n", + "ACMGNN 40.36\\tpm{1.10} \\rka{90.00\\tpm{0.82}} \n", + "FAGNN 42.57\\tpm{0.32} 71.00\\tpm{13.74} \n", + "G$^2$CN 42.98\\tpm{1.15} 80.45\\tpm{0.98} \n", + "GNN-LF/HF 41.47\\tpm{0.69} 79.20\\tpm{3.17} \n", + "FiGURe 42.63\\tpm{0.79} 80.85\\tpm{0.93} \n", + "\n", + " tolokers questions \\\n", + "Identity 78.32\\tpm{0.58} 96.93\\tpm{0.17} \n", + "Impulse 78.73\\tpm{0.59} 96.96\\tpm{0.03} \n", + "Monomial 78.70\\tpm{0.90} 96.97\\tpm{0.06} \n", + "PPR 78.25\\tpm{0.60} 94.35\\tpm{4.48} \n", + "HK \\rkb{78.92\\tpm{0.79}} 96.95\\tpm{0.06} \n", + "Gaussian 78.34\\tpm{0.59} \\rkb{96.98\\tpm{0.08}} \n", + "Var-Monomial 78.59\\tpm{0.69} \\rkc{96.97\\tpm{0.07}} \n", + "Horner 78.24\\tpm{0.62} 96.96\\tpm{0.03} \n", + "Chebyshev 78.24\\tpm{0.62} 96.96\\tpm{0.03} \n", + "ChebInterp \\rka{79.13\\tpm{0.67}} \\rka{97.03\\tpm{0.07}} \n", + "Clenhaw 78.58\\tpm{0.78} 96.96\\tpm{0.03} \n", + "Bernstein 78.52\\tpm{0.48} 96.64\\tpm{0.33} \n", + "AdaGNN 78.24\\tpm{0.65} 96.96\\tpm{0.03} \n", + "ACMGNN 78.51\\tpm{0.31} 96.96\\tpm{0.03} \n", + "FAGNN \\rkc{78.79\\tpm{0.54}} 96.95\\tpm{0.04} \n", + "G$^2$CN 78.62\\tpm{0.81} 96.97\\tpm{0.04} \n", + "GNN-LF/HF 78.21\\tpm{0.61} 96.95\\tpm{0.03} \n", + "FiGURe 78.14\\tpm{0.45} 96.96\\tpm{0.03} \n", + "\n", + " reddit penn94 \n", + "Identity 36.91\\tpm{0.91} 74.61\\tpm{0.50} \n", + "Impulse 23.71\\tpm{3.60} 56.61\\tpm{0.70} \n", + "Monomial 36.45\\tpm{0.86} 75.85\\tpm{0.30} \n", + "PPR 36.03\\tpm{0.82} 74.97\\tpm{0.17} \n", + "HK 35.68\\tpm{0.70} 63.48\\tpm{10.13} \n", + "Gaussian 37.08\\tpm{0.46} 75.56\\tpm{0.17} \n", + "Var-Monomial 36.32\\tpm{1.60} 78.95\\tpm{2.89} \n", + "Horner \\rkc{37.32\\tpm{0.44}} 80.17\\tpm{3.48} \n", + "Chebyshev 37.24\\tpm{0.46} 75.54\\tpm{0.41} \n", + "ChebInterp 31.40\\tpm{4.18} 73.72\\tpm{15.51} \n", + "Clenhaw 37.13\\tpm{1.85} \\rka{83.41\\tpm{0.76}} \n", + "Bernstein \\rkb{37.65\\tpm{0.88}} 77.75\\tpm{0.61} \n", + "AdaGNN \\rka{38.36\\tpm{0.80}} \\rkc{81.87\\tpm{0.11}} \n", + "ACMGNN 29.30\\tpm{4.09} 69.61\\tpm{1.87} \n", + "FAGNN 24.08\\tpm{1.03} 55.30\\tpm{2.81} \n", + "G$^2$CN 35.66\\tpm{0.66} 65.46\\tpm{11.96} \n", + "GNN-LF/HF 35.77\\tpm{0.94} 75.21\\tpm{0.33} \n", + "FiGURe 35.75\\tpm{1.46} \\rkb{83.31\\tpm{0.36}} " ] }, - "execution_count": 130, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "acc, accstr = pd.DataFrame(index=flst, columns=dlst), pd.DataFrame(index=flst, columns=dlst)\n", - "for row in acc.index:\n", - " for col in acc.columns:\n", + "dlst_acc = dlst\n", + "# dlst_acc = [\"cora\", \"citeseer\", \"pubmed\", \"flickr\", \"chameleon_filtered\", \"squirrel_filtered\", \"actor\", \"roman_empire\"]\n", + "acc_str = pd.DataFrame(index=flst, columns=dlst_acc, dtype=str)\n", + "for row in acc_str.index:\n", + " for col in acc_str.columns:\n", " mean = df.loc[(df['name'] == row) & (df['data'] == col), 'f1micro_test_mean'].values\n", " std = df.loc[(df['name'] == row) & (df['data'] == col), 'f1micro_test_std'].values\n", " if len(mean) > 0:\n", - " accstr.loc[row, col] = f'{mean[0]:.2f}\\\\tpm{{{std[0]:.2f}}}'\n", - " acc.loc[row, col] = float(mean[0])\n", + " acc_str.loc[row, col] = f'{mean[0]:.2f}\\\\tpm{{{std[0]:.2f}}}'\n", + "\n", + "# acc_str[acc_str.isna().any(axis=1)]\n", + "# acc_str.dropna(inplace=True)\n", "\n", - "accstr" + "for col in acc_str.columns:\n", + " mean = df.loc[df['data'] == col, ['name', 'f1micro_test_mean']].set_index('name')['f1micro_test_mean'].astype(float)\n", + " std = df.loc[df['data'] == col, ['name', 'f1micro_test_std']].set_index('name')['f1micro_test_std'].astype(float)\n", + " # rank = calc_ranks(mean, std)\n", + " rank = mean.rank(ascending=False).astype(int)\n", + " for i, rki in enumerate(rk):\n", + " idx = rank[rank == i+1].index\n", + " acc_str.loc[idx, col] = f'\\\\rk{rki}' + '{' + acc_str.loc[idx, col] + '}'\n", + "\n", + "acc_str" ] }, { "cell_type": "code", - "execution_count": 131, - "metadata": { - "vscode": { - "languageId": "ruby" + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\t& Identity & 75.17\\tpm{1.36} & 72.93\\tpm{0.35} & 87.81\\tpm{0.37} & 35.46\\tpm{0.17} & 30.52\\tpm{1.81} & 32.13\\tpm{4.23} & 37.02\\tpm{0.50} & 65.30\\tpm{0.64} & 43.29\\tpm{1.21} & 80.53\\tpm{0.87} & 78.32\\tpm{0.58} & 96.93\\tpm{0.17} & 36.91\\tpm{0.91} & 74.61\\tpm{0.50} \\\\\n", + "\t& Impulse & 86.20\\tpm{1.55} & 75.27\\tpm{0.26} & 83.12\\tpm{0.83} & 23.49\\tpm{3.96} & 36.52\\tpm{3.93} & 34.83\\tpm{1.50} & 25.44\\tpm{0.72} & 28.22\\tpm{0.80} & 43.34\\tpm{0.51} & 80.20\\tpm{0.70} & 78.73\\tpm{0.59} & 96.96\\tpm{0.03} & 23.71\\tpm{3.60} & 56.61\\tpm{0.70} \\\\\n", + "\t& Monomial & \\rkb{88.85\\tpm{1.19}} & 77.00\\tpm{0.98} & 89.37\\tpm{0.34} & \\rkb{37.41\\tpm{0.63}} & 32.40\\tpm{2.53} & 34.99\\tpm{3.12} & 28.18\\tpm{8.12} & 64.85\\tpm{0.89} & 41.64\\tpm{0.50} & 77.28\\tpm{5.05} & 78.70\\tpm{0.90} & 96.97\\tpm{0.06} & 36.45\\tpm{0.86} & 75.85\\tpm{0.30} \\\\\n", + "\t& PPR & \\rka{89.09\\tpm{1.82}} & 77.10\\tpm{0.46} & 88.94\\tpm{0.52} & 36.62\\tpm{0.44} & 35.21\\tpm{2.34} & 35.89\\tpm{3.94} & 37.24\\tpm{0.84} & 65.48\\tpm{1.26} & \\rkc{43.97\\tpm{0.81}} & 80.53\\tpm{0.87} & 78.25\\tpm{0.60} & 94.35\\tpm{4.48} & 36.03\\tpm{0.82} & 74.97\\tpm{0.17} \\\\\n", + "\t& HK & 86.81\\tpm{3.89} & 77.15\\tpm{1.04} & 89.34\\tpm{0.11} & 36.18\\tpm{1.03} & 32.02\\tpm{1.49} & 32.96\\tpm{1.69} & 35.68\\tpm{0.67} & 64.64\\tpm{0.24} & 41.98\\tpm{0.21} & 80.50\\tpm{0.74} & \\rkb{78.92\\tpm{0.79}} & 96.95\\tpm{0.06} & 35.68\\tpm{0.70} & 63.48\\tpm{10.13} \\\\\n", + "\t& Gaussian & 88.36\\tpm{1.78} & 77.15\\tpm{0.89} & 89.03\\tpm{0.26} & 35.64\\tpm{1.62} & 35.21\\tpm{1.30} & 36.19\\tpm{1.97} & 37.76\\tpm{0.17} & \\rkc{66.41\\tpm{1.00}} & 43.38\\tpm{1.14} & 81.00\\tpm{1.61} & 78.34\\tpm{0.59} & \\rkb{96.98\\tpm{0.08}} & 37.08\\tpm{0.46} & 75.56\\tpm{0.17} \\\\\n", + "\t& Var-Monomial & 85.46\\tpm{5.07} & \\rkc{77.25\\tpm{0.67}} & 88.38\\tpm{0.35} & \\rkc{37.22\\tpm{0.78}} & 35.21\\tpm{2.27} & \\rka{40.99\\tpm{1.84}} & 36.51\\tpm{0.87} & 65.67\\tpm{2.13} & 42.75\\tpm{0.53} & 79.48\\tpm{3.62} & 78.59\\tpm{0.69} & \\rkc{96.97\\tpm{0.07}} & 36.32\\tpm{1.60} & 78.95\\tpm{2.89} \\\\\n", + "\t& Horner & 87.49\\tpm{0.91} & 75.42\\tpm{2.38} & \\rkc{89.69\\tpm{0.62}} & 35.20\\tpm{1.14} & 35.39\\tpm{4.46} & 32.21\\tpm{2.17} & 37.76\\tpm{0.70} & \\rka{67.39\\tpm{1.53}} & 41.67\\tpm{0.91} & \\rkb{85.48\\tpm{0.42}} & 78.24\\tpm{0.62} & 96.96\\tpm{0.03} & \\rkc{37.32\\tpm{0.44}} & 80.17\\tpm{3.48} \\\\\n", + "\t& Chebyshev & 73.81\\tpm{1.26} & 71.40\\tpm{0.54} & 88.53\\tpm{0.52} & 35.90\\tpm{0.33} & 35.58\\tpm{3.19} & 37.09\\tpm{2.49} & 37.87\\tpm{0.76} & 64.92\\tpm{0.57} & 40.17\\tpm{2.03} & 75.28\\tpm{0.52} & 78.24\\tpm{0.62} & 96.96\\tpm{0.03} & 37.24\\tpm{0.46} & 75.54\\tpm{0.41} \\\\\n", + "\t& ChebInterp & 82.13\\tpm{4.68} & 76.49\\tpm{0.55} & \\rka{90.03\\tpm{0.41}} & 32.24\\tpm{3.37} & \\rka{40.82\\tpm{1.17}} & 36.71\\tpm{1.41} & 31.93\\tpm{7.55} & 65.63\\tpm{0.81} & \\rka{45.03\\tpm{0.40}} & 81.37\\tpm{1.08} & \\rka{79.13\\tpm{0.67}} & \\rka{97.03\\tpm{0.07}} & 31.40\\tpm{4.18} & 73.72\\tpm{15.51} \\\\\n", + "\t& Clenhaw & 86.20\\tpm{0.77} & 72.98\\tpm{7.28} & 78.04\\tpm{19.26} & 28.73\\tpm{4.31} & 30.90\\tpm{6.81} & 32.73\\tpm{2.94} & \\rkc{38.03\\tpm{1.20}} & 65.92\\tpm{1.98} & \\rkb{44.07\\tpm{0.08}} & \\rkc{85.18\\tpm{0.58}} & 78.58\\tpm{0.78} & 96.96\\tpm{0.03} & 37.13\\tpm{1.85} & \\rka{83.41\\tpm{0.76}} \\\\\n", + "\t& Bernstein & 74.37\\tpm{0.85} & 57.86\\tpm{22.35} & 76.97\\tpm{17.77} & 34.17\\tpm{0.08} & \\rkc{36.70\\tpm{3.24}} & 35.36\\tpm{3.25} & 37.17\\tpm{1.26} & 61.91\\tpm{1.59} & 37.36\\tpm{1.23} & 78.30\\tpm{4.76} & 78.52\\tpm{0.48} & 96.64\\tpm{0.33} & \\rkb{37.65\\tpm{0.88}} & 77.75\\tpm{0.61} \\\\\n", + "\t& AdaGNN & 88.60\\tpm{0.95} & 76.69\\tpm{1.17} & 89.66\\tpm{0.32} & \\rka{37.41\\tpm{1.81}} & 35.58\\tpm{1.72} & 36.11\\tpm{2.69} & \\rka{38.07\\tpm{0.83}} & \\rkb{66.73\\tpm{1.69}} & 43.45\\tpm{2.62} & 82.37\\tpm{0.98} & 78.24\\tpm{0.65} & 96.96\\tpm{0.03} & \\rka{38.36\\tpm{0.80}} & \\rkc{81.87\\tpm{0.11}} \\\\\n", + "\t& ACMGNN & 71.66\\tpm{1.72} & 38.32\\tpm{4.20} & 87.96\\tpm{0.76} & 31.36\\tpm{0.51} & 31.84\\tpm{4.14} & \\rkc{37.84\\tpm{2.29}} & 32.68\\tpm{2.96} & 64.02\\tpm{6.26} & 40.36\\tpm{1.10} & \\rka{90.00\\tpm{0.82}} & 78.51\\tpm{0.31} & 96.96\\tpm{0.03} & 29.30\\tpm{4.09} & 69.61\\tpm{1.87} \\\\\n", + "\t& FAGNN & 88.29\\tpm{1.07} & 74.71\\tpm{0.44} & 83.77\\tpm{0.59} & 25.92\\tpm{1.27} & 36.33\\tpm{1.81} & 34.68\\tpm{2.06} & 24.61\\tpm{1.45} & 28.82\\tpm{0.75} & 42.57\\tpm{0.32} & 71.00\\tpm{13.74} & \\rkc{78.79\\tpm{0.54}} & 96.95\\tpm{0.04} & 24.08\\tpm{1.03} & 55.30\\tpm{2.81} \\\\\n", + "\t& G$^2$CN & 82.25\\tpm{3.11} & \\rkb{77.40\\tpm{0.67}} & 88.27\\tpm{0.39} & 24.56\\tpm{0.27} & 30.52\\tpm{0.65} & 33.71\\tpm{2.48} & 34.80\\tpm{1.34} & 49.25\\tpm{0.51} & 42.98\\tpm{1.15} & 80.45\\tpm{0.98} & 78.62\\tpm{0.81} & 96.97\\tpm{0.04} & 35.66\\tpm{0.66} & 65.46\\tpm{11.96} \\\\\n", + "\t& GNN-LF/HF & 85.71\\tpm{0.59} & 74.86\\tpm{0.38} & 88.60\\tpm{0.83} & 37.15\\tpm{1.55} & 34.83\\tpm{3.13} & 21.55\\tpm{2.19} & 35.00\\tpm{1.66} & 64.01\\tpm{0.33} & 41.47\\tpm{0.69} & 79.20\\tpm{3.17} & 78.21\\tpm{0.61} & 96.95\\tpm{0.03} & 35.77\\tpm{0.94} & 75.21\\tpm{0.33} \\\\\n", + "\t& FiGURe & \\rkc{88.60\\tpm{0.28}} & \\rka{77.96\\tpm{0.64}} & \\rkb{89.70\\tpm{0.16}} & 35.35\\tpm{0.94} & \\rkb{36.70\\tpm{1.81}} & \\rkb{39.49\\tpm{0.57}} & \\rkb{38.05\\tpm{0.99}} & 64.28\\tpm{2.61} & 42.63\\tpm{0.79} & 80.85\\tpm{0.93} & 78.14\\tpm{0.45} & 96.96\\tpm{0.03} & 35.75\\tpm{1.46} & \\rkb{83.31\\tpm{0.36}} \\\\\n", + "\n" + ] } - }, + ], + "source": [ + "for row in acc_str.index:\n", + " print(\"\\t& \" + row + \" & \" + \" & \".join(acc_str.loc[row].values) + \" \\\\\\\\\")\n", + "print()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Latex - Eff" + ] + }, + { + "cell_type": "code", + "execution_count": 108, + "metadata": {}, "outputs": [ { "data": { @@ -1492,345 +1415,660 @@ " vertical-align: top;\n", " }\n", "\n", - " .dataframe thead th {\n", - " text-align: right;\n", + " .dataframe thead tr th {\n", + " text-align: left;\n", " }\n", "\n", "\n", " \n", - " \n", + " \n", " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
coraciteseerpubmedcoraciteseerpubmedflickrchameleon_filteredsquirrel_filteredactorroman_empire...tolokersquestionsredditpenn94
time_learntime_evalmem_cuda_traintime_learntime_evalmem_cuda_traintime_learntime_evalmem_cuda_traintime_learn...mem_cuda_traintime_learntime_evalmem_cuda_traintime_learntime_evalmem_cuda_traintime_learntime_evalmem_cuda_train
Identity\\rko{3.45}\\rko{0.30}\\rko{0.04}\\rko{3.95}\\rko{0.40}\\rko{0.08}\\rko{3.85}\\rko{0.43}\\rko{0.10}\\rko{3.91}...\\rko{0.07}\\rko{4.71}\\rko{2.20}\\rko{0.18}\\rko{3.45}\\rko{0.50}\\rko{0.06}\\rko{9.03}\\rko{1.93}\\rko{0.93}
Impulse86.20\\tpm{1.55}75.27\\tpm{0.26}83.12\\tpm{0.83}23.49\\tpm{3.96}36.52\\tpm{3.93}34.83\\tpm{1.50}25.44\\tpm{0.72}28.22\\tpm{0.80}\\rka{6.07}1.37\\rka{0.06}7.56\\rka{1.10}\\rka{0.10}\\rka{10.84}2.17\\rka{0.21}\\rka{9.11}...\\rka{0.14}\\rka{22.76}\\rkc{6.10}\\rka{0.45}\\rka{8.34}\\rka{1.00}\\rkb{0.11}\\rka{57.11}\\rkb{6.87}\\rka{1.19}
Monomial\\rkb{}88.85\\tpm{1.19}77.00\\tpm{0.98}89.37\\tpm{0.34}\\rkb{}37.41\\tpm{0.63}32.40\\tpm{2.53}34.99\\tpm{3.12}28.18\\tpm{8.12}64.85\\tpm{0.89}\\rka{6.10}\\rka{1.07}\\rka{0.06}\\rka{6.45}\\rkc{1.20}\\rka{0.10}\\rka{10.77}\\rkb{2.03}\\rka{0.21}\\rka{8.77}...0.14\\rka{23.27}\\rka{5.97}\\rka{0.45}\\rka{8.93}1.23\\rkb{0.11}\\rka{56.81}\\rkb{6.83}\\rka{1.19}
PPR\\rka{}89.09\\tpm{1.82}77.10\\tpm{0.46}88.94\\tpm{0.52}36.62\\tpm{0.44}35.21\\tpm{2.34}35.89\\tpm{3.94}37.24\\tpm{0.84}65.48\\tpm{1.26}\\rka{6.75}\\rkb{1.23}\\rka{0.06}\\rka{6.60}\\rkc{1.20}\\rka{0.10}\\rka{11.16}2.300.2210.05...\\rka{0.14}\\rka{22.76}\\rkc{6.30}\\rka{0.45}9.661.23\\rkb{0.11}\\rka{57.21}\\rkb{7.13}\\rka{1.19}
HK86.81\\tpm{3.89}77.15\\tpm{1.04}89.34\\tpm{0.11}36.18\\tpm{1.03}32.02\\tpm{1.49}32.96\\tpm{1.69}35.68\\tpm{0.67}64.64\\tpm{0.24}\\rka{7.10}1.33\\rka{0.06}\\rka{6.80}\\rkc{1.23}\\rka{0.10}\\rka{10.46}\\rkb{2.13}\\rka{0.21}\\rkc{9.66}...\\rka{0.14}\\rka{22.11}\\rkc{6.17}0.47\\rka{9.17}\\rkb{1.03}\\rkb{0.11}\\rka{57.62}\\rkb{6.87}\\rka{1.19}
Gaussian88.36\\tpm{1.78}77.15\\tpm{0.89}89.03\\tpm{0.26}35.64\\tpm{1.62}35.21\\tpm{1.30}36.19\\tpm{1.97}37.76\\tpm{0.17}\\rkc{}66.41\\tpm{1.00}\\rka{7.08}1.40\\rka{0.06}\\rka{6.18}\\rkc{1.30}0.10\\rka{10.67}\\rka{1.83}0.21\\rkc{9.59}...0.17\\rka{23.27}\\rka{6.07}0.489.871.500.11\\rka{56.88}\\rka{6.10}1.26
Var-Monomial85.46\\tpm{5.07}\\rkc{}77.25\\tpm{0.67}88.38\\tpm{0.35}\\rkc{}37.22\\tpm{0.78}35.21\\tpm{2.27}\\rka{}40.99\\tpm{1.84}36.51\\tpm{0.87}65.67\\tpm{2.13}\\rka{7.72}\\rkb{1.13}\\rka{0.06}\\rka{6.04}\\rka{1.00}\\rka{0.10}\\rka{11.26}2.230.22\\rkc{9.28}...0.14\\rka{23.23}6.700.4710.55\\rkc{1.13}\\rka{0.11}\\rka{57.84}\\rkb{6.90}\\rka{1.19}
Horner87.49\\tpm{0.91}75.42\\tpm{2.38}\\rkc{}89.69\\tpm{0.62}35.20\\tpm{1.14}35.39\\tpm{4.46}32.21\\tpm{2.17}37.76\\tpm{0.70}\\rka{}67.39\\tpm{1.53}11.841.900.078.251.970.1216.285.100.3411.61...0.2330.0911.930.7313.882.930.1564.6010.571.49
Chebyshev73.81\\tpm{1.26}71.40\\tpm{0.54}88.53\\tpm{0.52}35.90\\tpm{0.33}35.58\\tpm{3.19}37.09\\tpm{2.49}37.87\\tpm{0.76}64.92\\tpm{0.57}8.851.600.0712.531.930.1116.544.070.3313.47...0.2330.079.430.7315.712.770.1565.718.371.48
ChebInterp82.13\\tpm{4.68}76.49\\tpm{0.55}\\rka{}90.03\\tpm{0.41}32.24\\tpm{3.37}\\rka{}40.82\\tpm{1.17}36.71\\tpm{1.41}31.93\\tpm{7.55}65.63\\tpm{0.81}36.656.470.0736.356.600.1249.257.800.3435.70...0.2462.5213.800.7644.127.570.15119.7511.901.49
Clenhaw86.20\\tpm{0.77}72.98\\tpm{7.28}78.04\\tpm{19.26}28.73\\tpm{4.31}30.90\\tpm{6.81}32.73\\tpm{2.94}\\rkc{}38.03\\tpm{1.20}65.92\\tpm{1.98}13.331.970.0713.192.270.1217.955.230.3412.44...0.2331.6912.970.7315.233.530.1565.3811.771.49
Bernstein74.37\\tpm{0.85}57.86\\tpm{22.35}76.97\\tpm{17.77}34.17\\tpm{0.08}\\rkc{}36.70\\tpm{3.24}35.36\\tpm{3.25}37.17\\tpm{1.26}61.91\\tpm{1.59}31.657.630.2131.598.330.2943.528.371.4038.74...0.87125.9812.733.3034.087.070.54323.1319.203.70
AdaGNN88.60\\tpm{0.95}76.69\\tpm{1.17}89.66\\tpm{0.32}\\rka{}37.41\\tpm{1.81}35.58\\tpm{1.72}36.11\\tpm{2.69}\\rka{}38.07\\tpm{0.83}\\rkb{}66.73\\tpm{1.69}8.951.470.079.451.530.1112.423.170.3113.11...0.2226.66\\rkc{6.37}0.6910.521.400.1460.96\\rkb{7.07}1.44
ACMGNN71.66\\tpm{1.72}38.32\\tpm{4.20}87.96\\tpm{0.76}31.36\\tpm{0.51}31.84\\tpm{4.14}\\rkc{}37.84\\tpm{2.29}32.68\\tpm{2.96}64.02\\tpm{6.26}37.416.970.1741.037.330.2437.958.901.0342.22...0.6377.8013.932.4030.017.330.41138.9712.872.88
FAGNN88.29\\tpm{0.95}74.71\\tpm{0.39}83.77\\tpm{0.53}25.92\\tpm{1.13}36.33\\tpm{1.81}34.68\\tpm{2.06}24.61\\tpm{1.45}28.82\\tpm{0.75}12.842.700.079.772.170.1220.644.070.3312.21...0.2148.908.330.7316.601.930.15119.398.131.43
G$^2$CN82.25\\tpm{3.11}\\rkb{}77.40\\tpm{0.67}88.27\\tpm{0.39}24.56\\tpm{0.27}30.52\\tpm{0.65}33.71\\tpm{2.48}34.80\\tpm{1.34}49.25\\tpm{0.51}16.843.130.1016.812.600.1532.225.030.5522.12...0.3385.318.901.2423.482.300.23216.129.201.86
GNN-LF/HF85.71\\tpm{0.59}74.86\\tpm{0.38}88.60\\tpm{0.83}37.15\\tpm{1.55}34.83\\tpm{3.13}21.55\\tpm{2.19}35.00\\tpm{1.66}64.01\\tpm{0.33}10.562.030.078.471.830.1119.914.270.3314.41...0.2045.638.400.7013.161.900.15113.969.031.39
FiGURe\\rkc{}88.60\\tpm{0.28}\\rka{}77.96\\tpm{0.64}\\rkb{}89.70\\tpm{0.16}35.35\\tpm{0.94}\\rkb{}36.70\\tpm{1.81}\\rkb{}39.49\\tpm{0.57}\\rkb{}38.05\\tpm{0.99}64.28\\tpm{2.61}39.909.230.2636.289.600.3572.0819.701.7256.53...1.08167.0248.734.0945.2513.400.67417.21115.104.45
\n", + "

18 rows × 42 columns

\n", "" ], "text/plain": [ - " cora citeseer \\\n", - "Impulse 86.20\\tpm{1.55} 75.27\\tpm{0.26} \n", - "Monomial \\rkb{}88.85\\tpm{1.19} 77.00\\tpm{0.98} \n", - "PPR \\rka{}89.09\\tpm{1.82} 77.10\\tpm{0.46} \n", - "HK 86.81\\tpm{3.89} 77.15\\tpm{1.04} \n", - "Gaussian 88.36\\tpm{1.78} 77.15\\tpm{0.89} \n", - "Var-Monomial 85.46\\tpm{5.07} \\rkc{}77.25\\tpm{0.67} \n", - "Horner 87.49\\tpm{0.91} 75.42\\tpm{2.38} \n", - "Chebyshev 73.81\\tpm{1.26} 71.40\\tpm{0.54} \n", - "ChebInterp 82.13\\tpm{4.68} 76.49\\tpm{0.55} \n", - "Clenhaw 86.20\\tpm{0.77} 72.98\\tpm{7.28} \n", - "Bernstein 74.37\\tpm{0.85} 57.86\\tpm{22.35} \n", - "AdaGNN 88.60\\tpm{0.95} 76.69\\tpm{1.17} \n", - "ACMGNN 71.66\\tpm{1.72} 38.32\\tpm{4.20} \n", - "FAGNN 88.29\\tpm{0.95} 74.71\\tpm{0.39} \n", - "G$^2$CN 82.25\\tpm{3.11} \\rkb{}77.40\\tpm{0.67} \n", - "GNN-LF/HF 85.71\\tpm{0.59} 74.86\\tpm{0.38} \n", - "FiGURe \\rkc{}88.60\\tpm{0.28} \\rka{}77.96\\tpm{0.64} \n", + " cora citeseer \\\n", + " time_learn time_eval mem_cuda_train time_learn time_eval \n", + "Identity \\rko{3.45} \\rko{0.30} \\rko{0.04} \\rko{3.95} \\rko{0.40} \n", + "Impulse \\rka{6.07} 1.37 \\rka{0.06} 7.56 \\rka{1.10} \n", + "Monomial \\rka{6.10} \\rka{1.07} \\rka{0.06} \\rka{6.45} \\rkc{1.20} \n", + "PPR \\rka{6.75} \\rkb{1.23} \\rka{0.06} \\rka{6.60} \\rkc{1.20} \n", + "HK \\rka{7.10} 1.33 \\rka{0.06} \\rka{6.80} \\rkc{1.23} \n", + "Gaussian \\rka{7.08} 1.40 \\rka{0.06} \\rka{6.18} \\rkc{1.30} \n", + "Var-Monomial \\rka{7.72} \\rkb{1.13} \\rka{0.06} \\rka{6.04} \\rka{1.00} \n", + "Horner 11.84 1.90 0.07 8.25 1.97 \n", + "Chebyshev 8.85 1.60 0.07 12.53 1.93 \n", + "ChebInterp 36.65 6.47 0.07 36.35 6.60 \n", + "Clenhaw 13.33 1.97 0.07 13.19 2.27 \n", + "Bernstein 31.65 7.63 0.21 31.59 8.33 \n", + "AdaGNN 8.95 1.47 0.07 9.45 1.53 \n", + "ACMGNN 37.41 6.97 0.17 41.03 7.33 \n", + "FAGNN 12.84 2.70 0.07 9.77 2.17 \n", + "G$^2$CN 16.84 3.13 0.10 16.81 2.60 \n", + "GNN-LF/HF 10.56 2.03 0.07 8.47 1.83 \n", + "FiGURe 39.90 9.23 0.26 36.28 9.60 \n", "\n", - " pubmed flickr \\\n", - "Impulse 83.12\\tpm{0.83} 23.49\\tpm{3.96} \n", - "Monomial 89.37\\tpm{0.34} \\rkb{}37.41\\tpm{0.63} \n", - "PPR 88.94\\tpm{0.52} 36.62\\tpm{0.44} \n", - "HK 89.34\\tpm{0.11} 36.18\\tpm{1.03} \n", - "Gaussian 89.03\\tpm{0.26} 35.64\\tpm{1.62} \n", - "Var-Monomial 88.38\\tpm{0.35} \\rkc{}37.22\\tpm{0.78} \n", - "Horner \\rkc{}89.69\\tpm{0.62} 35.20\\tpm{1.14} \n", - "Chebyshev 88.53\\tpm{0.52} 35.90\\tpm{0.33} \n", - "ChebInterp \\rka{}90.03\\tpm{0.41} 32.24\\tpm{3.37} \n", - "Clenhaw 78.04\\tpm{19.26} 28.73\\tpm{4.31} \n", - "Bernstein 76.97\\tpm{17.77} 34.17\\tpm{0.08} \n", - "AdaGNN 89.66\\tpm{0.32} \\rka{}37.41\\tpm{1.81} \n", - "ACMGNN 87.96\\tpm{0.76} 31.36\\tpm{0.51} \n", - "FAGNN 83.77\\tpm{0.53} 25.92\\tpm{1.13} \n", - "G$^2$CN 88.27\\tpm{0.39} 24.56\\tpm{0.27} \n", - "GNN-LF/HF 88.60\\tpm{0.83} 37.15\\tpm{1.55} \n", - "FiGURe \\rkb{}89.70\\tpm{0.16} 35.35\\tpm{0.94} \n", + " pubmed \\\n", + " mem_cuda_train time_learn time_eval mem_cuda_train \n", + "Identity \\rko{0.08} \\rko{3.85} \\rko{0.43} \\rko{0.10} \n", + "Impulse \\rka{0.10} \\rka{10.84} 2.17 \\rka{0.21} \n", + "Monomial \\rka{0.10} \\rka{10.77} \\rkb{2.03} \\rka{0.21} \n", + "PPR \\rka{0.10} \\rka{11.16} 2.30 0.22 \n", + "HK \\rka{0.10} \\rka{10.46} \\rkb{2.13} \\rka{0.21} \n", + "Gaussian 0.10 \\rka{10.67} \\rka{1.83} 0.21 \n", + "Var-Monomial \\rka{0.10} \\rka{11.26} 2.23 0.22 \n", + "Horner 0.12 16.28 5.10 0.34 \n", + "Chebyshev 0.11 16.54 4.07 0.33 \n", + "ChebInterp 0.12 49.25 7.80 0.34 \n", + "Clenhaw 0.12 17.95 5.23 0.34 \n", + "Bernstein 0.29 43.52 8.37 1.40 \n", + "AdaGNN 0.11 12.42 3.17 0.31 \n", + "ACMGNN 0.24 37.95 8.90 1.03 \n", + "FAGNN 0.12 20.64 4.07 0.33 \n", + "G$^2$CN 0.15 32.22 5.03 0.55 \n", + "GNN-LF/HF 0.11 19.91 4.27 0.33 \n", + "FiGURe 0.35 72.08 19.70 1.72 \n", "\n", - " chameleon_filtered squirrel_filtered \\\n", - "Impulse 36.52\\tpm{3.93} 34.83\\tpm{1.50} \n", - "Monomial 32.40\\tpm{2.53} 34.99\\tpm{3.12} \n", - "PPR 35.21\\tpm{2.34} 35.89\\tpm{3.94} \n", - "HK 32.02\\tpm{1.49} 32.96\\tpm{1.69} \n", - "Gaussian 35.21\\tpm{1.30} 36.19\\tpm{1.97} \n", - "Var-Monomial 35.21\\tpm{2.27} \\rka{}40.99\\tpm{1.84} \n", - "Horner 35.39\\tpm{4.46} 32.21\\tpm{2.17} \n", - "Chebyshev 35.58\\tpm{3.19} 37.09\\tpm{2.49} \n", - "ChebInterp \\rka{}40.82\\tpm{1.17} 36.71\\tpm{1.41} \n", - "Clenhaw 30.90\\tpm{6.81} 32.73\\tpm{2.94} \n", - "Bernstein \\rkc{}36.70\\tpm{3.24} 35.36\\tpm{3.25} \n", - "AdaGNN 35.58\\tpm{1.72} 36.11\\tpm{2.69} \n", - "ACMGNN 31.84\\tpm{4.14} \\rkc{}37.84\\tpm{2.29} \n", - "FAGNN 36.33\\tpm{1.81} 34.68\\tpm{2.06} \n", - "G$^2$CN 30.52\\tpm{0.65} 33.71\\tpm{2.48} \n", - "GNN-LF/HF 34.83\\tpm{3.13} 21.55\\tpm{2.19} \n", - "FiGURe \\rkb{}36.70\\tpm{1.81} \\rkb{}39.49\\tpm{0.57} \n", + " flickr ... tolokers questions \\\n", + " time_learn ... mem_cuda_train time_learn time_eval \n", + "Identity \\rko{3.91} ... \\rko{0.07} \\rko{4.71} \\rko{2.20} \n", + "Impulse \\rka{9.11} ... \\rka{0.14} \\rka{22.76} \\rkc{6.10} \n", + "Monomial \\rka{8.77} ... 0.14 \\rka{23.27} \\rka{5.97} \n", + "PPR 10.05 ... \\rka{0.14} \\rka{22.76} \\rkc{6.30} \n", + "HK \\rkc{9.66} ... \\rka{0.14} \\rka{22.11} \\rkc{6.17} \n", + "Gaussian \\rkc{9.59} ... 0.17 \\rka{23.27} \\rka{6.07} \n", + "Var-Monomial \\rkc{9.28} ... 0.14 \\rka{23.23} 6.70 \n", + "Horner 11.61 ... 0.23 30.09 11.93 \n", + "Chebyshev 13.47 ... 0.23 30.07 9.43 \n", + "ChebInterp 35.70 ... 0.24 62.52 13.80 \n", + "Clenhaw 12.44 ... 0.23 31.69 12.97 \n", + "Bernstein 38.74 ... 0.87 125.98 12.73 \n", + "AdaGNN 13.11 ... 0.22 26.66 \\rkc{6.37} \n", + "ACMGNN 42.22 ... 0.63 77.80 13.93 \n", + "FAGNN 12.21 ... 0.21 48.90 8.33 \n", + "G$^2$CN 22.12 ... 0.33 85.31 8.90 \n", + "GNN-LF/HF 14.41 ... 0.20 45.63 8.40 \n", + "FiGURe 56.53 ... 1.08 167.02 48.73 \n", + "\n", + " reddit \\\n", + " mem_cuda_train time_learn time_eval mem_cuda_train \n", + "Identity \\rko{0.18} \\rko{3.45} \\rko{0.50} \\rko{0.06} \n", + "Impulse \\rka{0.45} \\rka{8.34} \\rka{1.00} \\rkb{0.11} \n", + "Monomial \\rka{0.45} \\rka{8.93} 1.23 \\rkb{0.11} \n", + "PPR \\rka{0.45} 9.66 1.23 \\rkb{0.11} \n", + "HK 0.47 \\rka{9.17} \\rkb{1.03} \\rkb{0.11} \n", + "Gaussian 0.48 9.87 1.50 0.11 \n", + "Var-Monomial 0.47 10.55 \\rkc{1.13} \\rka{0.11} \n", + "Horner 0.73 13.88 2.93 0.15 \n", + "Chebyshev 0.73 15.71 2.77 0.15 \n", + "ChebInterp 0.76 44.12 7.57 0.15 \n", + "Clenhaw 0.73 15.23 3.53 0.15 \n", + "Bernstein 3.30 34.08 7.07 0.54 \n", + "AdaGNN 0.69 10.52 1.40 0.14 \n", + "ACMGNN 2.40 30.01 7.33 0.41 \n", + "FAGNN 0.73 16.60 1.93 0.15 \n", + "G$^2$CN 1.24 23.48 2.30 0.23 \n", + "GNN-LF/HF 0.70 13.16 1.90 0.15 \n", + "FiGURe 4.09 45.25 13.40 0.67 \n", "\n", - " actor roman_empire \n", - "Impulse 25.44\\tpm{0.72} 28.22\\tpm{0.80} \n", - "Monomial 28.18\\tpm{8.12} 64.85\\tpm{0.89} \n", - "PPR 37.24\\tpm{0.84} 65.48\\tpm{1.26} \n", - "HK 35.68\\tpm{0.67} 64.64\\tpm{0.24} \n", - "Gaussian 37.76\\tpm{0.17} \\rkc{}66.41\\tpm{1.00} \n", - "Var-Monomial 36.51\\tpm{0.87} 65.67\\tpm{2.13} \n", - "Horner 37.76\\tpm{0.70} \\rka{}67.39\\tpm{1.53} \n", - "Chebyshev 37.87\\tpm{0.76} 64.92\\tpm{0.57} \n", - "ChebInterp 31.93\\tpm{7.55} 65.63\\tpm{0.81} \n", - "Clenhaw \\rkc{}38.03\\tpm{1.20} 65.92\\tpm{1.98} \n", - "Bernstein 37.17\\tpm{1.26} 61.91\\tpm{1.59} \n", - "AdaGNN \\rka{}38.07\\tpm{0.83} \\rkb{}66.73\\tpm{1.69} \n", - "ACMGNN 32.68\\tpm{2.96} 64.02\\tpm{6.26} \n", - "FAGNN 24.61\\tpm{1.45} 28.82\\tpm{0.75} \n", - "G$^2$CN 34.80\\tpm{1.34} 49.25\\tpm{0.51} \n", - "GNN-LF/HF 35.00\\tpm{1.66} 64.01\\tpm{0.33} \n", - "FiGURe \\rkb{}38.05\\tpm{0.99} 64.28\\tpm{2.61} " + " penn94 \n", + " time_learn time_eval mem_cuda_train \n", + "Identity \\rko{9.03} \\rko{1.93} \\rko{0.93} \n", + "Impulse \\rka{57.11} \\rkb{6.87} \\rka{1.19} \n", + "Monomial \\rka{56.81} \\rkb{6.83} \\rka{1.19} \n", + "PPR \\rka{57.21} \\rkb{7.13} \\rka{1.19} \n", + "HK \\rka{57.62} \\rkb{6.87} \\rka{1.19} \n", + "Gaussian \\rka{56.88} \\rka{6.10} 1.26 \n", + "Var-Monomial \\rka{57.84} \\rkb{6.90} \\rka{1.19} \n", + "Horner 64.60 10.57 1.49 \n", + "Chebyshev 65.71 8.37 1.48 \n", + "ChebInterp 119.75 11.90 1.49 \n", + "Clenhaw 65.38 11.77 1.49 \n", + "Bernstein 323.13 19.20 3.70 \n", + "AdaGNN 60.96 \\rkb{7.07} 1.44 \n", + "ACMGNN 138.97 12.87 2.88 \n", + "FAGNN 119.39 8.13 1.43 \n", + "G$^2$CN 216.12 9.20 1.86 \n", + "GNN-LF/HF 113.96 9.03 1.39 \n", + "FiGURe 417.21 115.10 4.45 \n", + "\n", + "[18 rows x 42 columns]" ] }, - "execution_count": 131, + "execution_count": 108, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "acc.dropna(inplace=True)\n", - "acc = acc.astype(float)\n", - "accstr = accstr.loc[acc.index]\n", + "mlst = [\"time_learn\", \"time_eval\", \"mem_cuda_train\"]\n", + "eff_str = pd.DataFrame(index=flst, columns=pd.MultiIndex.from_product([dlst, mlst]))\n", + "\n", + "for row in eff_str.index:\n", + " for data, met in eff_str.columns:\n", + " mean = df.loc[(df['name'] == row) & (df['data'] == data), met+'_mean'].values\n", + " std = df.loc[(df['name'] == row) & (df['data'] == data), met+'_std'].values\n", + " if len(mean) > 0:\n", + " eff_str.loc[row, (data, met)] = f\"{mean[0]:.2f}\"\n", "\n", - "rk = ['a', 'b', 'c']\n", - "for col in acc.columns:\n", - " top3_indices = acc[col].nlargest(3).index\n", - " for i, index in enumerate(top3_indices):\n", - " accstr.loc[index, col] = f'\\\\rk{rk[i]}' + '{}' + accstr.loc[index, col]\n", + "for data,met in eff_str.columns:\n", + " mean = df.loc[df['data'] == data, ['name', met+'_mean']].set_index('name')[met+'_mean'].astype(float)\n", + " std = df.loc[df['data'] == data, ['name', met+'_std']].set_index('name')[met+'_std'].astype(float)\n", + " rank = calc_ranks(mean, std, True, ['Identity'])\n", + " for i, rki in enumerate(rk):\n", + " idx = rank[rank == i+1].index\n", + " eff_str.loc[idx, (data, met)] = f'\\\\rk{rki}' + '{' + eff_str.loc[idx, (data, met)] + '}'\n", + " eff_str.loc[rank.isna(), (data, met)] = '\\\\rko{' + eff_str.loc[rank.isna(), (data, met)].astype(str) + '}'\n", "\n", - "accstr" + "eff_str" ] }, { "cell_type": "code", - "execution_count": 132, + "execution_count": 109, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "\t& Impulse & 86.20\\tpm{1.55} & 75.27\\tpm{0.26} & 83.12\\tpm{0.83} & 23.49\\tpm{3.96} & 36.52\\tpm{3.93} & 34.83\\tpm{1.50} & 25.44\\tpm{0.72} & 28.22\\tpm{0.80} \\\\\n", - "\t& Monomial & \\rkb{}88.85\\tpm{1.19} & 77.00\\tpm{0.98} & 89.37\\tpm{0.34} & \\rkb{}37.41\\tpm{0.63} & 32.40\\tpm{2.53} & 34.99\\tpm{3.12} & 28.18\\tpm{8.12} & 64.85\\tpm{0.89} \\\\\n", - "\t& PPR & \\rka{}89.09\\tpm{1.82} & 77.10\\tpm{0.46} & 88.94\\tpm{0.52} & 36.62\\tpm{0.44} & 35.21\\tpm{2.34} & 35.89\\tpm{3.94} & 37.24\\tpm{0.84} & 65.48\\tpm{1.26} \\\\\n", - "\t& HK & 86.81\\tpm{3.89} & 77.15\\tpm{1.04} & 89.34\\tpm{0.11} & 36.18\\tpm{1.03} & 32.02\\tpm{1.49} & 32.96\\tpm{1.69} & 35.68\\tpm{0.67} & 64.64\\tpm{0.24} \\\\\n", - "\t& Gaussian & 88.36\\tpm{1.78} & 77.15\\tpm{0.89} & 89.03\\tpm{0.26} & 35.64\\tpm{1.62} & 35.21\\tpm{1.30} & 36.19\\tpm{1.97} & 37.76\\tpm{0.17} & \\rkc{}66.41\\tpm{1.00} \\\\\n", - "\t& Var-Monomial & 85.46\\tpm{5.07} & \\rkc{}77.25\\tpm{0.67} & 88.38\\tpm{0.35} & \\rkc{}37.22\\tpm{0.78} & 35.21\\tpm{2.27} & \\rka{}40.99\\tpm{1.84} & 36.51\\tpm{0.87} & 65.67\\tpm{2.13} \\\\\n", - "\t& Horner & 87.49\\tpm{0.91} & 75.42\\tpm{2.38} & \\rkc{}89.69\\tpm{0.62} & 35.20\\tpm{1.14} & 35.39\\tpm{4.46} & 32.21\\tpm{2.17} & 37.76\\tpm{0.70} & \\rka{}67.39\\tpm{1.53} \\\\\n", - "\t& Chebyshev & 73.81\\tpm{1.26} & 71.40\\tpm{0.54} & 88.53\\tpm{0.52} & 35.90\\tpm{0.33} & 35.58\\tpm{3.19} & 37.09\\tpm{2.49} & 37.87\\tpm{0.76} & 64.92\\tpm{0.57} \\\\\n", - "\t& ChebInterp & 82.13\\tpm{4.68} & 76.49\\tpm{0.55} & \\rka{}90.03\\tpm{0.41} & 32.24\\tpm{3.37} & \\rka{}40.82\\tpm{1.17} & 36.71\\tpm{1.41} & 31.93\\tpm{7.55} & 65.63\\tpm{0.81} \\\\\n", - "\t& Clenhaw & 86.20\\tpm{0.77} & 72.98\\tpm{7.28} & 78.04\\tpm{19.26} & 28.73\\tpm{4.31} & 30.90\\tpm{6.81} & 32.73\\tpm{2.94} & \\rkc{}38.03\\tpm{1.20} & 65.92\\tpm{1.98} \\\\\n", - "\t& Bernstein & 74.37\\tpm{0.85} & 57.86\\tpm{22.35} & 76.97\\tpm{17.77} & 34.17\\tpm{0.08} & \\rkc{}36.70\\tpm{3.24} & 35.36\\tpm{3.25} & 37.17\\tpm{1.26} & 61.91\\tpm{1.59} \\\\\n", - "\t& AdaGNN & 88.60\\tpm{0.95} & 76.69\\tpm{1.17} & 89.66\\tpm{0.32} & \\rka{}37.41\\tpm{1.81} & 35.58\\tpm{1.72} & 36.11\\tpm{2.69} & \\rka{}38.07\\tpm{0.83} & \\rkb{}66.73\\tpm{1.69} \\\\\n", - "\t& ACMGNN & 71.66\\tpm{1.72} & 38.32\\tpm{4.20} & 87.96\\tpm{0.76} & 31.36\\tpm{0.51} & 31.84\\tpm{4.14} & \\rkc{}37.84\\tpm{2.29} & 32.68\\tpm{2.96} & 64.02\\tpm{6.26} \\\\\n", - "\t& FAGNN & 88.29\\tpm{0.95} & 74.71\\tpm{0.39} & 83.77\\tpm{0.53} & 25.92\\tpm{1.13} & 36.33\\tpm{1.81} & 34.68\\tpm{2.06} & 24.61\\tpm{1.45} & 28.82\\tpm{0.75} \\\\\n", - "\t& G$^2$CN & 82.25\\tpm{3.11} & \\rkb{}77.40\\tpm{0.67} & 88.27\\tpm{0.39} & 24.56\\tpm{0.27} & 30.52\\tpm{0.65} & 33.71\\tpm{2.48} & 34.80\\tpm{1.34} & 49.25\\tpm{0.51} \\\\\n", - "\t& GNN-LF/HF & 85.71\\tpm{0.59} & 74.86\\tpm{0.38} & 88.60\\tpm{0.83} & 37.15\\tpm{1.55} & 34.83\\tpm{3.13} & 21.55\\tpm{2.19} & 35.00\\tpm{1.66} & 64.01\\tpm{0.33} \\\\\n", - "\t& FiGURe & \\rkc{}88.60\\tpm{0.28} & \\rka{}77.96\\tpm{0.64} & \\rkb{}89.70\\tpm{0.16} & 35.35\\tpm{0.94} & \\rkb{}36.70\\tpm{1.81} & \\rkb{}39.49\\tpm{0.57} & \\rkb{}38.05\\tpm{0.99} & 64.28\\tpm{2.61} \\\\\n" + "\t& Identity & \\rko{3.91} & \\rko{0.50} & \\rko{0.06} & \\rko{3.45} & \\rko{0.50} & \\rko{0.06} & \\rko{3.60} & \\rko{0.60} & \\rko{0.07} & \\rko{9.03} & \\rko{1.93} & \\rko{0.93} \\\\\n", + "\t& Impulse & \\rka{9.11} & \\rkb{1.10} & 0.11 & \\rka{8.34} & \\rka{1.00} & \\rkb{0.11} & \\rka{21.71} & \\rkb{1.67} & \\rka{0.14} & \\rka{57.11} & \\rkb{6.87} & \\rka{1.19} \\\\\n", + "\t& Monomial & \\rka{8.77} & \\rkb{1.03} & \\rka{0.10} & \\rka{8.93} & 1.23 & \\rkb{0.11} & \\rka{21.94} & \\rkb{1.50} & 0.14 & \\rka{56.81} & \\rkb{6.83} & \\rka{1.19} \\\\\n", + "\t& PPR & 10.05 & \\rka{0.97} & \\rka{0.10} & 9.66 & 1.23 & \\rkb{0.11} & \\rka{22.81} & \\rkb{1.57} & \\rka{0.14} & \\rka{57.21} & \\rkb{7.13} & \\rka{1.19} \\\\\n", + "\t& HK & \\rkc{9.66} & 1.20 & 0.11 & \\rka{9.17} & \\rkb{1.03} & \\rkb{0.11} & \\rka{21.93} & \\rkb{1.50} & \\rka{0.14} & \\rka{57.62} & \\rkb{6.87} & \\rka{1.19} \\\\\n", + "\t& Gaussian & \\rkc{9.59} & 1.50 & 0.11 & 9.87 & 1.50 & 0.11 & \\rka{22.47} & \\rka{1.33} & 0.17 & \\rka{56.88} & \\rka{6.10} & 1.26 \\\\\n", + "\t& Var-Monomial & \\rkc{9.28} & 1.27 & \\rkc{0.11} & 10.55 & \\rkc{1.13} & \\rka{0.11} & 23.75 & 1.77 & 0.14 & \\rka{57.84} & \\rkb{6.90} & \\rka{1.19} \\\\\n", + "\t& Horner & 11.61 & 2.47 & 0.15 & 13.88 & 2.93 & 0.15 & 27.34 & 2.97 & 0.23 & 64.60 & 10.57 & 1.49 \\\\\n", + "\t& Chebyshev & 13.47 & 2.60 & 0.15 & 15.71 & 2.77 & 0.15 & 26.14 & 2.63 & 0.23 & 65.71 & 8.37 & 1.48 \\\\\n", + "\t& ChebInterp & 35.70 & 7.20 & 0.15 & 44.12 & 7.57 & 0.15 & 59.36 & 9.63 & 0.24 & 119.75 & 11.90 & 1.49 \\\\\n", + "\t& Clenhaw & 12.44 & 2.80 & 0.15 & 15.23 & 3.53 & 0.15 & 25.75 & 3.17 & 0.23 & 65.38 & 11.77 & 1.49 \\\\\n", + "\t& Bernstein & 38.74 & 8.03 & 0.55 & 34.08 & 7.07 & 0.54 & 128.71 & 7.37 & 0.87 & 323.13 & 19.20 & 3.70 \\\\\n", + "\t& AdaGNN & 13.11 & 1.97 & 0.14 & 10.52 & 1.40 & 0.14 & 23.85 & \\rkb{1.53} & 0.22 & 60.96 & \\rkb{7.07} & 1.44 \\\\\n", + "\t& ACMGNN & 42.22 & 7.40 & 0.41 & 30.01 & 7.33 & 0.41 & 64.56 & 7.93 & 0.63 & 138.97 & 12.87 & 2.88 \\\\\n", + "\t& FAGNN & 12.21 & 1.93 & 0.15 & 16.60 & 1.93 & 0.15 & 46.09 & 3.13 & 0.21 & 119.39 & 8.13 & 1.43 \\\\\n", + "\t& G$^2$CN & 22.12 & 2.40 & 0.23 & 23.48 & 2.30 & 0.23 & 84.99 & 4.70 & 0.33 & 216.12 & 9.20 & 1.86 \\\\\n", + "\t& GNN-LF/HF & 14.41 & 1.90 & 0.15 & 13.16 & 1.90 & 0.15 & 44.98 & 3.10 & 0.20 & 113.96 & 9.03 & 1.39 \\\\\n", + "\t& FiGURe & 56.53 & 13.70 & 0.67 & 45.25 & 13.40 & 0.67 & 169.32 & 43.80 & 1.08 & 417.21 & 115.10 & 4.45 \\\\\n", + "\n" ] } ], "source": [ - "for row in accstr.index:\n", - " print(\"\\t& \" + row + \" & \" + \" & \".join(accstr.loc[row].values) + \" \\\\\\\\\")" + "dlst_eff = [\"flickr\", \"reddit\", \"tolokers\", \"penn94\"]\n", + "for row in eff_str.index:\n", + " print(\"\\t& \" + row + \" & \" + \" & \".join(eff_str.loc[row, dlst_eff].values) + \" \\\\\\\\\")\n", + "print()" ] }, { diff --git a/examples/trainer/load_data.py b/examples/trainer/load_data.py index cb0e359..ef31bcc 100755 --- a/examples/trainer/load_data.py +++ b/examples/trainer/load_data.py @@ -18,8 +18,8 @@ from pyg_spectral.utils import load_import from utils import ResLogger -from dataset_process import idx2mask, split_random -from dataset_process.linkx import T_arxiv_year +from dataset_process import idx2mask, split_random, get_iso_nodes_mapping +from dataset_process.linkx import T_arxiv_year, T_ogbn_mag DATAPATH = Path('../data') @@ -76,7 +76,15 @@ def _resolve_split(self, dataset: Dataset, data: Data) -> None: data.test_mask = torch.as_tensor(test_mask) else: if self.data.startswith('ogbn-'): - data.train_mask, data.val_mask, data.test_mask = idx2mask(dataset.get_idx_split(), data.y.size(0)) + idx = dataset.get_idx_split() + if self.data == 'ogbn-products': + mapping = get_iso_nodes_mapping(dataset) + for k in idx: + idx[k] = mapping[idx[k]] + elif self.data == 'ogbn-mag': + for k in idx: + idx[k] = idx[k]['paper'] + data.train_mask, data.val_mask, data.test_mask = idx2mask(idx, data.y.size(0)) if data.train_mask.dim() > 1: if self.split_idx > data.train_mask.size(1): self.split_idx = self.split_idx % data.train_mask.size(1) @@ -147,6 +155,8 @@ def _resolve_import(self, args: Namespace) -> Tuple[str, str, dict]: name=self.data, transform=self._T_prepend([T.ToUndirected()]),) del self.data_split + if self.data == 'ogbn-mag': + kwargs['pre_transform'] = T_ogbn_mag() elif self.data in ['arxiv-year']: module_name = 'ogb.nodeproppred' class_name = 'PygNodePropPredDataset' @@ -234,6 +244,8 @@ def get(self, args: Namespace) -> Data: module_name, class_name, kwargs = self._resolve_import(args) dataset = load_import(class_name, module_name)(**kwargs) + if self.data == 'ogbn-mag': + print(dataset) data = dataset[0] data = self._resolve_split(dataset, data) diff --git a/examples/utils/config.py b/examples/utils/config.py index e9868cc..94b1d66 100755 --- a/examples/utils/config.py +++ b/examples/utils/config.py @@ -150,6 +150,6 @@ def is_serializable(obj): force_list_str = lambda x: [str(v) for v in x.split(',')] force_list_int = lambda x: [int(v) for v in x.split(',')] -list_str = lambda x: [str(v) for v in x.split(',')] if ',' in x else str(x) -list_int = lambda x: [int(v) for v in x.split(',')] if ',' in x else int(x) -list_float = lambda x: [float(v) for v in x.split(',')] if ',' in x else float(x) +list_str = lambda x: [str(v) for v in x.split(',')] if isinstance(x, str) and ',' in x else str(x) +list_int = lambda x: [int(v) for v in x.split(',')] if isinstance(x, str) and ',' in x else int(x) +list_float = lambda x: [float(v) for v in x.split(',')] if isinstance(x, str) and ',' in x else float(x) diff --git a/pyg_spectral/nn/conv/clenshaw_conv.py b/pyg_spectral/nn/conv/clenshaw_conv.py index 82b6fd9..5ef1518 100644 --- a/pyg_spectral/nn/conv/clenshaw_conv.py +++ b/pyg_spectral/nn/conv/clenshaw_conv.py @@ -12,6 +12,7 @@ from pyg_spectral.utils import get_laplacian +# TODO: rename ClenshawConv class ClenhawConv(MessagePassing): r"""Convolutional layer with ClenShaw GCN. paper: Clenshaw Graph Neural Networks