diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..d13ad68caab51939fa9752a0780a0073c1653743 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,18 @@ +# Git LFS — track large model / data artifacts so they don't bloat git history +# and can be pushed to Hugging Face (which requires LFS for large files). +# +# These cover: LightGCN checkpoints, Word2Vec models, LightGBM pickles, +# cached scores/features, submission CSVs, and the paper-content embedding. +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.csv filter=lfs diff=lfs merge=lfs -text +data_and_docs/*.txt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.xdv filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..f48352b99a93fd792cb55d50fddf26cc6d1fb0df --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# ---- Python ---- +__pycache__/ +*.py[cod] +*$py.class +*.egg-info/ +.ipynb_checkpoints/ + +# ---- OS / editor junk ---- +.DS_Store +Thumbs.db +desktop.ini +.vscode/ +.idea/ +.claude/ + +# ---- Tool caches (regenerable) ---- +scripts/.cache/ +.trash-*/ + +# ---- Submission archives: never commit the zip into its own source repo ---- +*.zip + +# ---- Paper/PPT preview thumbnails (regenerable from their PDFs) ---- +*_page-*.png + +# ---- Rendered diagrams are regenerable from docs/diagrams/src/ ---- +# (kept small; not ignored — but pdf/svg can be rebuilt via scripts/render_diagrams.sh) diff --git a/.understand-anything/.understandignore b/.understand-anything/.understandignore new file mode 100644 index 0000000000000000000000000000000000000000..89326f8af6b5aadb694832440ace600ae56a5f83 --- /dev/null +++ b/.understand-anything/.understandignore @@ -0,0 +1,72 @@ +# .understandignore — patterns for files/dirs to exclude from analysis +# Tailored for this CS3319 ML experiment repo: understand-anything is about +# CODE ARCHITECTURE, so we keep code (*.py), docs (*.md) and config, and drop +# ALL binary/data/result artifacts (scores, embeddings, checkpoints, submissions, figure renders). +# Syntax: same as .gitignore. + +# ── Built-in defaults already cover: node_modules/ .git/ dist/ build/ obj/ *.lock *.min.js ── + +# ── Binary / data artifacts (ML results, not architecture) ── +*.npy +*.npz +*.model +*.pkl +*.pt +*.pth +*.bin +*.h5 +*.safetensors +*.parquet +*.feather +*.csv +*.tsv +*.pdf +*.png +*.jpg +*.jpeg +*.svg +*.gif +*.bmp +*.webp +*.ico +*.zip +*.tar +*.gz +*.7z +*.pickle + +# ── Large raw data (graph edges + USE embeddings) ── +data_and_docs/*.txt +data_and_docs/*.pkl +data_and_docs/*.npy + +# ── Result / artifact directories (scores, weights, submissions) ── +validation_runs/ +cached_scores/ +checkpoints/ +submissions/ +manifests/ +PPT/ + +# ── Generated figure renders (keep the plotting SCRIPTS, drop outputs) ── +figures_paper/pdf/ +figures_paper/png/ +figures_paper/svg/ +figures_paper/data/ +figures_v2/ +code/figures/**/*.pdf +code/figures/**/*.png +code/figures/**/*.svg +code/figures/**/*.jpg + +# ── Harness / paper-template / scratch (not project code) ── +.claude/ +.understand-anything/ +ACM_Conference_Proceedings_Primary_Article_Template/ + +# ── OS / editor cruft ── +__pycache__/ +*.pyc +.DS_Store +Thumbs.db +*.log diff --git a/.understand-anything/config.json b/.understand-anything/config.json new file mode 100644 index 0000000000000000000000000000000000000000..38fddffcb26785d66a67e68345689473ca227ecf --- /dev/null +++ b/.understand-anything/config.json @@ -0,0 +1 @@ +{"outputLanguage":"zh"} \ No newline at end of file diff --git a/.understand-anything/fingerprints.json b/.understand-anything/fingerprints.json new file mode 100644 index 0000000000000000000000000000000000000000..1d77d45410c9fae788dd666ead223ac17ca10c8f --- /dev/null +++ b/.understand-anything/fingerprints.json @@ -0,0 +1,8508 @@ +{ + "version": "1.0.0", + "gitCommitHash": "non-git-local", + "generatedAt": "2026-06-18T04:12:18.757Z", + "files": { + "CLAUDE_zh.md": { + "filePath": "CLAUDE_zh.md", + "contentHash": "dea0cb86aa98a6f0a8542841aeda19151c94aea2c22909b72ccede52d86264e4", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 207, + "hasStructuralAnalysis": true + }, + "CLAUDE.md": { + "filePath": "CLAUDE.md", + "contentHash": "3df64f9aa18e8a9165c7ba4bf93a5009604c27a9614623db13ba699529a8d40e", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 219, + "hasStructuralAnalysis": true + }, + "code/compare_gnn.py": { + "filePath": "code/compare_gnn.py", + "contentHash": "f12d497d020557d0167bba1f89550bdbb9178164b35a3b037369c41017a25b0c", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "exported": true, + "lineCount": 4 + }, + { + "name": "read_txt", + "params": [ + "f" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "build_data", + "params": [ + "edges_df" + ], + "exported": true, + "lineCount": 13 + }, + { + "name": "sample_hard_neg", + "params": [ + "n" + ], + "exported": true, + "lineCount": 21 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "evaluate", + "params": [ + "model", + "data" + ], + "exported": true, + "lineCount": 11 + }, + { + "name": "make_vanilla_lgcn", + "params": [ + "edim", + "nlayers" + ], + "exported": true, + "lineCount": 26 + }, + { + "name": "make_learnw_lgcn", + "params": [ + "edim", + "nlayers" + ], + "exported": true, + "lineCount": 27 + }, + { + "name": "make_gat_lgcn", + "params": [ + "edim", + "nlayers", + "heads" + ], + "exported": true, + "lineCount": 26 + }, + { + "name": "make_sage_lgcn", + "params": [ + "edim", + "nlayers" + ], + "exported": true, + "lineCount": 26 + }, + { + "name": "make_deep_lgcn", + "params": [ + "edim", + "nlayers" + ], + "exported": true, + "lineCount": 26 + }, + { + "name": "make_wide_lgcn", + "params": [ + "edim", + "nlayers" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "run_trial", + "params": [ + "name", + "make_fn", + "epochs" + ], + "exported": true, + "lineCount": 34 + } + ], + "classes": [ + { + "name": "MeanAggLayer", + "methods": [ + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 13 + }, + { + "name": "GATAggLayer", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 13 + }, + { + "name": "SAGEAggLayer", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 10 + } + ], + "imports": [ + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "time", + "specifiers": [ + "time" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + }, + { + "source": "torch_geometric.nn", + "specifiers": [ + "GATv2Conv", + "HeteroConv", + "SAGEConv" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "sample_hard_neg", + "cos_sim", + "evaluate", + "MeanAggLayer", + "GATAggLayer", + "SAGEAggLayer", + "make_vanilla_lgcn", + "make_learnw_lgcn", + "make_gat_lgcn", + "make_sage_lgcn", + "make_deep_lgcn", + "make_wide_lgcn", + "run_trial" + ], + "totalLines": 415, + "hasStructuralAnalysis": true + }, + "code/content_rich_ablation.py": { + "filePath": "code/content_rich_ablation.py", + "contentHash": "fa42636155d5fea1014bbddcdb26f84c63211afcd71fedee52622ac1d8929c53", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "fit_lgb_oof", + "params": [ + "X", + "y", + "seed", + "n_splits", + "ranker_like" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 19 + }, + { + "name": "content_rich_features", + "params": [ + "root", + "pairs", + "builder" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 76 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 73 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_module", + "best_f1", + "fit_lgb_oof", + "content_rich_features", + "main" + ], + "totalLines": 209, + "hasStructuralAnalysis": true + }, + "code/error_group_calibration.py": { + "filePath": "code/error_group_calibration.py", + "contentHash": "6f022fb4f5867b97a785bcaffb66a08108e663ec9015e2aedca3c5e5bb78d61b", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 2 + }, + { + "name": "prf", + "params": [ + "y", + "pred" + ], + "returnType": "tuple[float, float, float, int, int, int]", + "exported": true, + "lineCount": 10 + }, + { + "name": "best_f1", + "params": [ + "y", + "score" + ], + "returnType": "tuple[float, float, float, float, float]", + "exported": true, + "lineCount": 6 + }, + { + "name": "score_at_threshold", + "params": [ + "y", + "score", + "th" + ], + "returnType": "dict", + "exported": true, + "lineCount": 13 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "zscore", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "author_rank01", + "params": [ + "pairs", + "score" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 9 + }, + { + "name": "author_rank_position", + "params": [ + "pairs", + "score", + "descending" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 10 + }, + { + "name": "score_features", + "params": [ + "scores", + "prefix", + "pairs" + ], + "returnType": "tuple[np.ndarray, list[str]]", + "exported": true, + "lineCount": 5 + }, + { + "name": "fit_lgb_oof", + "params": [ + "X", + "y", + "seed", + "n_splits", + "train_mask", + "params" + ], + "returnType": "tuple[np.ndarray, list[lgb.LGBMClassifier]]", + "exported": true, + "lineCount": 33 + }, + { + "name": "fit_full_lgb", + "params": [ + "X", + "y", + "seed", + "params" + ], + "returnType": "lgb.LGBMClassifier", + "exported": true, + "lineCount": 18 + }, + { + "name": "average_predict", + "params": [ + "models", + "X" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 6 + }, + { + "name": "bucket_cut", + "params": [ + "values", + "name", + "bins" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 7 + }, + { + "name": "bucket_quantile", + "params": [ + "values", + "name", + "q" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "load_submission_pred", + "params": [ + "path" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "write_submission", + "params": [ + "path", + "score", + "known", + "threshold", + "ratio" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 11 + }, + { + "name": "write_group_submission", + "params": [ + "path", + "score", + "groups", + "thresholds", + "known" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 14 + }, + { + "name": "group_threshold", + "params": [ + "y", + "score", + "groups" + ], + "returnType": "tuple[dict[str, float], np.ndarray, dict]", + "exported": true, + "lineCount": 18 + }, + { + "name": "summarize_pred", + "params": [ + "name", + "y", + "score", + "pred", + "path", + "anchor_pred" + ], + "returnType": "dict", + "exported": true, + "lineCount": 14 + }, + { + "name": "build_feature_names", + "params": [ + "selected", + "rw_names" + ], + "returnType": "list[str]", + "exported": true, + "lineCount": 22 + }, + { + "name": "build_val_test_context", + "params": [ + "root", + "split_seed", + "main_val_score_file" + ], + "exported": true, + "lineCount": 113 + }, + { + "name": "error_analysis", + "params": [ + "ctx", + "pred", + "out_dir" + ], + "returnType": "None", + "exported": true, + "lineCount": 38 + }, + { + "name": "add_agreement_features", + "params": [ + "ctx" + ], + "returnType": "tuple[np.ndarray, np.ndarray, list[str], pd.DataFrame]", + "exported": true, + "lineCount": 62 + }, + { + "name": "boundary_features", + "params": [ + "ctx", + "agreement", + "agreement_test" + ], + "returnType": "tuple[np.ndarray, np.ndarray, list[str]]", + "exported": true, + "lineCount": 64 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 211 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "warnings", + "specifiers": [ + "warnings" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "sklearn.inspection", + "specifiers": [ + "permutation_importance" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "f1_score", + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold", + "train_test_split" + ] + } + ], + "exports": [ + "load_module", + "read_txt", + "prf", + "best_f1", + "score_at_threshold", + "rank01", + "zscore", + "author_rank01", + "author_rank_position", + "score_features", + "fit_lgb_oof", + "fit_full_lgb", + "average_predict", + "bucket_cut", + "bucket_quantile", + "load_submission_pred", + "write_submission", + "write_group_submission", + "group_threshold", + "summarize_pred", + "build_feature_names", + "build_val_test_context", + "error_analysis", + "add_agreement_features", + "boundary_features", + "main" + ], + "totalLines": 801, + "hasStructuralAnalysis": true + }, + "code/evaluate_val_checkpoints.py": { + "filePath": "code/evaluate_val_checkpoints.py", + "contentHash": "09530e2c50eea2883e10996f5b82625f7f365823b828d2086cafe7752ecd5387", + "functions": [ + { + "name": "load_train_module", + "params": [ + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "best_f1", + "params": [ + "labels", + "scores" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "infer_layers", + "params": [ + "path", + "state" + ], + "returnType": "int", + "exported": true, + "lineCount": 11 + }, + { + "name": "score_model", + "params": [ + "module", + "model", + "data", + "pairs", + "mode", + "batch_size" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 20 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 76 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "re", + "specifiers": [ + "re" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + } + ], + "exports": [ + "load_train_module", + "best_f1", + "infer_layers", + "score_model", + "main" + ], + "totalLines": 148, + "hasStructuralAnalysis": true + }, + "code/extra_score_sources_ablation.py": { + "filePath": "code/extra_score_sources_ablation.py", + "contentHash": "7711c3b94c77750594b0c47745a4523ad9eced5658afce8947178b19c2318f0c", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "zscore", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "score_to_features", + "params": [ + "scores", + "prefix", + "pairs" + ], + "returnType": "tuple[np.ndarray, list[str]]", + "exported": true, + "lineCount": 10 + }, + { + "name": "fit_lgb_oof", + "params": [ + "X", + "y", + "seed", + "n_splits" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 19 + }, + { + "name": "content_mean_score", + "params": [ + "root", + "pairs", + "builder" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 18 + }, + { + "name": "train_mf_bpr_score", + "params": [ + "root", + "train_refs", + "val_pairs", + "out_dir", + "device", + "seed", + "dim", + "epochs" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 48 + }, + { + "name": "train_ranker_oof", + "params": [ + "X", + "y", + "pairs", + "seed", + "out_dir" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 31 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 84 + } + ], + "classes": [ + { + "name": "MF", + "methods": [ + "__init__", + "score" + ], + "properties": [], + "exported": true, + "lineCount": 14 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "GroupKFold", + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_module", + "best_f1", + "rank01", + "zscore", + "score_to_features", + "fit_lgb_oof", + "content_mean_score", + "MF", + "train_mf_bpr_score", + "train_ranker_oof", + "main" + ], + "totalLines": 287, + "hasStructuralAnalysis": true + }, + "code/figures/fig1_dataset_overview.py": { + "filePath": "code/figures/fig1_dataset_overview.py", + "contentHash": "f216f8c1f11d61c6068daea6b43f0cad74d54b687c0c0a5202f302f1d5e49571", + "functions": [ + { + "name": "plot_ccdf", + "params": [ + "deg", + "ax", + "color", + "title" + ], + "exported": true, + "lineCount": 18 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save", + "C" + ] + } + ], + "exports": [ + "plot_ccdf" + ], + "totalLines": 63, + "hasStructuralAnalysis": true + }, + "code/figures/fig10_rw_ensemble_size.py": { + "filePath": "code/figures/fig10_rw_ensemble_size.py", + "contentHash": "d906d4aed0ad7bc3f0488b86b93b597143b964cf8462c1d20b379e58c3f15051", + "functions": [], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save", + "C" + ] + } + ], + "exports": [], + "totalLines": 40, + "hasStructuralAnalysis": true + }, + "code/figures/fig2_framework.py": { + "filePath": "code/figures/fig2_framework.py", + "contentHash": "c5f9f13bd3df456e7b27e8055dbce517de2053fe9792471e08f7699fda917b42", + "functions": [ + { + "name": "box", + "params": [ + "x", + "y", + "w", + "h", + "text", + "color", + "fc_alpha", + "fs" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "arrow", + "params": [ + "x1", + "y1", + "x2", + "y2" + ], + "exported": true, + "lineCount": 2 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "matplotlib.patches", + "specifiers": [ + "FancyBboxPatch", + "FancyArrowPatch" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save", + "C" + ] + } + ], + "exports": [ + "box", + "arrow" + ], + "totalLines": 56, + "hasStructuralAnalysis": true + }, + "code/figures/fig3_progression.py": { + "filePath": "code/figures/fig3_progression.py", + "contentHash": "a2fdcd3fbb7f3408a177148651ee94cc1d57b25d23cc2b8a23357932f5ba680a", + "functions": [], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save", + "C" + ] + } + ], + "exports": [], + "totalLines": 60, + "hasStructuralAnalysis": true + }, + "code/figures/fig4_highorder_ablation.py": { + "filePath": "code/figures/fig4_highorder_ablation.py", + "contentHash": "8feeb87473d5ab81327d30c4e25e56c7ab6117200c2fdd5bd34e6cfa5a593f8a", + "functions": [], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save", + "C" + ] + } + ], + "exports": [], + "totalLines": 49, + "hasStructuralAnalysis": true + }, + "code/figures/fig5_pr_roc.py": { + "filePath": "code/figures/fig5_pr_roc.py", + "contentHash": "9b542179bda62debd135fc873a655dd72a4a4b088c3372a6f100f8630a4233cc", + "functions": [], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_curve", + "auc", + "average_precision_score" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save", + "C" + ] + } + ], + "exports": [], + "totalLines": 62, + "hasStructuralAnalysis": true + }, + "code/figures/fig6_feature_contribution.py": { + "filePath": "code/figures/fig6_feature_contribution.py", + "contentHash": "abbf12c651138d443b829c26db7e0d5cff1f88148f3272ac7cc2ce10b858db4e", + "functions": [], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save", + "C" + ] + } + ], + "exports": [], + "totalLines": 49, + "hasStructuralAnalysis": true + }, + "code/figures/fig7_error_analysis.py": { + "filePath": "code/figures/fig7_error_analysis.py", + "contentHash": "8c52f63f42e962af68838a279de4b6740030d13a2c95f668f7e1ca4726d6b14e", + "functions": [ + { + "name": "plot_buckets", + "params": [ + "ax", + "btype", + "color", + "title" + ], + "exported": true, + "lineCount": 11 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "sklearn.calibration", + "specifiers": [ + "calibration_curve" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save", + "C" + ] + } + ], + "exports": [ + "plot_buckets" + ], + "totalLines": 72, + "hasStructuralAnalysis": true + }, + "code/figures/fig8_lgcn_ensemble_correlation.py": { + "filePath": "code/figures/fig8_lgcn_ensemble_correlation.py", + "contentHash": "7504e1f6e20347b017154153a02e79448c9a0fa09f652fe6238baa2874ddc5ca", + "functions": [], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "glob", + "specifiers": [ + "glob" + ] + }, + { + "source": "re", + "specifiers": [ + "re" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "seaborn", + "specifiers": [ + "sns" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save" + ] + } + ], + "exports": [], + "totalLines": 35, + "hasStructuralAnalysis": true + }, + "code/figures/fig9_lgcn_hyperparam.py": { + "filePath": "code/figures/fig9_lgcn_hyperparam.py", + "contentHash": "396f3d447d6fc95fa4df6a6c1fd1f11cf89eb027f49553df54b30303eddbd407", + "functions": [ + { + "name": "parse", + "params": [ + "run" + ], + "exported": true, + "lineCount": 3 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "re", + "specifiers": [ + "re" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "seaborn", + "specifiers": [ + "sns" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "plot_style", + "specifiers": [ + "apply", + "save", + "C" + ] + } + ], + "exports": [ + "parse" + ], + "totalLines": 51, + "hasStructuralAnalysis": true + }, + "code/figures/gen_val_labels.py": { + "filePath": "code/figures/gen_val_labels.py", + "contentHash": "edf9c96a14f7585fe5c5f10cffb6cecb155b3b2c4b38ed7812d508ab22c6c479", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 7 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 30 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + } + ], + "exports": [ + "load_module", + "main" + ], + "totalLines": 66, + "hasStructuralAnalysis": true + }, + "code/figures/plot_style.py": { + "filePath": "code/figures/plot_style.py", + "contentHash": "ef709cdc060a0d41b8818288702f34bfe7ff3e47db3218c9cd381eec2a218f97", + "functions": [ + { + "name": "apply", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 27 + }, + { + "name": "save", + "params": [ + "fig", + "name", + "out_dir" + ], + "returnType": "None", + "exported": true, + "lineCount": 7 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "matplotlib", + "specifiers": [ + "mpl" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "seaborn", + "specifiers": [ + "sns" + ] + } + ], + "exports": [ + "apply", + "save" + ], + "totalLines": 54, + "hasStructuralAnalysis": true + }, + "code/generate_conservative_rw_blends.py": { + "filePath": "code/generate_conservative_rw_blends.py", + "contentHash": "6ee2cdff1f0898eb9976e334c8ff7b1286ddf13edaf79b8e6cf2fb5fc73dd521", + "functions": [ + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "write_ratio_submission", + "params": [ + "name", + "score", + "ratio", + "reference" + ], + "returnType": "dict", + "exported": true, + "lineCount": 9 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 35 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + } + ], + "exports": [ + "rank01", + "write_ratio_submission", + "main" + ], + "totalLines": 72, + "hasStructuralAnalysis": true + }, + "code/generate_content_rich_submission.py": { + "filePath": "code/generate_content_rich_submission.py", + "contentHash": "f0ab5dc7bf261c09c45977ecb321bfe7018d3e79091d0c0841030e2fb13eb4da", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "make_subs", + "params": [ + "root", + "out_dir", + "score", + "ratios" + ], + "returnType": "None", + "exported": true, + "lineCount": 14 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 86 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + } + ], + "exports": [ + "load_module", + "make_subs", + "main" + ], + "totalLines": 128, + "hasStructuralAnalysis": true + }, + "code/generate_dot_submission.py": { + "filePath": "code/generate_dot_submission.py", + "contentHash": "3bc77179a8b8d36f56dfca05e1dd8a4e2d55e29058e63f0af96008f0b00e70a0", + "functions": [ + { + "name": "read_txt", + "params": [ + "path" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "build", + "params": [ + "root", + "device" + ], + "exported": true, + "lineCount": 33 + }, + { + "name": "predict_dot", + "params": [ + "model", + "data", + "pairs", + "batch_size" + ], + "exported": true, + "lineCount": 9 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "write", + "params": [ + "scores", + "known", + "out_dir", + "prefix", + "ratios" + ], + "exported": true, + "lineCount": 12 + }, + { + "name": "main", + "params": [], + "exported": true, + "lineCount": 47 + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "methods": [ + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 15 + }, + { + "name": "LightGCN", + "methods": [ + "__init__", + "encode" + ], + "properties": [], + "exported": true, + "lineCount": 16 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + } + ], + "exports": [ + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "build", + "predict_dot", + "rank01", + "write", + "main" + ], + "totalLines": 188, + "hasStructuralAnalysis": true + }, + "code/generate_ens6_submission.py": { + "filePath": "code/generate_ens6_submission.py", + "contentHash": "d8a6b7a234acbd9521baa4411428007ab0d9379f86816245446246e5efed26ec", + "functions": [ + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 6 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 3 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "build_features", + "params": [ + "data_dir", + "num_authors", + "num_papers" + ], + "exported": true, + "lineCount": 43 + }, + { + "name": "build_data", + "params": [ + "parts", + "num_authors", + "num_papers", + "device" + ], + "exported": true, + "lineCount": 24 + }, + { + "name": "predict", + "params": [ + "model", + "data", + "pairs", + "batch_size" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 11 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 66 + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "methods": [ + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 23 + }, + { + "name": "LightGCN", + "methods": [ + "__init__", + "encode" + ], + "properties": [], + "exported": true, + "lineCount": 22 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + } + ], + "exports": [ + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "cos_sim", + "build_features", + "build_data", + "predict", + "main" + ], + "totalLines": 264, + "hasStructuralAnalysis": true + }, + "code/generate_extra_bprmf_submission.py": { + "filePath": "code/generate_extra_bprmf_submission.py", + "contentHash": "2adfa175c095195f5ba09353962601726b63f6e4c233597f76a63acba033a860", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "train_mf_test_scores", + "params": [ + "extra", + "root", + "train_refs", + "test_pairs", + "out_dir", + "device", + "seed", + "dim", + "epochs" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 42 + }, + { + "name": "make_subs", + "params": [ + "root", + "out_dir", + "score", + "ratios" + ], + "returnType": "None", + "exported": true, + "lineCount": 14 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 87 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + } + ], + "exports": [ + "load_module", + "train_mf_test_scores", + "make_subs", + "main" + ], + "totalLines": 175, + "hasStructuralAnalysis": true + }, + "code/generate_large_ensemble_submission.py": { + "filePath": "code/generate_large_ensemble_submission.py", + "contentHash": "7fedbec7dc7e898ddabed3eb2f7b9232521f679747540320f7453f65e1e94b49", + "functions": [ + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 6 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 3 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "build_features", + "params": [ + "data_dir", + "num_papers" + ], + "exported": true, + "lineCount": 37 + }, + { + "name": "build_data", + "params": [ + "parts", + "num_authors", + "num_papers", + "device" + ], + "exported": true, + "lineCount": 24 + }, + { + "name": "predict", + "params": [ + "model", + "data", + "pairs", + "batch_size" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 11 + }, + { + "name": "checkpoint_weight", + "params": [ + "path" + ], + "returnType": "float", + "exported": true, + "lineCount": 16 + }, + { + "name": "percent_rank", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "write_threshold_submissions", + "params": [ + "scores", + "known_mask", + "output_dir", + "prefix", + "thresholds" + ], + "returnType": "None", + "exported": true, + "lineCount": 19 + }, + { + "name": "write_top_ratio_submissions", + "params": [ + "scores", + "known_mask", + "output_dir", + "prefix", + "ratios" + ], + "returnType": "None", + "exported": true, + "lineCount": 22 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 90 + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "methods": [ + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 23 + }, + { + "name": "LightGCN", + "methods": [ + "__init__", + "encode" + ], + "properties": [], + "exported": true, + "lineCount": 22 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + } + ], + "exports": [ + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "cos_sim", + "build_features", + "build_data", + "predict", + "checkpoint_weight", + "percent_rank", + "write_threshold_submissions", + "write_top_ratio_submissions", + "main" + ], + "totalLines": 343, + "hasStructuralAnalysis": true + }, + "code/generate_node2vec_deepwalk_submission.py": { + "filePath": "code/generate_node2vec_deepwalk_submission.py", + "contentHash": "034b4d6474941879150b98577a98b977f8b57c01004c63912d03140d0e636ff8", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "make_subs", + "params": [ + "root", + "out_dir", + "score", + "ratios", + "thresholds" + ], + "returnType": "None", + "exported": true, + "lineCount": 15 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 103 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "gensim.models", + "specifiers": [ + "Word2Vec" + ] + } + ], + "exports": [ + "load_module", + "make_subs", + "main" + ], + "totalLines": 147, + "hasStructuralAnalysis": true + }, + "code/generate_post95_submission.py": { + "filePath": "code/generate_post95_submission.py", + "contentHash": "4f40c5204b564b6bb3a4581977c0e2a43ed073f973f1487c695749da67dfb791", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 2 + }, + { + "name": "infer_layers", + "params": [ + "path", + "state" + ], + "returnType": "int", + "exported": true, + "lineCount": 11 + }, + { + "name": "infer_mode", + "params": [ + "score_path" + ], + "returnType": "str", + "exported": true, + "lineCount": 7 + }, + { + "name": "score_cache_path", + "params": [ + "root", + "split_seed", + "val_score_path" + ], + "returnType": "Path", + "exported": true, + "lineCount": 5 + }, + { + "name": "checkpoint_for_score", + "params": [ + "score_path" + ], + "returnType": "Path", + "exported": true, + "lineCount": 10 + }, + { + "name": "ensemble_member_scores", + "params": [ + "score_path" + ], + "returnType": "list[Path]", + "exported": true, + "lineCount": 7 + }, + { + "name": "score_checkpoint_on_test", + "params": [ + "root", + "split_seed", + "module", + "parts", + "data_cache", + "test_pairs", + "val_score_path", + "device", + "batch_size" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 51 + }, + { + "name": "score_val_path_on_test", + "params": [ + "root", + "split_seed", + "module", + "parts", + "data_cache", + "test_pairs", + "val_score_path", + "device", + "batch_size" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 25 + }, + { + "name": "select_variant_val_scores", + "params": [ + "post95", + "root", + "split_seed", + "y", + "max_cols" + ], + "returnType": "list[Path]", + "exported": true, + "lineCount": 13 + }, + { + "name": "variant_feature_matrix", + "params": [ + "post95", + "raw_scores" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 9 + }, + { + "name": "topk_content_similarity_fast", + "params": [ + "root", + "pairs", + "builder" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 31 + }, + { + "name": "make_submissions", + "params": [ + "root", + "out_dir", + "pred_score", + "ratios" + ], + "returnType": "None", + "exported": true, + "lineCount": 11 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 96 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "re", + "specifiers": [ + "re" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + } + ], + "exports": [ + "load_module", + "read_txt", + "infer_layers", + "infer_mode", + "score_cache_path", + "checkpoint_for_score", + "ensemble_member_scores", + "score_checkpoint_on_test", + "score_val_path_on_test", + "select_variant_val_scores", + "variant_feature_matrix", + "topk_content_similarity_fast", + "make_submissions", + "main" + ], + "totalLines": 332, + "hasStructuralAnalysis": true + }, + "code/generate_randomwalk_ensemble_submission.py": { + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "contentHash": "85503273cb6d19039772c5aa0aa9fdbd7bea61b815317ca66e1965293d25bc6a", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 7 + }, + { + "name": "make_subs", + "params": [ + "root", + "out_dir", + "version", + "score", + "ratios", + "thresholds" + ], + "returnType": "None", + "exported": true, + "lineCount": 23 + }, + { + "name": "aggregate", + "params": [ + "blocks" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 20 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 84 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "gensim.models", + "specifiers": [ + "Word2Vec" + ] + } + ], + "exports": [ + "load_module", + "make_subs", + "aggregate", + "main" + ], + "totalLines": 160, + "hasStructuralAnalysis": true + }, + "code/generate_randomwalk_single_submission.py": { + "filePath": "code/generate_randomwalk_single_submission.py", + "contentHash": "be99ecefecd9bffc01ae0dd0f5bb6842f6da88a6310e4a860d462c3a2178f05e", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 7 + }, + { + "name": "make_subs", + "params": [ + "root", + "out_dir", + "version", + "score", + "ratios", + "thresholds" + ], + "returnType": "None", + "exported": true, + "lineCount": 23 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 94 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "gensim.models", + "specifiers": [ + "Word2Vec" + ] + } + ], + "exports": [ + "load_module", + "make_subs", + "main" + ], + "totalLines": 148, + "hasStructuralAnalysis": true + }, + "code/high_order_graph_stack.py": { + "filePath": "code/high_order_graph_stack.py", + "contentHash": "1cbd662bf915e6d4c5bfed7a2a7f8cd2c693a7327ff9b52e1def314e11e745bb", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 7 + }, + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 2 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "row_norm", + "params": [ + "mat" + ], + "returnType": "sparse.csr_matrix", + "exported": true, + "lineCount": 6 + }, + { + "name": "topk_prune_rows", + "params": [ + "mat", + "k" + ], + "returnType": "sparse.csr_matrix", + "exported": true, + "lineCount": 21 + }, + { + "name": "extract_scores", + "params": [ + "mat", + "pairs" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "build_high_order", + "params": [ + "root", + "train_refs", + "pairs", + "tag", + "topk" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 49 + }, + { + "name": "build_high_order_directed", + "params": [ + "root", + "train_refs", + "pairs", + "tag", + "topk" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 52 + }, + { + "name": "fit_lgb_oof", + "params": [ + "X", + "y", + "seed", + "n_splits" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 20 + }, + { + "name": "fit_full_predict", + "params": [ + "X", + "y", + "Xt", + "seed" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 16 + }, + { + "name": "write_ratio_submission", + "params": [ + "path", + "score", + "ratio", + "known", + "anchor" + ], + "returnType": "dict", + "exported": true, + "lineCount": 11 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 116 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "gensim.models", + "specifiers": [ + "Word2Vec" + ] + }, + { + "source": "scipy", + "specifiers": [ + "sparse" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_module", + "read_txt", + "best_f1", + "row_norm", + "topk_prune_rows", + "extract_scores", + "build_high_order", + "build_high_order_directed", + "fit_lgb_oof", + "fit_full_predict", + "write_ratio_submission", + "main" + ], + "totalLines": 352, + "hasStructuralAnalysis": true + }, + "code/high_order_model_compare.py": { + "filePath": "code/high_order_model_compare.py", + "contentHash": "543e14429c671047397f87fcffaab954b7af0b12359a21416940a0d6632774b4", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 7 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "fit_oof", + "params": [ + "X", + "y", + "kind", + "seed", + "n_splits" + ], + "exported": true, + "lineCount": 60 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 65 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "xgboost", + "specifiers": [ + "xgb" + ] + }, + { + "source": "gensim.models", + "specifiers": [ + "Word2Vec" + ] + }, + { + "source": "sklearn.ensemble", + "specifiers": [ + "ExtraTreesClassifier", + "RandomForestClassifier" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_module", + "best_f1", + "fit_oof", + "main" + ], + "totalLines": 167, + "hasStructuralAnalysis": true + }, + "code/make_notebook_style_split.py": { + "filePath": "code/make_notebook_style_split.py", + "contentHash": "09246ce4cb12b4577cf1f5153cd311e80aa9d27ce42cea3731edaa62ca1a82cd", + "functions": [ + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 6 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 55 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + } + ], + "exports": [ + "read_txt", + "main" + ], + "totalLines": 87, + "hasStructuralAnalysis": true + }, + "code/node2vec_deepwalk_ablation.py": { + "filePath": "code/node2vec_deepwalk_ablation.py", + "contentHash": "28f09acee0846bd8296effa1ac4d99eb6545e885e70e55ee7af469f2c24727dd", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 2 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "zscore", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "fit_lgb_oof", + "params": [ + "X", + "y", + "seed", + "n_splits" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 19 + }, + { + "name": "score_to_features", + "params": [ + "scores", + "prefix", + "pairs" + ], + "returnType": "tuple[np.ndarray, list[str]]", + "exported": true, + "lineCount": 14 + }, + { + "name": "build_graph", + "params": [ + "root", + "train_refs" + ], + "returnType": "nx.Graph", + "exported": true, + "lineCount": 12 + }, + { + "name": "deepwalk_walks", + "params": [ + "G", + "walk_length", + "num_walks", + "seed" + ], + "returnType": "list[list[str]]", + "exported": true, + "lineCount": 19 + }, + { + "name": "train_deepwalk", + "params": [ + "G", + "out_path", + "dim", + "walk_length", + "num_walks", + "window", + "seed", + "workers" + ], + "returnType": "Word2Vec", + "exported": true, + "lineCount": 17 + }, + { + "name": "train_node2vec", + "params": [ + "G", + "out_path", + "dim", + "walk_length", + "num_walks", + "window", + "p", + "q", + "seed", + "workers" + ], + "returnType": "Word2Vec", + "exported": true, + "lineCount": 7 + }, + { + "name": "pair_scores", + "params": [ + "model", + "pairs", + "prefix", + "root", + "split_seed" + ], + "returnType": "tuple[np.ndarray, np.ndarray]", + "exported": true, + "lineCount": 25 + }, + { + "name": "build_current_best_features", + "params": [ + "root", + "split_seed", + "main_score_file" + ], + "exported": true, + "lineCount": 28 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 47 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "networkx", + "specifiers": [ + "nx" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "gensim.models", + "specifiers": [ + "Word2Vec" + ] + }, + { + "source": "node2vec", + "specifiers": [ + "Node2Vec" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "score_to_features", + "build_graph", + "deepwalk_walks", + "train_deepwalk", + "train_node2vec", + "pair_scores", + "build_current_best_features", + "main" + ], + "totalLines": 258, + "hasStructuralAnalysis": true + }, + "code/post95_ablation.py": { + "filePath": "code/post95_ablation.py", + "contentHash": "e692c211330447cae2bc682e50b52e67d289d7378c67c3afc2c5f0e82341eff1", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "prf", + "params": [ + "y", + "pred" + ], + "exported": true, + "lineCount": 8 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "zscore", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "fit_lgb_oof", + "params": [ + "X", + "y", + "seed", + "n_splits" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 19 + }, + { + "name": "bucket_series", + "params": [ + "values", + "name", + "bins" + ], + "returnType": "pd.Categorical", + "exported": true, + "lineCount": 7 + }, + { + "name": "error_analysis", + "params": [ + "y", + "score", + "pred", + "pairs", + "X_hand", + "score_lgcn", + "author_internal_rank", + "out_dir" + ], + "exported": true, + "lineCount": 45 + }, + { + "name": "group_threshold", + "params": [ + "y", + "score", + "groups" + ], + "exported": true, + "lineCount": 12 + }, + { + "name": "author_quota_tuning", + "params": [ + "y", + "score", + "pairs", + "author_degree" + ], + "exported": true, + "lineCount": 29 + }, + { + "name": "negative_evidence_features", + "params": [ + "X_hand", + "score_lgcn" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 17 + }, + { + "name": "topk_content_similarity", + "params": [ + "root", + "pairs", + "builder" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 23 + }, + { + "name": "load_lgcn_variant_scores", + "params": [ + "root", + "split_seed", + "y", + "max_cols" + ], + "exported": true, + "lineCount": 26 + }, + { + "name": "main", + "params": [], + "exported": true, + "lineCount": 70 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_module", + "best_f1", + "prf", + "rank01", + "zscore", + "fit_lgb_oof", + "bucket_series", + "error_analysis", + "group_threshold", + "author_quota_tuning", + "negative_evidence_features", + "topk_content_similarity", + "load_lgcn_variant_scores", + "main" + ], + "totalLines": 322, + "hasStructuralAnalysis": true + }, + "code/randomwalk_ensemble_ablation.py": { + "filePath": "code/randomwalk_ensemble_ablation.py", + "contentHash": "3bd48f640697c195a258ca11bd6034a17fd77f068a94d16083bd4438fca54c91", + "functions": [ + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 42 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "gensim.models", + "specifiers": [ + "Word2Vec" + ] + }, + { + "source": "randomwalk_systematic_ablation", + "specifiers": [ + "rw" + ] + }, + { + "source": "generate_randomwalk_ensemble_submission", + "specifiers": [ + "aggregate" + ] + } + ], + "exports": [ + "main" + ], + "totalLines": 62, + "hasStructuralAnalysis": true + }, + "code/randomwalk_one_ablation.py": { + "filePath": "code/randomwalk_one_ablation.py", + "contentHash": "ee001826471181c82b8f6b43e6f91fb1ebc25a8ac6ea3aef51b7269e473987f4", + "functions": [ + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 53 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "randomwalk_systematic_ablation", + "specifiers": [ + "rw" + ] + } + ], + "exports": [ + "main" + ], + "totalLines": 71, + "hasStructuralAnalysis": true + }, + "code/randomwalk_systematic_ablation.py": { + "filePath": "code/randomwalk_systematic_ablation.py", + "contentHash": "6cc62f09243f6512199bb19831f93130f05ba95bcee9a22bd36e960763d0ec02", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 2 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "zscore", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "fit_lgb_oof", + "params": [ + "X", + "y", + "seed", + "n_splits" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 20 + }, + { + "name": "small_configs", + "params": [], + "returnType": "list[RWConfig]", + "exported": true, + "lineCount": 9 + }, + { + "name": "graph_configs", + "params": [], + "returnType": "list[RWConfig]", + "exported": true, + "lineCount": 7 + }, + { + "name": "extra_configs", + "params": [], + "returnType": "list[RWConfig]", + "exported": true, + "lineCount": 9 + }, + { + "name": "build_graph", + "params": [ + "root", + "train_refs", + "graph_type" + ], + "returnType": "nx.Graph", + "exported": true, + "lineCount": 19 + }, + { + "name": "deepwalk_walks", + "params": [ + "G", + "walk_length", + "num_walks", + "seed" + ], + "returnType": "list[list[str]]", + "exported": true, + "lineCount": 19 + }, + { + "name": "train_model", + "params": [ + "G", + "cfg", + "out_dir", + "workers" + ], + "returnType": "Word2Vec", + "exported": true, + "lineCount": 32 + }, + { + "name": "embedding_arrays", + "params": [ + "model", + "train_refs" + ], + "returnType": "tuple[np.ndarray, np.ndarray]", + "exported": true, + "lineCount": 20 + }, + { + "name": "pair_feature_block", + "params": [ + "model", + "pairs", + "cfg", + "root", + "split_seed", + "train_refs" + ], + "returnType": "tuple[np.ndarray, list[str]]", + "exported": true, + "lineCount": 55 + }, + { + "name": "build_base_features", + "params": [ + "root", + "split_seed", + "main_score_file" + ], + "exported": true, + "lineCount": 28 + }, + { + "name": "train_full_predict", + "params": [ + "X", + "y", + "X_test", + "seed" + ], + "exported": true, + "lineCount": 15 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 123 + } + ], + "classes": [ + { + "name": "RWConfig", + "methods": [], + "properties": [ + "version_name", + "graph_type", + "method", + "dim", + "walk_length", + "num_walks", + "window", + "p", + "q", + "seed" + ], + "exported": true, + "lineCount": 11 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "dataclasses", + "specifiers": [ + "dataclass" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "networkx", + "specifiers": [ + "nx" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "gensim.models", + "specifiers": [ + "Word2Vec" + ] + }, + { + "source": "node2vec", + "specifiers": [ + "Node2Vec" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "RWConfig", + "small_configs", + "graph_configs", + "extra_configs", + "build_graph", + "deepwalk_walks", + "train_model", + "embedding_arrays", + "pair_feature_block", + "build_base_features", + "train_full_predict", + "main" + ], + "totalLines": 447, + "hasStructuralAnalysis": true + }, + "code/rich_randomwalk_stack.py": { + "filePath": "code/rich_randomwalk_stack.py", + "contentHash": "8bb47da2ee548afcc5d7061372fdd4b269d996e5e4b8c5c4d55519cf2c194549", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 7 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "fit_lgb_oof", + "params": [ + "X", + "y", + "seed", + "n_splits", + "leaves" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 20 + }, + { + "name": "fit_full_predict", + "params": [ + "X", + "y", + "Xt", + "seed", + "leaves" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 16 + }, + { + "name": "write_sub", + "params": [ + "path", + "score", + "known", + "anchor", + "ratio" + ], + "returnType": "tuple[float, int]", + "exported": true, + "lineCount": 6 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 103 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "gensim.models", + "specifiers": [ + "Word2Vec" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_module", + "best_f1", + "fit_lgb_oof", + "fit_full_predict", + "write_sub", + "main" + ], + "totalLines": 190, + "hasStructuralAnalysis": true + }, + "code/run_baseline.py": { + "filePath": "code/run_baseline.py", + "contentHash": "fdfa36a36bfce0d612a5853ffd7950ecf2b47ed0a48edb0ab609a89f29c24be2", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "file" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "sample_negative_edges", + "params": [ + "num_samples", + "num_authors", + "num_papers", + "existing_edges", + "device" + ], + "exported": true, + "lineCount": 12 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "exported": true, + "lineCount": 2 + } + ], + "classes": [ + { + "name": "HeteroMeanConv", + "methods": [ + "__init__", + "_key", + "reset_parameters", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 51 + }, + { + "name": "HeteroRecommender", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 38 + } + ], + "imports": [ + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "tqdm", + "specifiers": [ + "tqdm" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "f1_score", + "precision_recall_curve" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "HeteroMeanConv", + "HeteroRecommender", + "sample_negative_edges", + "cos_sim" + ], + "totalLines": 353, + "hasStructuralAnalysis": true + }, + "code/run_final.py": { + "filePath": "code/run_final.py", + "contentHash": "5ad3fea0f86eb3e7abd780951ea3ce112f4f86daabf6baabee7289fe3ad90c79", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "file" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "build_data", + "params": [ + "ref_edges_use", + "num_a", + "num_p", + "paper_feat", + "device" + ], + "exported": true, + "lineCount": 24 + }, + { + "name": "sample_hard_negatives", + "params": [ + "n_samples", + "existing_set", + "device" + ], + "exported": true, + "lineCount": 38 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "evaluate", + "params": [ + "model", + "data", + "val_df" + ], + "exported": true, + "lineCount": 17 + }, + { + "name": "predict_cos_batched", + "params": [ + "model", + "data", + "test_pairs", + "batch_size" + ], + "exported": true, + "lineCount": 14 + }, + { + "name": "train_model", + "params": [ + "seed", + "embed_dim", + "num_layers", + "lr", + "num_epochs", + "use_full_data" + ], + "exported": true, + "lineCount": 76 + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 40 + }, + { + "name": "LightGCNRecommender", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 43 + } + ], + "imports": [ + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "LightGCNLayer", + "LightGCNRecommender", + "sample_hard_negatives", + "cos_sim", + "evaluate", + "predict_cos_batched", + "train_model" + ], + "totalLines": 495, + "hasStructuralAnalysis": true + }, + "code/run_graph_features.py": { + "filePath": "code/run_graph_features.py", + "contentHash": "e98e72ba0437a75d15cfac0623e3168640f92378dabab44a3afb4671ce133bed", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "read_txt", + "params": [ + "file" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "log1p_norm", + "params": [ + "x" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "compute_features", + "params": [ + "pairs", + "batch_size" + ], + "exported": true, + "lineCount": 64 + } + ], + "classes": [], + "imports": [ + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "collections", + "specifiers": [ + "defaultdict" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "sklearn.preprocessing", + "specifiers": [ + "StandardScaler" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "f1_score", + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "sklearn.preprocessing", + "specifiers": [ + "normalize" + ] + }, + { + "source": "joblib", + "specifiers": [ + "joblib" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "log1p_norm", + "compute_features" + ], + "totalLines": 316, + "hasStructuralAnalysis": true + }, + "code/run_improved.py": { + "filePath": "code/run_improved.py", + "contentHash": "c88655a582782c240225abfeffeb11cd7b36b49fe8cf640653b4ccb25560a593", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "file" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "sample_hard_negatives", + "params": [ + "pos_batch_size", + "num_authors", + "num_papers", + "existing_set", + "device", + "pos_src" + ], + "exported": true, + "lineCount": 47 + }, + { + "name": "run_experiment", + "params": [ + "seed", + "hidden_dim", + "num_layers", + "lr", + "num_epochs", + "use_hard_neg" + ], + "exported": true, + "lineCount": 103 + }, + { + "name": "evaluate", + "params": [ + "model", + "data", + "val_df", + "device" + ], + "exported": true, + "lineCount": 23 + }, + { + "name": "predict_all", + "params": [ + "model", + "data", + "test_pairs", + "overlap_set", + "device" + ], + "exported": true, + "lineCount": 16 + } + ], + "classes": [ + { + "name": "ResidualHeteroConv", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 40 + }, + { + "name": "MLPDecoder", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 22 + }, + { + "name": "ImprovedHeteroGNN", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 43 + } + ], + "imports": [ + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "itertools", + "specifiers": [ + "itertools" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "torch.optim.lr_scheduler", + "specifiers": [ + "CosineAnnealingLR", + "ReduceLROnPlateau" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + }, + { + "source": "torch_geometric.nn", + "specifiers": [ + "SAGEConv", + "HeteroConv", + "Linear" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "f1_score", + "precision_recall_curve", + "roc_auc_score" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "log_norm", + "ResidualHeteroConv", + "MLPDecoder", + "ImprovedHeteroGNN", + "sample_hard_negatives", + "run_experiment", + "evaluate", + "predict_all" + ], + "totalLines": 597, + "hasStructuralAnalysis": true + }, + "code/run_lgcn_final.py": { + "filePath": "code/run_lgcn_final.py", + "contentHash": "5a0e33a4b2d1103fab467f45efbab1dfcf52d1e77d0d89e65cd8ce269d293279", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "file" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "build_data", + "params": [ + "ref_edges_use" + ], + "exported": true, + "lineCount": 16 + }, + { + "name": "sample_hard_negatives", + "params": [ + "n_samples" + ], + "exported": true, + "lineCount": 30 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "predict_batched", + "params": [ + "model", + "data", + "pairs", + "batch_size" + ], + "exported": true, + "lineCount": 12 + }, + { + "name": "train_lgcn", + "params": [ + "seed", + "embed_dim", + "num_layers", + "lr", + "epochs" + ], + "exported": true, + "lineCount": 32 + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 21 + }, + { + "name": "LightGCN", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 27 + } + ], + "imports": [ + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "sample_hard_negatives", + "LightGCNLayer", + "LightGCN", + "cos_sim", + "predict_batched", + "train_lgcn" + ], + "totalLines": 309, + "hasStructuralAnalysis": true + }, + "code/run_lgcn_v2.py": { + "filePath": "code/run_lgcn_v2.py", + "contentHash": "cdd212b2a4745435fb82967a4bef9a23dfdccbf49106a99405a60271a0e5fe94", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "file" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "build_data", + "params": [ + "ref_edges_use" + ], + "exported": true, + "lineCount": 15 + }, + { + "name": "sample_hard_negatives", + "params": [ + "n_samples" + ], + "exported": true, + "lineCount": 30 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "predict_cos", + "params": [ + "model", + "data", + "pairs", + "batch_size" + ], + "exported": true, + "lineCount": 12 + }, + { + "name": "train", + "params": [ + "seed", + "embed_dim", + "num_layers", + "lr", + "epochs" + ], + "exported": true, + "lineCount": 30 + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 21 + }, + { + "name": "LightGCN_Norm", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 31 + } + ], + "imports": [ + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "sample_hard_negatives", + "LightGCNLayer", + "LightGCN_Norm", + "cos_sim", + "predict_cos", + "train" + ], + "totalLines": 312, + "hasStructuralAnalysis": true + }, + "code/run_ultimate.py": { + "filePath": "code/run_ultimate.py", + "contentHash": "dc4d6bebeb9acf2337840bd1099193488d46ea8a3d027e3827674cdb7485afd9", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "file" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "build_data", + "params": [ + "ref_edges_use" + ], + "exported": true, + "lineCount": 18 + }, + { + "name": "sample_hard_negatives", + "params": [ + "n_samples" + ], + "exported": true, + "lineCount": 30 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "predict_cos_batched", + "params": [ + "model", + "data", + "pairs", + "batch_size" + ], + "exported": true, + "lineCount": 14 + }, + { + "name": "train_lightgcn", + "params": [ + "seed", + "embed_dim", + "num_layers", + "lr", + "num_epochs" + ], + "exported": true, + "lineCount": 30 + }, + { + "name": "train_sage", + "params": [ + "seed", + "hidden_dim", + "num_layers", + "lr", + "num_epochs" + ], + "exported": true, + "lineCount": 30 + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 30 + }, + { + "name": "LightGCNRecommender", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 32 + }, + { + "name": "ResidualHeteroConv", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 21 + }, + { + "name": "SAGERecommender", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 26 + } + ], + "imports": [ + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + }, + { + "source": "torch_geometric.nn", + "specifiers": [ + "SAGEConv", + "HeteroConv" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "sample_hard_negatives", + "cos_sim", + "LightGCNLayer", + "LightGCNRecommender", + "ResidualHeteroConv", + "SAGERecommender", + "predict_cos_batched", + "train_lightgcn", + "train_sage" + ], + "totalLines": 451, + "hasStructuralAnalysis": true + }, + "code/run_v2.py": { + "filePath": "code/run_v2.py", + "contentHash": "863f29a4065c114cfa69fda1e181d43fa4c5ffe364154bab0833a6f9508c496f", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "file" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "exported": true, + "lineCount": 3 + }, + { + "name": "sample_hard_negatives", + "params": [ + "n_samples", + "existing_set", + "device" + ], + "exported": true, + "lineCount": 38 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "evaluate", + "params": [ + "model", + "data_dict", + "val_df" + ], + "exported": true, + "lineCount": 19 + }, + { + "name": "predict_cos", + "params": [ + "model", + "data_dict", + "test_pairs" + ], + "exported": true, + "lineCount": 8 + }, + { + "name": "run_experiment", + "params": [ + "seed", + "hidden_dim", + "num_layers", + "lr", + "num_epochs", + "use_hard_neg" + ], + "exported": true, + "lineCount": 82 + }, + { + "name": "predict_batched", + "params": [ + "model", + "data_dict", + "test_pairs", + "batch_size" + ], + "exported": true, + "lineCount": 14 + } + ], + "classes": [ + { + "name": "GNNEncoder", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 43 + }, + { + "name": "DotDecoder", + "methods": [ + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 5 + }, + { + "name": "Recommender", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 21 + } + ], + "imports": [ + { + "source": "os", + "specifiers": [ + "os" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "torch.optim.lr_scheduler", + "specifiers": [ + "ReduceLROnPlateau" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + }, + { + "source": "torch_geometric.nn", + "specifiers": [ + "SAGEConv", + "HeteroConv" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "f1_score", + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "log_norm", + "GNNEncoder", + "DotDecoder", + "Recommender", + "sample_hard_negatives", + "cos_sim", + "evaluate", + "predict_cos", + "run_experiment", + "predict_batched" + ], + "totalLines": 521, + "hasStructuralAnalysis": true + }, + "code/score_level_meta_stack.py": { + "filePath": "code/score_level_meta_stack.py", + "contentHash": "658d4227750c49d0deadae70facbb55a10bea19248d74b4ffcae6bbb798da1d5", + "functions": [ + { + "name": "load_module", + "params": [ + "name", + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "prf", + "params": [ + "y", + "pred" + ], + "exported": true, + "lineCount": 8 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "zscore", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "author_rank01", + "params": [ + "pairs", + "score" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 9 + }, + { + "name": "add_score_block", + "params": [ + "pairs", + "score" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 2 + }, + { + "name": "load_sources", + "params": [ + "root", + "split_seed", + "n_val", + "n_test" + ], + "returnType": "list[tuple[str, np.ndarray, np.ndarray]]", + "exported": true, + "lineCount": 29 + }, + { + "name": "fit_oof_predict", + "params": [ + "X", + "y", + "X_test", + "kind", + "seed", + "n_splits" + ], + "exported": true, + "lineCount": 26 + }, + { + "name": "write_sub", + "params": [ + "path", + "score", + "known", + "anchor", + "th", + "ratio" + ], + "exported": true, + "lineCount": 9 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 86 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "sklearn.linear_model", + "specifiers": [ + "LogisticRegression" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_module", + "best_f1", + "prf", + "rank01", + "zscore", + "author_rank01", + "add_score_block", + "read_txt", + "load_sources", + "fit_oof_predict", + "write_sub", + "main" + ], + "totalLines": 237, + "hasStructuralAnalysis": true + }, + "code/search_dynamic_fusion.py": { + "filePath": "code/search_dynamic_fusion.py", + "contentHash": "85ee11d17991c1f3fcfef0ad5cd1540038ff1eaf2ac3cd2a4c326e35967e893f", + "functions": [ + { + "name": "load_train_module", + "params": [ + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "zscore", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 95 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "sklearn.linear_model", + "specifiers": [ + "LogisticRegression" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_train_module", + "best_f1", + "rank01", + "zscore", + "main" + ], + "totalLines": 141, + "hasStructuralAnalysis": true + }, + "code/search_val_fusion.py": { + "filePath": "code/search_val_fusion.py", + "contentHash": "02a08b2d58c89d24923630d0086a3023d668dc780011d37c737aeb74cd331f02", + "functions": [ + { + "name": "best_f1", + "params": [ + "labels", + "scores" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "zscore", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 90 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "sklearn.linear_model", + "specifiers": [ + "LogisticRegression" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "best_f1", + "rank01", + "zscore", + "main" + ], + "totalLines": 128, + "hasStructuralAnalysis": true + }, + "code/stack_rank_calibration.py": { + "filePath": "code/stack_rank_calibration.py", + "contentHash": "ff1eac4079f1758bdf5aaab3fd815a63abce43a168980880a3d2138d4364558c", + "functions": [ + { + "name": "load_lgcn_module", + "params": [ + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 2 + }, + { + "name": "best_f1", + "params": [ + "y", + "score" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 5 + }, + { + "name": "zscore", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "add_rank_features", + "params": [ + "pairs", + "score" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 13 + }, + { + "name": "fit_oof", + "params": [ + "X", + "y", + "model_kind", + "seed", + "n_splits" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 22 + }, + { + "name": "boundary_rerank", + "params": [ + "y", + "lgcn", + "stack", + "raw_th" + ], + "exported": true, + "lineCount": 15 + }, + { + "name": "main", + "params": [], + "exported": true, + "lineCount": 87 + } + ], + "classes": [ + { + "name": "ExplicitGraphFeatures", + "methods": [ + "__init__", + "transform" + ], + "properties": [], + "exported": true, + "lineCount": 93 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "sklearn.linear_model", + "specifiers": [ + "LogisticRegression" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "sklearn.model_selection", + "specifiers": [ + "StratifiedKFold" + ] + } + ], + "exports": [ + "load_lgcn_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "ExplicitGraphFeatures", + "add_rank_features", + "fit_oof", + "boundary_rerank", + "main" + ], + "totalLines": 295, + "hasStructuralAnalysis": true + }, + "code/train_dynamic_feature_fusion.py": { + "filePath": "code/train_dynamic_feature_fusion.py", + "contentHash": "af5a861c3ccb83f80f4dcb104be297ba5c09817ccaca5be3a2be2688427c7327", + "functions": [ + { + "name": "load_train_module", + "params": [ + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "path" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "rank01", + "params": [ + "x" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "main", + "params": [], + "exported": true, + "lineCount": 75 + } + ], + "classes": [ + { + "name": "FeatureBuilder", + "methods": [ + "__init__", + "sample_train_pairs", + "sample_task_pairs", + "transform" + ], + "properties": [], + "exported": true, + "lineCount": 155 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "lightgbm", + "specifiers": [ + "lgb" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + } + ], + "exports": [ + "load_train_module", + "read_txt", + "best_f1", + "rank01", + "FeatureBuilder", + "main" + ], + "totalLines": 283, + "hasStructuralAnalysis": true + }, + "code/train_val_hgt_bpr.py": { + "filePath": "code/train_val_hgt_bpr.py", + "contentHash": "e499e66786ca6fa81b46d52094263bbc198c01e20d3450302de88ddff2ae19ef", + "functions": [ + { + "name": "load_lgcn_module", + "params": [ + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "predict_scores", + "params": [ + "model", + "data", + "pairs", + "batch_size" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 10 + }, + { + "name": "train_one", + "params": [ + "args", + "lgcn", + "parts", + "data", + "seed", + "out_dir" + ], + "exported": true, + "lineCount": 51 + }, + { + "name": "main", + "params": [], + "exported": true, + "lineCount": 52 + } + ], + "classes": [ + { + "name": "HGTRecommender", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 40 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "torch_geometric.nn", + "specifiers": [ + "HGTConv" + ] + } + ], + "exports": [ + "load_lgcn_module", + "HGTRecommender", + "predict_scores", + "train_one", + "main" + ], + "totalLines": 189, + "hasStructuralAnalysis": true + }, + "code/train_val_lgcn_ensemble.py": { + "filePath": "code/train_val_lgcn_ensemble.py", + "contentHash": "f3e802e2d9e936fa0aba00d7610a2c3ab821a70badeca59147b812efb87a773d", + "functions": [ + { + "name": "set_seed", + "params": [ + "seed" + ], + "returnType": "None", + "exported": true, + "lineCount": 6 + }, + { + "name": "read_txt", + "params": [ + "path" + ], + "returnType": "list[list[int]]", + "exported": true, + "lineCount": 6 + }, + { + "name": "log_norm", + "params": [ + "x" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 3 + }, + { + "name": "cos_sim", + "params": [ + "a", + "b", + "eps" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 2 + }, + { + "name": "make_notebook_style_split", + "params": [ + "root", + "seed", + "train_frac" + ], + "exported": true, + "lineCount": 34 + }, + { + "name": "build_parts", + "params": [ + "root", + "split_dir", + "num_papers", + "split_seed", + "train_frac" + ], + "exported": true, + "lineCount": 69 + }, + { + "name": "build_data", + "params": [ + "parts", + "num_authors", + "num_papers", + "device", + "use_citation", + "use_coauthor" + ], + "exported": true, + "lineCount": 32 + }, + { + "name": "sample_hard_negatives", + "params": [ + "parts", + "n_samples", + "num_authors", + "num_papers", + "device" + ], + "exported": true, + "lineCount": 33 + }, + { + "name": "predict_scores", + "params": [ + "model", + "data", + "pairs", + "batch_size", + "mode", + "normalize_embeddings" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 29 + }, + { + "name": "best_f1", + "params": [ + "labels", + "scores" + ], + "returnType": "tuple[float, float, float]", + "exported": true, + "lineCount": 7 + }, + { + "name": "train_one", + "params": [ + "args", + "parts", + "data", + "seed", + "embed_dim", + "model_dir", + "score_dir" + ], + "exported": true, + "lineCount": 66 + }, + { + "name": "main", + "params": [], + "returnType": "None", + "exported": true, + "lineCount": 86 + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "methods": [ + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 22 + }, + { + "name": "LightGCN", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 32 + }, + { + "name": "LearnableWeightLightGCN", + "methods": [ + "__init__", + "encode" + ], + "properties": [], + "exported": true, + "lineCount": 19 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "pickle", + "specifiers": [ + "pkl" + ] + }, + { + "source": "random", + "specifiers": [ + "random" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "numpy.linalg", + "specifiers": [ + "norm" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + }, + { + "source": "torch_geometric.data", + "specifiers": [ + "HeteroData" + ] + } + ], + "exports": [ + "set_seed", + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "LearnableWeightLightGCN", + "cos_sim", + "make_notebook_style_split", + "build_parts", + "build_data", + "sample_hard_negatives", + "predict_scores", + "best_f1", + "train_one", + "main" + ], + "totalLines": 507, + "hasStructuralAnalysis": true + }, + "code/train_val_mf_bpr.py": { + "filePath": "code/train_val_mf_bpr.py", + "contentHash": "c3bf6a6e9ae4f70746ac91f190676ca82216233361efa51b76a667f02e53730b", + "functions": [ + { + "name": "best_f1", + "params": [ + "y", + "s" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "main", + "params": [], + "exported": true, + "lineCount": 66 + } + ], + "classes": [ + { + "name": "MF", + "methods": [ + "__init__", + "score" + ], + "properties": [], + "exported": true, + "lineCount": 16 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "roc_auc_score" + ] + } + ], + "exports": [ + "best_f1", + "MF", + "main" + ], + "totalLines": 111, + "hasStructuralAnalysis": true + }, + "code/train_val_sage_bpr.py": { + "filePath": "code/train_val_sage_bpr.py", + "contentHash": "dbc6e0c6f0af270cad6873583bc43ae832006523819f69175eb323867eaa7547", + "functions": [ + { + "name": "load_lgcn_module", + "params": [ + "path" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "predict_scores", + "params": [ + "model", + "data", + "pairs", + "batch_size" + ], + "returnType": "np.ndarray", + "exported": true, + "lineCount": 10 + }, + { + "name": "train_one", + "params": [ + "args", + "lgcn", + "parts", + "data", + "seed", + "out_dir" + ], + "exported": true, + "lineCount": 45 + }, + { + "name": "main", + "params": [], + "exported": true, + "lineCount": 52 + } + ], + "classes": [ + { + "name": "ResidualSAGE", + "methods": [ + "__init__", + "forward" + ], + "properties": [], + "exported": true, + "lineCount": 25 + }, + { + "name": "SAGERecommender", + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [], + "exported": true, + "lineCount": 19 + } + ], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "torch", + "specifiers": [ + "torch" + ] + }, + { + "source": "torch.nn", + "specifiers": [ + "nn" + ] + }, + { + "source": "torch.nn.functional", + "specifiers": [ + "F" + ] + }, + { + "source": "torch_geometric.nn", + "specifiers": [ + "HeteroConv", + "SAGEConv" + ] + } + ], + "exports": [ + "load_lgcn_module", + "ResidualSAGE", + "SAGERecommender", + "predict_scores", + "train_one", + "main" + ], + "totalLines": 189, + "hasStructuralAnalysis": true + }, + "data_and_docs/advice.md": { + "filePath": "data_and_docs/advice.md", + "contentHash": "1196d9fa674b043937e77328ea3f0f3c69dc69cc4996f9108d55bbcef392106f", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 469, + "hasStructuralAnalysis": true + }, + "data_and_docs/dataset.md": { + "filePath": "data_and_docs/dataset.md", + "contentHash": "7f374ae8d022c81212b5d2f4e6819ad15b335942451699cb5794b8527a0850c4", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 27, + "hasStructuralAnalysis": true + }, + "data_and_docs/project_description.md": { + "filePath": "data_and_docs/project_description.md", + "contentHash": "c2c8e455e87f58625cb91d3b484991b251f49c4d6edd6a4c9624d8029301bb2d", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 22, + "hasStructuralAnalysis": true + }, + "data_and_docs/project_evaluation.md": { + "filePath": "data_and_docs/project_evaluation.md", + "contentHash": "aea0fced29106e38d8faca16added390288e293c084241cc893617543f9249e8", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 15, + "hasStructuralAnalysis": true + }, + "data_and_docs/project-example-2026-pygver.ipynb": { + "filePath": "data_and_docs/project-example-2026-pygver.ipynb", + "contentHash": "1ddd25ae9bcec12aa1d509eb8eebbf8a1b14471c5d5461f064ae7985a5fe168a", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 1, + "hasStructuralAnalysis": false + }, + "data_and_docs/proposal.md": { + "filePath": "data_and_docs/proposal.md", + "contentHash": "6cb995553e0cfd47d99ba9a873b6c870ea9c7ae42f0b5eca2dbda1f35db78285", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 50, + "hasStructuralAnalysis": true + }, + "data_and_docs/references.md": { + "filePath": "data_and_docs/references.md", + "contentHash": "d7bca4d87662a3a4e44c2433db80347c55f4287cb7c0191c6ecd8961e8102d42", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 12, + "hasStructuralAnalysis": true + }, + "docs_first_principles/_fact_sheet.md": { + "filePath": "docs_first_principles/_fact_sheet.md", + "contentHash": "455ec9c61394e561178ad0c449eb30f42c98bef932f0d0d1291d26adaf59634d", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 288, + "hasStructuralAnalysis": true + }, + "docs_first_principles/00_README.md": { + "filePath": "docs_first_principles/00_README.md", + "contentHash": "e7855c2ae241a6f7f03446d6a99e831904d1922218837f1abf02c6480af06804", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 153, + "hasStructuralAnalysis": true + }, + "docs_first_principles/01_problem_and_dataset.md": { + "filePath": "docs_first_principles/01_problem_and_dataset.md", + "contentHash": "01734821cf269c64d660a92c51bb5170abae8c34d1ea977f2c09ef0000002b24", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 169, + "hasStructuralAnalysis": true + }, + "docs_first_principles/02_architecture_overview.md": { + "filePath": "docs_first_principles/02_architecture_overview.md", + "contentHash": "71513a16eb80be1c38c569c5196fbe7aa87120032b8992157e9898067b2579f0", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 237, + "hasStructuralAnalysis": true + }, + "docs_first_principles/03_data_flow_and_artifacts.md": { + "filePath": "docs_first_principles/03_data_flow_and_artifacts.md", + "contentHash": "ba3b2ef0d41b5bcfc66ecabc6a902a0c6698dcfa88cc239168bd7974a31eac0d", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 303, + "hasStructuralAnalysis": true + }, + "docs_first_principles/04_lightgcn_from_first_principles.md": { + "filePath": "docs_first_principles/04_lightgcn_from_first_principles.md", + "contentHash": "b7a2cdd4481fde05c56b64b06b12b298b1c56cd77c5da71ca3a3cda459765e8c", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 336, + "hasStructuralAnalysis": true + }, + "docs_first_principles/05_feature_stacking_and_lightgbm.md": { + "filePath": "docs_first_principles/05_feature_stacking_and_lightgbm.md", + "contentHash": "aea72cf417444ba690546cd6be0fbb5461205b821143b3425f1d90f0083972b3", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 243, + "hasStructuralAnalysis": true + }, + "docs_first_principles/06_random_walk_features.md": { + "filePath": "docs_first_principles/06_random_walk_features.md", + "contentHash": "8790cc39310581915cf2caae49f663b8c1d7de2e9db759339658d0a55dda572d", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 255, + "hasStructuralAnalysis": true + }, + "docs_first_principles/07_high_order_citation_propagation.md": { + "filePath": "docs_first_principles/07_high_order_citation_propagation.md", + "contentHash": "016d14bb49adc27c7fc5fc9b9616825e3f27b3ba4760c0f5fc403eb723e5a63e", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 358, + "hasStructuralAnalysis": true + }, + "docs_first_principles/08_calibration_and_rank_cutoff.md": { + "filePath": "docs_first_principles/08_calibration_and_rank_cutoff.md", + "contentHash": "7c5a1406753ddeb694bf610711c4a5bc2fbd1340268fff0cacf903b735254839", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 294, + "hasStructuralAnalysis": true + }, + "docs_first_principles/09_experiment_timeline.md": { + "filePath": "docs_first_principles/09_experiment_timeline.md", + "contentHash": "7fd00c9468d5e7ddd236b772527f53f5ec36953051cc84e17aba05b254ec17c5", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 142, + "hasStructuralAnalysis": true + }, + "docs_first_principles/10_code_map_and_entrypoints.md": { + "filePath": "docs_first_principles/10_code_map_and_entrypoints.md", + "contentHash": "3f51a13dc8c9dfcef26f3189bd8848023362faed4e773f67a8b0e4a2ddc8b52c", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 186, + "hasStructuralAnalysis": true + }, + "docs_first_principles/11_figures_and_paper_mapping.md": { + "filePath": "docs_first_principles/11_figures_and_paper_mapping.md", + "contentHash": "f7c1aa41fe2300bc30d64b1a9e693b2e90fb7b97c8fe46fe61c8402415decb37", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 368, + "hasStructuralAnalysis": true + }, + "docs_first_principles/12_reproduction_guide.md": { + "filePath": "docs_first_principles/12_reproduction_guide.md", + "contentHash": "31776812193206e3bf0088784f9546ecc7d0fe695bfe739db64918994869b966", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 325, + "hasStructuralAnalysis": true + }, + "docs_first_principles/13_common_questions_for_the_author.md": { + "filePath": "docs_first_principles/13_common_questions_for_the_author.md", + "contentHash": "4c26f5dd61adf8b7abba3fc92f45dfa305f9fab5255d1b6d28984e8b2f28bd3c", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 213, + "hasStructuralAnalysis": true + }, + "docs_first_principles/SUMMARY_FOR_PAPER.md": { + "filePath": "docs_first_principles/SUMMARY_FOR_PAPER.md", + "contentHash": "ee6494517e7d39f567f8f3e73d001ecebe0cb6d81d5331cfac27cec24448353c", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 311, + "hasStructuralAnalysis": true + }, + "env/conda-list-cs3319.txt": { + "filePath": "env/conda-list-cs3319.txt", + "contentHash": "522083a9a5b47e0daa6e5c042a6d174b73181528ab5af5ebe00592e18009d2d7", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 101, + "hasStructuralAnalysis": false + }, + "env/environment-cs3319.yml": { + "filePath": "env/environment-cs3319.yml", + "contentHash": "7a4000e707d4ecadf4a109b540a4d1a23f5022452e7838ef959a036104ce3757", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 107, + "hasStructuralAnalysis": true + }, + "env/requirements-minimal.txt": { + "filePath": "env/requirements-minimal.txt", + "contentHash": "cc354a7d9934dd38cf62f770726cf9f32be8953b13b0b56cc81d8020592fa199", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 11, + "hasStructuralAnalysis": false + }, + "figures_paper/README_figures.md": { + "filePath": "figures_paper/README_figures.md", + "contentHash": "91e36114d44cfd03b75645704e4a9805cfd25239f6831b852110453e3ed68867", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 116, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/fig1_graph_overview.py": { + "filePath": "figures_paper/scripts/fig1_graph_overview.py", + "contentHash": "d51c828d602d05479487ab36ee56ddd965c9ada84f97e1bdb12304455f8321eb", + "functions": [ + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 75 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "matplotlib.patches", + "specifiers": [ + "FancyBboxPatch", + "FancyArrowPatch", + "Circle", + "Rectangle" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL2", + "C" + ] + } + ], + "exports": [ + "make" + ], + "totalLines": 97, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/fig2_sparsity.py": { + "filePath": "figures_paper/scripts/fig2_sparsity.py", + "contentHash": "84adc650d6fd01295e749a3283e429d5df0d5c58a0a9b0a6c24a5c06ead193cb", + "functions": [ + { + "name": "_ccdf", + "params": [ + "deg" + ], + "exported": true, + "lineCount": 8 + }, + { + "name": "_panel_ccdf", + "params": [ + "ax", + "deg", + "color", + "title" + ], + "exported": true, + "lineCount": 9 + }, + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 48 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL2", + "MUTED", + "C" + ] + } + ], + "exports": [ + "_ccdf", + "_panel_ccdf", + "make" + ], + "totalLines": 92, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/fig3_roadmap.py": { + "filePath": "figures_paper/scripts/fig3_roadmap.py", + "contentHash": "1b3c7613c9d2eb134c72592ba4bfcf014b9cb6cda02d1042a61bdcf0cf41a319", + "functions": [ + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 58 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "matplotlib.patches", + "specifiers": [ + "FancyArrowPatch" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL2", + "C" + ] + } + ], + "exports": [ + "make" + ], + "totalLines": 91, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/fig4_architecture.py": { + "filePath": "figures_paper/scripts/fig4_architecture.py", + "contentHash": "dde47dd7d80fb58fec6850f03af66da1723fd2238ac441de980c6f75810057fe", + "functions": [ + { + "name": "_box", + "params": [ + "ax", + "x", + "y", + "w", + "h", + "text", + "color", + "fs", + "fc_alpha", + "weight" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "_arrow", + "params": [ + "ax", + "a", + "b", + "color", + "lw" + ], + "exported": true, + "lineCount": 2 + }, + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 55 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "matplotlib.patches", + "specifiers": [ + "FancyBboxPatch", + "FancyArrowPatch" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL2", + "C" + ] + } + ], + "exports": [ + "_box", + "_arrow", + "make" + ], + "totalLines": 88, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/fig5_ablation_highorder.py": { + "filePath": "figures_paper/scripts/fig5_ablation_highorder.py", + "contentHash": "fefd119af5d29e7182781fe8d4972e6e8bea0a19dcb7acd500771ebe543cfab3", + "functions": [ + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 60 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL1", + "C" + ] + } + ], + "exports": [ + "make" + ], + "totalLines": 97, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/fig6_rank_vs_threshold.py": { + "filePath": "figures_paper/scripts/fig6_rank_vs_threshold.py", + "contentHash": "b5edc8af680b9b95cca7665883c6526a5bb7817a24799a8ce19d51b36a1ae847", + "functions": [ + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 62 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL2", + "C" + ] + } + ], + "exports": [ + "make" + ], + "totalLines": 89, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/fig7_error_heatmap.py": { + "filePath": "figures_paper/scripts/fig7_error_heatmap.py", + "contentHash": "13490a59129f9bb5e6f6747c852bc748e386019364ff317a351d2e725188fad9", + "functions": [ + { + "name": "_bucket_order_key", + "params": [ + "b" + ], + "exported": true, + "lineCount": 11 + }, + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 47 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "seaborn", + "specifiers": [ + "sns" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL2" + ] + } + ], + "exports": [ + "_bucket_order_key", + "make" + ], + "totalLines": 93, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/figA1_hyperparam.py": { + "filePath": "figures_paper/scripts/figA1_hyperparam.py", + "contentHash": "fbd1d481b356838f0c12f42eab585c590e11985bbda1c41d042dcea89d66115b", + "functions": [ + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 32 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "re", + "specifiers": [ + "re" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "seaborn", + "specifiers": [ + "sns" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL2", + "C" + ] + } + ], + "exports": [ + "make" + ], + "totalLines": 52, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/figA2_rw_ablation.py": { + "filePath": "figures_paper/scripts/figA2_rw_ablation.py", + "contentHash": "8b20a7a08c39f461a03d6bc36fa2e33be1a65b416bf097ef67475c67f949564c", + "functions": [ + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 28 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "pandas", + "specifiers": [ + "pd" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL1", + "C" + ] + } + ], + "exports": [ + "make" + ], + "totalLines": 45, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/figA3_feature_importance.py": { + "filePath": "figures_paper/scripts/figA3_feature_importance.py", + "contentHash": "19b75b5116e7106891d459f20988725897545165a565351434c563047b73d32e", + "functions": [ + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 20 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL1", + "C" + ] + } + ], + "exports": [ + "make" + ], + "totalLines": 51, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/figA4_oof_pr.py": { + "filePath": "figures_paper/scripts/figA4_oof_pr.py", + "contentHash": "07b4a8503754f26aecb20461c13696cbd54486e1b3074932f1e225412d8cb663", + "functions": [ + { + "name": "make", + "params": [ + "root", + "out" + ], + "exported": true, + "lineCount": 37 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "numpy", + "specifiers": [ + "np" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "sklearn.metrics", + "specifiers": [ + "precision_recall_curve", + "average_precision_score" + ] + }, + { + "source": "style", + "specifiers": [ + "apply", + "save", + "COL2", + "C" + ] + } + ], + "exports": [ + "make" + ], + "totalLines": 62, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/make_all_figures.py": { + "filePath": "figures_paper/scripts/make_all_figures.py", + "contentHash": "080327f819dbb372ba21eed5f7d1445189a85f95b9729917f8685bdbc7f058ec", + "functions": [ + { + "name": "_load", + "params": [ + "fname", + "scripts" + ], + "exported": true, + "lineCount": 5 + }, + { + "name": "main", + "params": [], + "exported": true, + "lineCount": 25 + }, + { + "name": "_write_readme", + "params": [ + "root", + "results" + ], + "exported": true, + "lineCount": 42 + } + ], + "classes": [], + "imports": [ + { + "source": "argparse", + "specifiers": [ + "argparse" + ] + }, + { + "source": "importlib.util", + "specifiers": [ + "importlib.util" + ] + }, + { + "source": "sys", + "specifiers": [ + "sys" + ] + }, + { + "source": "traceback", + "specifiers": [ + "traceback" + ] + }, + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "style", + "specifiers": [ + "style" + ] + } + ], + "exports": [ + "_load", + "main", + "_write_readme" + ], + "totalLines": 120, + "hasStructuralAnalysis": true + }, + "figures_paper/scripts/style.py": { + "filePath": "figures_paper/scripts/style.py", + "contentHash": "cb5fcd1c89ee9972b6c2bc37eb2c915ef024a856cd5efe35eef395208afe5c8f", + "functions": [ + { + "name": "apply", + "params": [], + "exported": true, + "lineCount": 26 + }, + { + "name": "ensure_dirs", + "params": [ + "root" + ], + "exported": true, + "lineCount": 8 + }, + { + "name": "save", + "params": [ + "fig", + "name", + "out" + ], + "exported": true, + "lineCount": 6 + }, + { + "name": "stat_box", + "params": [ + "ax", + "x", + "y", + "s", + "fs" + ], + "exported": true, + "lineCount": 2 + } + ], + "classes": [], + "imports": [ + { + "source": "pathlib", + "specifiers": [ + "Path" + ] + }, + { + "source": "matplotlib", + "specifiers": [ + "mpl" + ] + }, + { + "source": "matplotlib.pyplot", + "specifiers": [ + "plt" + ] + }, + { + "source": "seaborn", + "specifiers": [ + "sns" + ] + } + ], + "exports": [ + "apply", + "ensure_dirs", + "save", + "stat_box" + ], + "totalLines": 68, + "hasStructuralAnalysis": true + }, + "notes/experiment_history.md": { + "filePath": "notes/experiment_history.md", + "contentHash": "3f855e1c17ccb27e23cb139e5c9bac37190611cebf78808ef74377055e47e4a1", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 320, + "hasStructuralAnalysis": true + }, + "README.md": { + "filePath": "README.md", + "contentHash": "06ef0213938ad8c32c3ed8c19346e6bd6b95815e3109c5d58ad0cd9376e13161", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 254, + "hasStructuralAnalysis": true + }, + "reports/exploration_summary.md": { + "filePath": "reports/exploration_summary.md", + "contentHash": "0fc1c7637d2db643f1c2373ad8d1f175b35b1a5e15d7c749c06d123416ff7502", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 862, + "hasStructuralAnalysis": true + }, + "reports/final_report.md": { + "filePath": "reports/final_report.md", + "contentHash": "1e3c6e04d13fd1b79df38dce06f9da042e142dd5ea0279f63ec53aa007253a5b", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 203, + "hasStructuralAnalysis": true + }, + "reports/paper_writing_guide.md": { + "filePath": "reports/paper_writing_guide.md", + "contentHash": "a78aa4e6642e5f474c612037b4b00bf27d5bd7b807b011e05d1926cb0ee80f9c", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 322, + "hasStructuralAnalysis": true + }, + "reports/preliminary_report.md": { + "filePath": "reports/preliminary_report.md", + "contentHash": "71ff77bbcf4746403dbee7d66bb5b543de5d44784de070a1734c4e489c388c24", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 176, + "hasStructuralAnalysis": true + }, + "WORKSPACE_STATUS.md": { + "filePath": "WORKSPACE_STATUS.md", + "contentHash": "1b18d0eab042a72a81b07baed6581ff784dda716af4e7e9d6ae820852e402e68", + "functions": [], + "classes": [], + "imports": [], + "exports": [], + "totalLines": 263, + "hasStructuralAnalysis": true + } + } +} \ No newline at end of file diff --git a/.understand-anything/intermediate/assembled-graph.json b/.understand-anything/intermediate/assembled-graph.json new file mode 100644 index 0000000000000000000000000000000000000000..3aeaa955afbcf2a480a662946495912910d5f32c --- /dev/null +++ b/.understand-anything/intermediate/assembled-graph.json @@ -0,0 +1,13883 @@ +{ + "version": "2.8.0", + "project": { + "name": "CS3319 Project 2 Final Deliverable", + "languages": [ + "python", + "markdown" + ], + "frameworks": [ + "numpy", + "pandas", + "scipy", + "scikit-learn", + "lightgbm", + "torch", + "torch-geometric", + "gensim", + "networkx", + "node2vec", + "matplotlib", + "seaborn" + ], + "description": "Author–paper link-prediction (reading recommendation) on a heterogeneous academic graph (6611 authors, 79937 papers). Two-stage stacking: Stage-1 score producers (LightGCN ensemble, BPR-MF, 7 DeepWalk/Node2Vec blocks, content profiles, explicit graph/meta-path, directed high-order citation propagation) feed a 259-dim LightGBM Stage-2 meta-learner with rank-cutoff top-50% decision. Final public F1 0.96626.", + "analyzedAt": "2026-06-18T00:00:00Z", + "gitCommitHash": "non-git-local" + }, + "nodes": [ + { + "id": "file:CLAUDE_zh.md", + "type": "document", + "name": "CLAUDE_zh.md", + "filePath": "CLAUDE_zh.md", + "lineRange": [ + 1, + 206 + ], + "summary": "CLAUDE.md 的中文版工作指引。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:CLAUDE.md", + "type": "document", + "name": "CLAUDE.md", + "filePath": "CLAUDE.md", + "lineRange": [ + 1, + 218 + ], + "summary": "Claude Code 工作指引:架构总览、CLI 约定、验证框架 dynamic_seed202、提交决策规则、关键约定与坑。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:code/compare_gnn.py", + "type": "file", + "name": "compare_gnn.py", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 1, + 414 + ], + "summary": "【legacy】多 GNN(LightGCN/GAT/SAGE/MeanAgg)对比实验,硬编码 /home/lzc 路径、无 argparse。仅供溯源。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/compare_gnn.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 16, + 19 + ], + "summary": "set_seed():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 24, + 28 + ], + "summary": "read_txt():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 58, + 59 + ], + "summary": "log_norm():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 99, + 111 + ], + "summary": "build_data():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::sample_hard_neg", + "type": "function", + "name": "sample_hard_neg", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 114, + 134 + ], + "summary": "sample_hard_neg():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 137, + 138 + ], + "summary": "cos_sim():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::evaluate", + "type": "function", + "name": "evaluate", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 142, + 152 + ], + "summary": "evaluate():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::make_vanilla_lgcn", + "type": "function", + "name": "make_vanilla_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 205, + 230 + ], + "summary": "make_vanilla_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_learnw_lgcn", + "type": "function", + "name": "make_learnw_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 233, + 259 + ], + "summary": "make_learnw_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_gat_lgcn", + "type": "function", + "name": "make_gat_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 262, + 287 + ], + "summary": "make_gat_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_sage_lgcn", + "type": "function", + "name": "make_sage_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 290, + 315 + ], + "summary": "make_sage_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_deep_lgcn", + "type": "function", + "name": "make_deep_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 318, + 343 + ], + "summary": "make_deep_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_wide_lgcn", + "type": "function", + "name": "make_wide_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 346, + 348 + ], + "summary": "make_wide_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::run_trial", + "type": "function", + "name": "run_trial", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 354, + 387 + ], + "summary": "run_trial():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/compare_gnn.py::MeanAggLayer", + "type": "class", + "name": "MeanAggLayer", + "filePath": "code/compare_gnn.py", + "summary": "MeanAggLayer(类):定义于 compare_gnn.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/compare_gnn.py::GATAggLayer", + "type": "class", + "name": "GATAggLayer", + "filePath": "code/compare_gnn.py", + "summary": "GATAggLayer(类):定义于 compare_gnn.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/compare_gnn.py::SAGEAggLayer", + "type": "class", + "name": "SAGEAggLayer", + "filePath": "code/compare_gnn.py", + "summary": "SAGEAggLayer(类):定义于 compare_gnn.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/content_rich_ablation.py", + "type": "file", + "name": "content_rich_ablation.py", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 1, + 208 + ], + "summary": "从 512-d USE 论文嵌入(feature.pkl)直接抽 18 维作者/候选内容画像(content_rich_features)。命中 feature_cache 缓存。验证 F1 ≈0.95990。", + "tags": [ + "ablation", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/content_rich_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_module():定义于 content_rich_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/content_rich_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 25, + 30 + ], + "summary": "best_f1():定义于 content_rich_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/content_rich_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 33, + 51 + ], + "summary": "fit_lgb_oof():定义于 content_rich_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/content_rich_ablation.py::content_rich_features", + "type": "function", + "name": "content_rich_features", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 54, + 129 + ], + "summary": "从 feature.pkl 的 512-d USE 嵌入直接抽 18 维作者/候选内容画像(命中 feature_cache)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/content_rich_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 132, + 204 + ], + "summary": "main():定义于 content_rich_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/error_group_calibration.py", + "type": "file", + "name": "error_group_calibration.py", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 1, + 800 + ], + "summary": "误差分桶分析:按作者度/论文度分桶算 F1(冷启动低度节点性能下降)、校准曲线、ratio-F1。论证 rank-cutoff 决策。", + "tags": [ + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/error_group_calibration.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 44, + 49 + ], + "summary": "load_module():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 52, + 53 + ], + "summary": "read_txt():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::prf", + "type": "function", + "name": "prf", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 56, + 65 + ], + "summary": "prf():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 68, + 73 + ], + "summary": "best_f1():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::score_at_threshold", + "type": "function", + "name": "score_at_threshold", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 76, + 88 + ], + "summary": "score_at_threshold():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 91, + 95 + ], + "summary": "rank01():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 98, + 99 + ], + "summary": "zscore():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::author_rank01", + "type": "function", + "name": "author_rank01", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 102, + 110 + ], + "summary": "author_rank01():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::author_rank_position", + "type": "function", + "name": "author_rank_position", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 113, + 122 + ], + "summary": "author_rank_position():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::score_features", + "type": "function", + "name": "score_features", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 125, + 129 + ], + "summary": "score_features():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 132, + 164 + ], + "summary": "fit_lgb_oof():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::fit_full_lgb", + "type": "function", + "name": "fit_full_lgb", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 167, + 184 + ], + "summary": "fit_full_lgb():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::average_predict", + "type": "function", + "name": "average_predict", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 187, + 192 + ], + "summary": "average_predict():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::bucket_cut", + "type": "function", + "name": "bucket_cut", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 195, + 201 + ], + "summary": "bucket_cut():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::bucket_quantile", + "type": "function", + "name": "bucket_quantile", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 204, + 205 + ], + "summary": "bucket_quantile():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::load_submission_pred", + "type": "function", + "name": "load_submission_pred", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 208, + 209 + ], + "summary": "load_submission_pred():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::write_submission", + "type": "function", + "name": "write_submission", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 212, + 222 + ], + "summary": "write_submission():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::write_group_submission", + "type": "function", + "name": "write_group_submission", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 225, + 238 + ], + "summary": "write_group_submission():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::group_threshold", + "type": "function", + "name": "group_threshold", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 241, + 258 + ], + "summary": "group_threshold():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::summarize_pred", + "type": "function", + "name": "summarize_pred", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 261, + 274 + ], + "summary": "summarize_pred():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::build_feature_names", + "type": "function", + "name": "build_feature_names", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 277, + 298 + ], + "summary": "build_feature_names():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::build_val_test_context", + "type": "function", + "name": "build_val_test_context", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 301, + 413 + ], + "summary": "build_val_test_context():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::error_analysis", + "type": "function", + "name": "error_analysis", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 416, + 453 + ], + "summary": "error_analysis():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::add_agreement_features", + "type": "function", + "name": "add_agreement_features", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 456, + 517 + ], + "summary": "add_agreement_features():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::boundary_features", + "type": "function", + "name": "boundary_features", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 520, + 583 + ], + "summary": "boundary_features():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::main", + "type": "function", + "name": "main", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 586, + 796 + ], + "summary": "main():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/evaluate_val_checkpoints.py", + "type": "file", + "name": "evaluate_val_checkpoints.py", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 1, + 147 + ], + "summary": "评估验证集上多个 checkpoint 的分数,选最佳。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::load_train_module", + "type": "function", + "name": "load_train_module", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 16, + 21 + ], + "summary": "load_train_module():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 24, + 29 + ], + "summary": "best_f1():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::infer_layers", + "type": "function", + "name": "infer_layers", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 32, + 42 + ], + "summary": "infer_layers():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::score_model", + "type": "function", + "name": "score_model", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 46, + 65 + ], + "summary": "score_model():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::main", + "type": "function", + "name": "main", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 68, + 143 + ], + "summary": "main():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/extra_score_sources_ablation.py", + "type": "file", + "name": "extra_score_sources_ablation.py", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 1, + 286 + ], + "summary": "额外分数源:content_mean_score(作者历史论文 embedding 均值 · 候选向量,content_mean 4 维)、score_to_features(BPR-MF 分数 4 维)、BPR-MF(dim=256)。验证 F1 0.95763(content mean)→0.95931(BPR-MF)。", + "tags": [ + "ablation", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/extra_score_sources_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 20, + 25 + ], + "summary": "load_module():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 28, + 33 + ], + "summary": "best_f1():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 36, + 40 + ], + "summary": "rank01():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 43, + 44 + ], + "summary": "zscore():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::score_to_features", + "type": "function", + "name": "score_to_features", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 47, + 56 + ], + "summary": "把单分数转 zscore/rank 等 4 维特征(BPR/content_mean 复用)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 59, + 77 + ], + "summary": "fit_lgb_oof():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::content_mean_score", + "type": "function", + "name": "content_mean_score", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 80, + 97 + ], + "summary": "作者历史论文 embedding 均值 · 候选论文向量,作第 4 个 CF 分数源。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "type": "function", + "name": "train_mf_bpr_score", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 116, + 163 + ], + "summary": "train_mf_bpr_score():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/extra_score_sources_ablation.py::train_ranker_oof", + "type": "function", + "name": "train_ranker_oof", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 166, + 196 + ], + "summary": "train_ranker_oof():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/extra_score_sources_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 199, + 282 + ], + "summary": "main():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/extra_score_sources_ablation.py::MF", + "type": "class", + "name": "MF", + "filePath": "code/extra_score_sources_ablation.py", + "summary": "MF(类):定义于 extra_score_sources_ablation.py;方法 __init__, score。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/figures/fig1_dataset_overview.py", + "type": "file", + "name": "fig1_dataset_overview.py", + "filePath": "code/figures/fig1_dataset_overview.py", + "lineRange": [ + 1, + 62 + ], + "summary": "图1 数据集概览:异构图统计 + 度分布 log-log + 幂律拟合。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig1_dataset_overview.py::plot_ccdf", + "type": "function", + "name": "plot_ccdf", + "filePath": "code/figures/fig1_dataset_overview.py", + "lineRange": [ + 30, + 47 + ], + "summary": "plot_ccdf():定义于 fig1_dataset_overview.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig10_rw_ensemble_size.py", + "type": "file", + "name": "fig10_rw_ensemble_size.py", + "filePath": "code/figures/fig10_rw_ensemble_size.py", + "lineRange": [ + 1, + 39 + ], + "summary": "图10(附录)RW 集成规模 vs F1。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig2_framework.py", + "type": "file", + "name": "fig2_framework.py", + "filePath": "code/figures/fig2_framework.py", + "lineRange": [ + 1, + 55 + ], + "summary": "图2 两阶段堆叠框架示意图(Stage1 分数源→特征工程→Stage2 LightGBM→rank-cutoff)。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig2_framework.py::box", + "type": "function", + "name": "box", + "filePath": "code/figures/fig2_framework.py", + "lineRange": [ + 21, + 25 + ], + "summary": "box():定义于 fig2_framework.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig2_framework.py::arrow", + "type": "function", + "name": "arrow", + "filePath": "code/figures/fig2_framework.py", + "lineRange": [ + 28, + 29 + ], + "summary": "arrow():定义于 fig2_framework.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig3_progression.py", + "type": "file", + "name": "fig3_progression.py", + "filePath": "code/figures/fig3_progression.py", + "lineRange": [ + 1, + 59 + ], + "summary": "图3【主角】方法演进三级跳:验证 F1(实线)+ 公开 LB(稀疏点线),标注三段突破。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig4_highorder_ablation.py", + "type": "file", + "name": "fig4_highorder_ablation.py", + "filePath": "code/figures/fig4_highorder_ablation.py", + "lineRange": [ + 1, + 48 + ], + "summary": "图4 高阶传播消融:108/190/214/259 维四阶段 F1+AUC 柱状图。", + "tags": [ + "ablation", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig5_pr_roc.py", + "type": "file", + "name": "fig5_pr_roc.py", + "filePath": "code/figures/fig5_pr_roc.py", + "lineRange": [ + 1, + 61 + ], + "summary": "图5 多模型 PR/ROC 曲线(需 gen_val_labels 的 y)。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig6_feature_contribution.py", + "type": "file", + "name": "fig6_feature_contribution.py", + "filePath": "code/figures/fig6_feature_contribution.py", + "lineRange": [ + 1, + 48 + ], + "summary": "图6 特征贡献:按组聚合 importance + top-20 单特征。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig7_error_analysis.py", + "type": "file", + "name": "fig7_error_analysis.py", + "filePath": "code/figures/fig7_error_analysis.py", + "lineRange": [ + 1, + 71 + ], + "summary": "图7 误差分析与决策稳健性:度分桶 F1 + 校准曲线 + ratio-F1 + 阈值漂移。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig7_error_analysis.py::plot_buckets", + "type": "function", + "name": "plot_buckets", + "filePath": "code/figures/fig7_error_analysis.py", + "lineRange": [ + 31, + 41 + ], + "summary": "plot_buckets():定义于 fig7_error_analysis.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig8_lgcn_ensemble_correlation.py", + "type": "file", + "name": "fig8_lgcn_ensemble_correlation.py", + "filePath": "code/figures/fig8_lgcn_ensemble_correlation.py", + "lineRange": [ + 1, + 34 + ], + "summary": "图8(附录)LightGCN 模型分数相关性热图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig9_lgcn_hyperparam.py", + "type": "file", + "name": "fig9_lgcn_hyperparam.py", + "filePath": "code/figures/fig9_lgcn_hyperparam.py", + "lineRange": [ + 1, + 50 + ], + "summary": "图9(附录)LightGCN 超参(dim×layers)热图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig9_lgcn_hyperparam.py::parse", + "type": "function", + "name": "parse", + "filePath": "code/figures/fig9_lgcn_hyperparam.py", + "lineRange": [ + 26, + 28 + ], + "summary": "parse():定义于 fig9_lgcn_hyperparam.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/gen_val_labels.py", + "type": "file", + "name": "gen_val_labels.py", + "filePath": "code/figures/gen_val_labels.py", + "lineRange": [ + 1, + 65 + ], + "summary": "补齐脚本:用 train_val_lgcn_ensemble.make_notebook_style_split(seed=202) 生成验证集标签 y(136484),并断言复算 best F1≈0.966874 证明行序对齐。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/gen_val_labels.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/figures/gen_val_labels.py", + "lineRange": [ + 23, + 29 + ], + "summary": "load_module():定义于 gen_val_labels.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/gen_val_labels.py::main", + "type": "function", + "name": "main", + "filePath": "code/figures/gen_val_labels.py", + "lineRange": [ + 32, + 61 + ], + "summary": "main():定义于 gen_val_labels.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/figures/plot_style.py", + "type": "file", + "name": "plot_style.py", + "filePath": "code/figures/plot_style.py", + "lineRange": [ + 1, + 53 + ], + "summary": "论文图表共享 seaborn 样式(whitegrid + deep/muted 调色板, pdf.fonttype=42 嵌 TrueType)。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/plot_style.py::apply", + "type": "function", + "name": "apply", + "filePath": "code/figures/plot_style.py", + "lineRange": [ + 18, + 44 + ], + "summary": "apply():定义于 plot_style.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "func:code/figures/plot_style.py::save", + "type": "function", + "name": "save", + "filePath": "code/figures/plot_style.py", + "lineRange": [ + 47, + 53 + ], + "summary": "save():定义于 plot_style.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/generate_conservative_rw_blends.py", + "type": "file", + "name": "generate_conservative_rw_blends.py", + "filePath": "code/generate_conservative_rw_blends.py", + "lineRange": [ + 1, + 71 + ], + "summary": "保守 RW 混合权重实验。", + "tags": [ + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_conservative_rw_blends.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/generate_conservative_rw_blends.py", + "lineRange": [ + 15, + 19 + ], + "summary": "rank01():定义于 generate_conservative_rw_blends.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_conservative_rw_blends.py::write_ratio_submission", + "type": "function", + "name": "write_ratio_submission", + "filePath": "code/generate_conservative_rw_blends.py", + "lineRange": [ + 22, + 30 + ], + "summary": "write_ratio_submission():定义于 generate_conservative_rw_blends.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_conservative_rw_blends.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_conservative_rw_blends.py", + "lineRange": [ + 33, + 67 + ], + "summary": "main():定义于 generate_conservative_rw_blends.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_content_rich_submission.py", + "type": "file", + "name": "generate_content_rich_submission.py", + "filePath": "code/generate_content_rich_submission.py", + "lineRange": [ + 1, + 127 + ], + "summary": "基于 content_rich 特征生成提交 CSV 的脚本。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_content_rich_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_content_rich_submission.py", + "lineRange": [ + 14, + 19 + ], + "summary": "load_module():定义于 generate_content_rich_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_content_rich_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_content_rich_submission.py", + "lineRange": [ + 22, + 35 + ], + "summary": "make_subs():定义于 generate_content_rich_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_content_rich_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_content_rich_submission.py", + "lineRange": [ + 38, + 123 + ], + "summary": "main():定义于 generate_content_rich_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_dot_submission.py", + "type": "file", + "name": "generate_dot_submission.py", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 1, + 187 + ], + "summary": "点积解码变体提交生成。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_dot_submission.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 25, + 26 + ], + "summary": "read_txt():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 29, + 31 + ], + "summary": "log_norm():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::build", + "type": "function", + "name": "build", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 69, + 101 + ], + "summary": "build():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_dot_submission.py::predict_dot", + "type": "function", + "name": "predict_dot", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 105, + 113 + ], + "summary": "predict_dot():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 116, + 120 + ], + "summary": "rank01():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::write", + "type": "function", + "name": "write", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 123, + 134 + ], + "summary": "write():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 137, + 183 + ], + "summary": "main():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_dot_submission.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/generate_dot_submission.py", + "summary": "LightGCNLayer(类):定义于 generate_dot_submission.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_dot_submission.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/generate_dot_submission.py", + "summary": "LightGCN(类):定义于 generate_dot_submission.py;方法 __init__, encode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_ens6_submission.py", + "type": "file", + "name": "generate_ens6_submission.py", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 1, + 263 + ], + "summary": "从 checkpoint 重生成 6-model LightGCN 集成提交(sub_ens6_t0.36.csv,公开 0.93044)。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_ens6_submission.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 42, + 47 + ], + "summary": "read_txt():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 50, + 52 + ], + "summary": "log_norm():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 104, + 105 + ], + "summary": "cos_sim():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::build_features", + "type": "function", + "name": "build_features", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 108, + 150 + ], + "summary": "build_features():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_ens6_submission.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 153, + 176 + ], + "summary": "build_data():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::predict", + "type": "function", + "name": "predict", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 180, + 190 + ], + "summary": "predict():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 193, + 258 + ], + "summary": "main():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_ens6_submission.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/generate_ens6_submission.py", + "summary": "LightGCNLayer(类):定义于 generate_ens6_submission.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_ens6_submission.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/generate_ens6_submission.py", + "summary": "LightGCN(类):定义于 generate_ens6_submission.py;方法 __init__, encode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_extra_bprmf_submission.py", + "type": "file", + "name": "generate_extra_bprmf_submission.py", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 1, + 174 + ], + "summary": "BPR-MF 额外分数提交生成。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_extra_bprmf_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 16, + 21 + ], + "summary": "load_module():定义于 generate_extra_bprmf_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_extra_bprmf_submission.py::train_mf_test_scores", + "type": "function", + "name": "train_mf_test_scores", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 24, + 65 + ], + "summary": "train_mf_test_scores():定义于 generate_extra_bprmf_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_extra_bprmf_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 68, + 81 + ], + "summary": "make_subs():定义于 generate_extra_bprmf_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_extra_bprmf_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 84, + 170 + ], + "summary": "main():定义于 generate_extra_bprmf_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_large_ensemble_submission.py", + "type": "file", + "name": "generate_large_ensemble_submission.py", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 1, + 342 + ], + "summary": "大集成(多 LightGCN 变体)提交生成。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 34, + 39 + ], + "summary": "read_txt():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 42, + 44 + ], + "summary": "log_norm():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 96, + 97 + ], + "summary": "cos_sim():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::build_features", + "type": "function", + "name": "build_features", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 100, + 136 + ], + "summary": "build_features():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 139, + 162 + ], + "summary": "build_data():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::predict", + "type": "function", + "name": "predict", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 166, + 176 + ], + "summary": "predict():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::checkpoint_weight", + "type": "function", + "name": "checkpoint_weight", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 179, + 194 + ], + "summary": "checkpoint_weight():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::percent_rank", + "type": "function", + "name": "percent_rank", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 197, + 201 + ], + "summary": "percent_rank():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::write_threshold_submissions", + "type": "function", + "name": "write_threshold_submissions", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 204, + 222 + ], + "summary": "write_threshold_submissions():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::write_top_ratio_submissions", + "type": "function", + "name": "write_top_ratio_submissions", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 225, + 246 + ], + "summary": "write_top_ratio_submissions():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 249, + 338 + ], + "summary": "main():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_large_ensemble_submission.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/generate_large_ensemble_submission.py", + "summary": "LightGCNLayer(类):定义于 generate_large_ensemble_submission.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_large_ensemble_submission.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/generate_large_ensemble_submission.py", + "summary": "LightGCN(类):定义于 generate_large_ensemble_submission.py;方法 __init__, encode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_node2vec_deepwalk_submission.py", + "type": "file", + "name": "generate_node2vec_deepwalk_submission.py", + "filePath": "code/generate_node2vec_deepwalk_submission.py", + "lineRange": [ + 1, + 146 + ], + "summary": "Node2Vec/DeepWalk 分数提交生成。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_node2vec_deepwalk_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_node2vec_deepwalk_submission.py", + "lineRange": [ + 15, + 20 + ], + "summary": "load_module():定义于 generate_node2vec_deepwalk_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_node2vec_deepwalk_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_node2vec_deepwalk_submission.py", + "lineRange": [ + 23, + 37 + ], + "summary": "make_subs():定义于 generate_node2vec_deepwalk_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_node2vec_deepwalk_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_node2vec_deepwalk_submission.py", + "lineRange": [ + 40, + 142 + ], + "summary": "main():定义于 generate_node2vec_deepwalk_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_post95_submission.py", + "type": "file", + "name": "generate_post95_submission.py", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 1, + 331 + ], + "summary": "Post95 阶段:对 20 个 LightGCN 变体分数做 zscore+rank01 聚合(variant_feature_matrix 43 维),含 topk_content_similarity_fast(top-k 内容相似度 3 维)。选 top-N GNN 分数变体并生成 test 对应分数。验证 F1 0.95711。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/generate_post95_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_module():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 25, + 26 + ], + "summary": "read_txt():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::infer_layers", + "type": "function", + "name": "infer_layers", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 29, + 39 + ], + "summary": "infer_layers():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::infer_mode", + "type": "function", + "name": "infer_mode", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 42, + 48 + ], + "summary": "infer_mode():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::score_cache_path", + "type": "function", + "name": "score_cache_path", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 51, + 55 + ], + "summary": "score_cache_path():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::checkpoint_for_score", + "type": "function", + "name": "checkpoint_for_score", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 58, + 67 + ], + "summary": "checkpoint_for_score():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::ensemble_member_scores", + "type": "function", + "name": "ensemble_member_scores", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 70, + 76 + ], + "summary": "ensemble_member_scores():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "type": "function", + "name": "score_checkpoint_on_test", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 80, + 130 + ], + "summary": "score_checkpoint_on_test():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_post95_submission.py::score_val_path_on_test", + "type": "function", + "name": "score_val_path_on_test", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 133, + 157 + ], + "summary": "score_val_path_on_test():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::select_variant_val_scores", + "type": "function", + "name": "select_variant_val_scores", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 160, + 172 + ], + "summary": "select_variant_val_scores():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::variant_feature_matrix", + "type": "function", + "name": "variant_feature_matrix", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 175, + 183 + ], + "summary": "20 个 LightGCN 变体分数做 zscore+rank01 → 43 维。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::topk_content_similarity_fast", + "type": "function", + "name": "topk_content_similarity_fast", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 186, + 216 + ], + "summary": "top-k 内容相似度 3 维(快速版)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_post95_submission.py::make_submissions", + "type": "function", + "name": "make_submissions", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 219, + 229 + ], + "summary": "make_submissions():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 232, + 327 + ], + "summary": "main():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_randomwalk_ensemble_submission.py", + "type": "file", + "name": "generate_randomwalk_ensemble_submission.py", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 1, + 159 + ], + "summary": "aggregate():把 7 个 RW 块做一致性聚合(11 维);生成 RW 集成提交。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_randomwalk_ensemble_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 16, + 22 + ], + "summary": "load_module():定义于 generate_randomwalk_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_ensemble_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 25, + 47 + ], + "summary": "make_subs():定义于 generate_randomwalk_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_ensemble_submission.py::aggregate", + "type": "function", + "name": "aggregate", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 50, + 69 + ], + "summary": "把 7 个 RW pair 特征块做一致性聚合,产 11 维 aggregate 块。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_ensemble_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 72, + 155 + ], + "summary": "main():定义于 generate_randomwalk_ensemble_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_randomwalk_single_submission.py", + "type": "file", + "name": "generate_randomwalk_single_submission.py", + "filePath": "code/generate_randomwalk_single_submission.py", + "lineRange": [ + 1, + 147 + ], + "summary": "单个 RW 配置的提交生成(对照用)。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_randomwalk_single_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_randomwalk_single_submission.py", + "lineRange": [ + 16, + 22 + ], + "summary": "load_module():定义于 generate_randomwalk_single_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_single_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_randomwalk_single_submission.py", + "lineRange": [ + 25, + 47 + ], + "summary": "make_subs():定义于 generate_randomwalk_single_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_single_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_randomwalk_single_submission.py", + "lineRange": [ + 50, + 143 + ], + "summary": "main():定义于 generate_randomwalk_single_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/high_order_graph_stack.py", + "type": "file", + "name": "high_order_graph_stack.py", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 1, + 351 + ], + "summary": "【最终方法入口】Stage-2 LightGBM meta-learner。core:build_high_order(H_k=R·C^k 作者历史论文 k 步引用扩散,无向 24 维)、build_high_order_directed(G_k=S·R·C^k 合著者历史论文扩散,fwd/bwd/undir 三向 45 维);拼出 259 维特征 X_best;fit_lgb_oof(5-fold)→fit_full_predict;write_ratio_submission rank-cutoff top 50% + test_known_mask 强制 1。验证 F1 0.966874 / 公开 0.96626。硬编码稀疏矩阵形状 6611×79937。", + "tags": [ + "final-method", + "lightgbm", + "high-order", + "entry-point", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/high_order_graph_stack.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 19, + 25 + ], + "summary": "load_module():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 28, + 29 + ], + "summary": "read_txt():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 32, + 36 + ], + "summary": "best_f1():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::row_norm", + "type": "function", + "name": "row_norm", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 39, + 44 + ], + "summary": "row_norm():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::topk_prune_rows", + "type": "function", + "name": "topk_prune_rows", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 47, + 67 + ], + "summary": "topk_prune_rows():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::extract_scores", + "type": "function", + "name": "extract_scores", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 70, + 71 + ], + "summary": "extract_scores():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::build_high_order", + "type": "function", + "name": "build_high_order", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 74, + 122 + ], + "summary": "无向高阶传播:H_k=R·C^k,作者历史论文经 k 步引用扩散到候选,产 24 维(读 *_names.txt)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/high_order_graph_stack.py::build_high_order_directed", + "type": "function", + "name": "build_high_order_directed", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 125, + 176 + ], + "summary": "有向高阶传播:G_k=S·R·C^k,合著者历史论文扩散,fwd/bwd/undir 三向,产 45 维。最终核心增益来源。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/high_order_graph_stack.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 179, + 198 + ], + "summary": "5-fold StratifiedKFold OOF LightGBM,返回 leak-free OOF 概率(存 *_oof.npy)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::fit_full_predict", + "type": "function", + "name": "fit_full_predict", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 201, + 216 + ], + "summary": "用最终超参(num_leaves=15, reg_lambda=8, n_estimators=1400, lr=0.022)在全验证集 fit 并预测 test,代表最终模型。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::write_ratio_submission", + "type": "function", + "name": "write_ratio_submission", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 219, + 229 + ], + "summary": "rank-cutoff 提交生成:按最终分数排序取 top ratio(0.5)为 1,并 force test_known_mask 中训练已知正边为 1。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::main", + "type": "function", + "name": "main", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 232, + 347 + ], + "summary": "main():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/high_order_model_compare.py", + "type": "file", + "name": "high_order_model_compare.py", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 1, + 166 + ], + "summary": "高阶传播变体对比实验:无向 vs 有向 vs 不同 k 值的 OOF F1/AUC 对照,支撑 high_order_graph_stack 的消融结论。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/high_order_model_compare.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 20, + 26 + ], + "summary": "load_module():定义于 high_order_model_compare.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_model_compare.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 29, + 33 + ], + "summary": "best_f1():定义于 high_order_model_compare.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_model_compare.py::fit_oof", + "type": "function", + "name": "fit_oof", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 36, + 95 + ], + "summary": "fit_oof():定义于 high_order_model_compare.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/high_order_model_compare.py::main", + "type": "function", + "name": "main", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 98, + 162 + ], + "summary": "main():定义于 high_order_model_compare.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/make_notebook_style_split.py", + "type": "file", + "name": "make_notebook_style_split.py", + "filePath": "code/make_notebook_style_split.py", + "lineRange": [ + 1, + 86 + ], + "summary": "切分脚本的独立早期版本(只写 splits/),非堆叠链使用。真正被流水线调用的是 train_val_lgcn_ensemble.py 内的同名函数。遗留参考。", + "tags": [ + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/make_notebook_style_split.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/make_notebook_style_split.py", + "lineRange": [ + 20, + 25 + ], + "summary": "read_txt():定义于 make_notebook_style_split.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/make_notebook_style_split.py::main", + "type": "function", + "name": "main", + "filePath": "code/make_notebook_style_split.py", + "lineRange": [ + 28, + 82 + ], + "summary": "main():定义于 make_notebook_style_split.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/node2vec_deepwalk_ablation.py", + "type": "file", + "name": "node2vec_deepwalk_ablation.py", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 1, + 257 + ], + "summary": "随机游走早期单配置消融(初版 DeepWalk/Node2Vec),验证 F1 0.96212。被 randomwalk_systematic 取代。", + "tags": [ + "ablation", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 19, + 24 + ], + "summary": "load_module():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 27, + 28 + ], + "summary": "read_txt():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 31, + 36 + ], + "summary": "best_f1():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 39, + 43 + ], + "summary": "rank01():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 46, + 47 + ], + "summary": "zscore():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 50, + 68 + ], + "summary": "fit_lgb_oof():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "type": "function", + "name": "score_to_features", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 71, + 84 + ], + "summary": "score_to_features():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::build_graph", + "type": "function", + "name": "build_graph", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 87, + 98 + ], + "summary": "build_graph():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::deepwalk_walks", + "type": "function", + "name": "deepwalk_walks", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 101, + 119 + ], + "summary": "deepwalk_walks():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::train_deepwalk", + "type": "function", + "name": "train_deepwalk", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 122, + 138 + ], + "summary": "train_deepwalk():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::train_node2vec", + "type": "function", + "name": "train_node2vec", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 141, + 147 + ], + "summary": "train_node2vec():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::pair_scores", + "type": "function", + "name": "pair_scores", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 150, + 174 + ], + "summary": "pair_scores():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "type": "function", + "name": "build_current_best_features", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 177, + 204 + ], + "summary": "build_current_best_features():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 207, + 253 + ], + "summary": "main():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/post95_ablation.py", + "type": "file", + "name": "post95_ablation.py", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 1, + 321 + ], + "summary": "定义 negative_evidence_features(8 维负证据:候选论文被多少作者读过等),被多个 stacker load_module 加载。Post95 阶段的特征消融脚本。", + "tags": [ + "ablation", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/post95_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_module():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 25, + 30 + ], + "summary": "best_f1():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::prf", + "type": "function", + "name": "prf", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 33, + 40 + ], + "summary": "prf():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 43, + 47 + ], + "summary": "rank01():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 50, + 51 + ], + "summary": "zscore():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 54, + 72 + ], + "summary": "fit_lgb_oof():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::bucket_series", + "type": "function", + "name": "bucket_series", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 75, + 81 + ], + "summary": "bucket_series():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::error_analysis", + "type": "function", + "name": "error_analysis", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 84, + 128 + ], + "summary": "error_analysis():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/post95_ablation.py::group_threshold", + "type": "function", + "name": "group_threshold", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 131, + 142 + ], + "summary": "group_threshold():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::author_quota_tuning", + "type": "function", + "name": "author_quota_tuning", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 145, + 173 + ], + "summary": "author_quota_tuning():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/post95_ablation.py::negative_evidence_features", + "type": "function", + "name": "negative_evidence_features", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 176, + 192 + ], + "summary": "8 维负证据特征:候选论文被读过多少、共同未读等。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::topk_content_similarity", + "type": "function", + "name": "topk_content_similarity", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 195, + 217 + ], + "summary": "topk_content_similarity():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "type": "function", + "name": "load_lgcn_variant_scores", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 220, + 245 + ], + "summary": "load_lgcn_variant_scores():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/post95_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 248, + 317 + ], + "summary": "main():定义于 post95_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/randomwalk_ensemble_ablation.py", + "type": "file", + "name": "randomwalk_ensemble_ablation.py", + "filePath": "code/randomwalk_ensemble_ablation.py", + "lineRange": [ + 1, + 61 + ], + "summary": "RW 集成规模消融(5 vs 7 块)的薄封装。", + "tags": [ + "ablation", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_ensemble_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/randomwalk_ensemble_ablation.py", + "lineRange": [ + 16, + 57 + ], + "summary": "main():定义于 randomwalk_ensemble_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/randomwalk_one_ablation.py", + "type": "file", + "name": "randomwalk_one_ablation.py", + "filePath": "code/randomwalk_one_ablation.py", + "lineRange": [ + 1, + 70 + ], + "summary": "单个 RW 块的 OOF 消融。", + "tags": [ + "ablation", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_one_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/randomwalk_one_ablation.py", + "lineRange": [ + 14, + 66 + ], + "summary": "main():定义于 randomwalk_one_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/randomwalk_systematic_ablation.py", + "type": "file", + "name": "randomwalk_systematic_ablation.py", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 1, + 446 + ], + "summary": "系统化随机游走:7 个 DeepWalk/Node2Vec 配置(d128/d256, l40/l80),每块 pair_feature_block 产 11 维;build_base_features 拼出 84 维 X_base。Word2Vec 模型缓存于 randomwalk_systematic/models/,pair 特征缓存于 pair_features/*.npz。验证 F1 0.96492。", + "tags": [ + "ablation", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 20, + 25 + ], + "summary": "load_module():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 28, + 29 + ], + "summary": "read_txt():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 32, + 37 + ], + "summary": "best_f1():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 40, + 44 + ], + "summary": "rank01():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 47, + 48 + ], + "summary": "zscore():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 51, + 70 + ], + "summary": "fit_lgb_oof():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::small_configs", + "type": "function", + "name": "small_configs", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 87, + 95 + ], + "summary": "small_configs():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::graph_configs", + "type": "function", + "name": "graph_configs", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 98, + 104 + ], + "summary": "graph_configs():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::extra_configs", + "type": "function", + "name": "extra_configs", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 107, + 115 + ], + "summary": "extra_configs():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::build_graph", + "type": "function", + "name": "build_graph", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 118, + 136 + ], + "summary": "build_graph():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::deepwalk_walks", + "type": "function", + "name": "deepwalk_walks", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 139, + 157 + ], + "summary": "deepwalk_walks():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::train_model", + "type": "function", + "name": "train_model", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 160, + 191 + ], + "summary": "train_model():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::embedding_arrays", + "type": "function", + "name": "embedding_arrays", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 194, + 213 + ], + "summary": "embedding_arrays():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "type": "function", + "name": "pair_feature_block", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 216, + 270 + ], + "summary": "对单个 Word2Vec 配置产 11 维 pair 特征(作者/候选嵌入拼接、cos、差、范数等)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::build_base_features", + "type": "function", + "name": "build_base_features", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 273, + 300 + ], + "summary": "拼出 84 维 X_base(LightGCN rank4 + explicit18 + neg8 + topk3 + variant43 + content_mean4 + bpr4),命中各缓存。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::train_full_predict", + "type": "function", + "name": "train_full_predict", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 303, + 317 + ], + "summary": "train_full_predict():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 320, + 442 + ], + "summary": "main():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "class", + "name": "RWConfig", + "filePath": "code/randomwalk_systematic_ablation.py", + "summary": "RWConfig(类):定义于 randomwalk_systematic_ablation.py;方法 —。", + "tags": [ + "class" + ], + "complexity": "simple" + }, + { + "id": "file:code/rich_randomwalk_stack.py", + "type": "file", + "name": "rich_randomwalk_stack.py", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 1, + 189 + ], + "summary": "rich content + RW 联合 stacker,衔接 content_rich 与 randomwalk_systematic。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/rich_randomwalk_stack.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 18, + 24 + ], + "summary": "load_module():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 27, + 32 + ], + "summary": "best_f1():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 35, + 54 + ], + "summary": "fit_lgb_oof():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::fit_full_predict", + "type": "function", + "name": "fit_full_predict", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 57, + 72 + ], + "summary": "fit_full_predict():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::write_sub", + "type": "function", + "name": "write_sub", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 75, + 80 + ], + "summary": "write_sub():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::main", + "type": "function", + "name": "main", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 83, + 185 + ], + "summary": "main():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_baseline.py", + "type": "file", + "name": "run_baseline.py", + "filePath": "code/run_baseline.py", + "lineRange": [ + 1, + 352 + ], + "summary": "【legacy】官方 notebook 基线:HeteroMeanConv + hinge/cosine + 阈值搜索。≈0.8850。硬编码路径。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_baseline.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_baseline.py", + "lineRange": [ + 21, + 26 + ], + "summary": "set_seed():定义于 run_baseline.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_baseline.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_baseline.py", + "lineRange": [ + 41, + 46 + ], + "summary": "read_txt():定义于 run_baseline.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_baseline.py::sample_negative_edges", + "type": "function", + "name": "sample_negative_edges", + "filePath": "code/run_baseline.py", + "lineRange": [ + 249, + 260 + ], + "summary": "sample_negative_edges():定义于 run_baseline.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_baseline.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_baseline.py", + "lineRange": [ + 311, + 312 + ], + "summary": "cos_sim():定义于 run_baseline.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "class:code/run_baseline.py::HeteroMeanConv", + "type": "class", + "name": "HeteroMeanConv", + "filePath": "code/run_baseline.py", + "summary": "HeteroMeanConv(类):定义于 run_baseline.py;方法 __init__, _key, reset_parameters, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_baseline.py::HeteroRecommender", + "type": "class", + "name": "HeteroRecommender", + "filePath": "code/run_baseline.py", + "summary": "HeteroRecommender(类):定义于 run_baseline.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_final.py", + "type": "file", + "name": "run_final.py", + "filePath": "code/run_final.py", + "lineRange": [ + 1, + 494 + ], + "summary": "【legacy】final 阶段实验脚本。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_final.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_final.py", + "lineRange": [ + 30, + 35 + ], + "summary": "set_seed():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_final.py", + "lineRange": [ + 42, + 47 + ], + "summary": "read_txt():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_final.py", + "lineRange": [ + 91, + 93 + ], + "summary": "log_norm():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/run_final.py", + "lineRange": [ + 154, + 177 + ], + "summary": "build_data():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_final.py", + "lineRange": [ + 269, + 306 + ], + "summary": "sample_hard_negatives():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_final.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_final.py", + "lineRange": [ + 310, + 311 + ], + "summary": "cos_sim():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::evaluate", + "type": "function", + "name": "evaluate", + "filePath": "code/run_final.py", + "lineRange": [ + 315, + 331 + ], + "summary": "evaluate():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::predict_cos_batched", + "type": "function", + "name": "predict_cos_batched", + "filePath": "code/run_final.py", + "lineRange": [ + 335, + 348 + ], + "summary": "predict_cos_batched():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::train_model", + "type": "function", + "name": "train_model", + "filePath": "code/run_final.py", + "lineRange": [ + 352, + 427 + ], + "summary": "train_model():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_final.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/run_final.py", + "summary": "LightGCNLayer(类):定义于 run_final.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_final.py::LightGCNRecommender", + "type": "class", + "name": "LightGCNRecommender", + "filePath": "code/run_final.py", + "summary": "LightGCNRecommender(类):定义于 run_final.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_graph_features.py", + "type": "file", + "name": "run_graph_features.py", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 1, + 315 + ], + "summary": "【legacy】手工图特征实验早期版。", + "tags": [ + "legacy", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_graph_features.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 20, + 22 + ], + "summary": "set_seed():定义于 run_graph_features.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_graph_features.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 31, + 36 + ], + "summary": "read_txt():定义于 run_graph_features.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_graph_features.py::log1p_norm", + "type": "function", + "name": "log1p_norm", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 52, + 54 + ], + "summary": "log1p_norm():定义于 run_graph_features.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_graph_features.py::compute_features", + "type": "function", + "name": "compute_features", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 115, + 178 + ], + "summary": "compute_features():定义于 run_graph_features.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_improved.py", + "type": "file", + "name": "run_improved.py", + "filePath": "code/run_improved.py", + "lineRange": [ + 1, + 596 + ], + "summary": "【legacy】基线改进:SAGEConv+残差/layernorm/MLP 解码器实验。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_improved.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_improved.py", + "lineRange": [ + 32, + 37 + ], + "summary": "set_seed():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_improved.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_improved.py", + "lineRange": [ + 44, + 49 + ], + "summary": "read_txt():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_improved.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_improved.py", + "lineRange": [ + 103, + 105 + ], + "summary": "log_norm():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_improved.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_improved.py", + "lineRange": [ + 322, + 368 + ], + "summary": "sample_hard_negatives():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_improved.py::run_experiment", + "type": "function", + "name": "run_experiment", + "filePath": "code/run_improved.py", + "lineRange": [ + 372, + 474 + ], + "summary": "run_experiment():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_improved.py::evaluate", + "type": "function", + "name": "evaluate", + "filePath": "code/run_improved.py", + "lineRange": [ + 478, + 500 + ], + "summary": "evaluate():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_improved.py::predict_all", + "type": "function", + "name": "predict_all", + "filePath": "code/run_improved.py", + "lineRange": [ + 524, + 539 + ], + "summary": "predict_all():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "class:code/run_improved.py::ResidualHeteroConv", + "type": "class", + "name": "ResidualHeteroConv", + "filePath": "code/run_improved.py", + "summary": "ResidualHeteroConv(类):定义于 run_improved.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_improved.py::MLPDecoder", + "type": "class", + "name": "MLPDecoder", + "filePath": "code/run_improved.py", + "summary": "MLPDecoder(类):定义于 run_improved.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_improved.py::ImprovedHeteroGNN", + "type": "class", + "name": "ImprovedHeteroGNN", + "filePath": "code/run_improved.py", + "summary": "ImprovedHeteroGNN(类):定义于 run_improved.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_lgcn_final.py", + "type": "file", + "name": "run_lgcn_final.py", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 1, + 308 + ], + "summary": "【legacy】LightGCN final 阶段。", + "tags": [ + "legacy", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_lgcn_final.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 19, + 24 + ], + "summary": "set_seed():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 31, + 36 + ], + "summary": "read_txt():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 71, + 73 + ], + "summary": "log_norm():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 109, + 124 + ], + "summary": "build_data():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 127, + 156 + ], + "summary": "sample_hard_negatives():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_lgcn_final.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 212, + 213 + ], + "summary": "cos_sim():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::predict_batched", + "type": "function", + "name": "predict_batched", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 217, + 228 + ], + "summary": "predict_batched():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::train_lgcn", + "type": "function", + "name": "train_lgcn", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 232, + 263 + ], + "summary": "train_lgcn():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_lgcn_final.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/run_lgcn_final.py", + "summary": "LightGCNLayer(类):定义于 run_lgcn_final.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_lgcn_final.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/run_lgcn_final.py", + "summary": "LightGCN(类):定义于 run_lgcn_final.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_lgcn_v2.py", + "type": "file", + "name": "run_lgcn_v2.py", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 1, + 311 + ], + "summary": "【legacy】LightGCN v2 阶段。", + "tags": [ + "legacy", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_lgcn_v2.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 20, + 25 + ], + "summary": "set_seed():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 32, + 37 + ], + "summary": "read_txt():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 70, + 72 + ], + "summary": "log_norm():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 107, + 121 + ], + "summary": "build_data():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 124, + 153 + ], + "summary": "sample_hard_negatives():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_lgcn_v2.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 213, + 214 + ], + "summary": "cos_sim():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::predict_cos", + "type": "function", + "name": "predict_cos", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 218, + 229 + ], + "summary": "predict_cos():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::train", + "type": "function", + "name": "train", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 233, + 262 + ], + "summary": "train():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_lgcn_v2.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/run_lgcn_v2.py", + "summary": "LightGCNLayer(类):定义于 run_lgcn_v2.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_lgcn_v2.py::LightGCN_Norm", + "type": "class", + "name": "LightGCN_Norm", + "filePath": "code/run_lgcn_v2.py", + "summary": "LightGCN_Norm(类):定义于 run_lgcn_v2.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_ultimate.py", + "type": "file", + "name": "run_ultimate.py", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 1, + 450 + ], + "summary": "【legacy】ultimate 阶段实验脚本。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_ultimate.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 27, + 32 + ], + "summary": "set_seed():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 39, + 44 + ], + "summary": "read_txt():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 85, + 87 + ], + "summary": "log_norm():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 119, + 136 + ], + "summary": "build_data():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 139, + 168 + ], + "summary": "sample_hard_negatives():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_ultimate.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 171, + 172 + ], + "summary": "cos_sim():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::predict_cos_batched", + "type": "function", + "name": "predict_cos_batched", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 302, + 315 + ], + "summary": "predict_cos_batched():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::train_lightgcn", + "type": "function", + "name": "train_lightgcn", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 319, + 348 + ], + "summary": "train_lightgcn():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_ultimate.py::train_sage", + "type": "function", + "name": "train_sage", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 351, + 380 + ], + "summary": "train_sage():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_ultimate.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/run_ultimate.py", + "summary": "LightGCNLayer(类):定义于 run_ultimate.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_ultimate.py::LightGCNRecommender", + "type": "class", + "name": "LightGCNRecommender", + "filePath": "code/run_ultimate.py", + "summary": "LightGCNRecommender(类):定义于 run_ultimate.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_ultimate.py::ResidualHeteroConv", + "type": "class", + "name": "ResidualHeteroConv", + "filePath": "code/run_ultimate.py", + "summary": "ResidualHeteroConv(类):定义于 run_ultimate.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_ultimate.py::SAGERecommender", + "type": "class", + "name": "SAGERecommender", + "filePath": "code/run_ultimate.py", + "summary": "SAGERecommender(类):定义于 run_ultimate.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_v2.py", + "type": "file", + "name": "run_v2.py", + "filePath": "code/run_v2.py", + "lineRange": [ + 1, + 520 + ], + "summary": "【legacy】v2 阶段实验脚本。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_v2.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_v2.py", + "lineRange": [ + 36, + 41 + ], + "summary": "set_seed():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_v2.py", + "lineRange": [ + 48, + 53 + ], + "summary": "read_txt():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_v2.py", + "lineRange": [ + 106, + 108 + ], + "summary": "log_norm():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_v2.py", + "lineRange": [ + 274, + 311 + ], + "summary": "sample_hard_negatives():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_v2.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_v2.py", + "lineRange": [ + 315, + 316 + ], + "summary": "cos_sim():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::evaluate", + "type": "function", + "name": "evaluate", + "filePath": "code/run_v2.py", + "lineRange": [ + 320, + 338 + ], + "summary": "evaluate():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::predict_cos", + "type": "function", + "name": "predict_cos", + "filePath": "code/run_v2.py", + "lineRange": [ + 342, + 349 + ], + "summary": "predict_cos():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::run_experiment", + "type": "function", + "name": "run_experiment", + "filePath": "code/run_v2.py", + "lineRange": [ + 353, + 434 + ], + "summary": "run_experiment():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_v2.py::predict_batched", + "type": "function", + "name": "predict_batched", + "filePath": "code/run_v2.py", + "lineRange": [ + 458, + 471 + ], + "summary": "predict_batched():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "class:code/run_v2.py::GNNEncoder", + "type": "class", + "name": "GNNEncoder", + "filePath": "code/run_v2.py", + "summary": "GNNEncoder(类):定义于 run_v2.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_v2.py::DotDecoder", + "type": "class", + "name": "DotDecoder", + "filePath": "code/run_v2.py", + "summary": "DotDecoder(类):定义于 run_v2.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_v2.py::Recommender", + "type": "class", + "name": "Recommender", + "filePath": "code/run_v2.py", + "summary": "Recommender(类):定义于 run_v2.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/score_level_meta_stack.py", + "type": "file", + "name": "score_level_meta_stack.py", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 1, + 236 + ], + "summary": "分数级 meta-stack:在原始分数层做二级融合实验。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/score_level_meta_stack.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 21, + 26 + ], + "summary": "load_module():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 29, + 34 + ], + "summary": "best_f1():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::prf", + "type": "function", + "name": "prf", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 37, + 44 + ], + "summary": "prf():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 47, + 51 + ], + "summary": "rank01():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 54, + 55 + ], + "summary": "zscore():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::author_rank01", + "type": "function", + "name": "author_rank01", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 58, + 66 + ], + "summary": "author_rank01():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::add_score_block", + "type": "function", + "name": "add_score_block", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 69, + 70 + ], + "summary": "add_score_block():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 73, + 74 + ], + "summary": "read_txt():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::load_sources", + "type": "function", + "name": "load_sources", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 77, + 105 + ], + "summary": "load_sources():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/score_level_meta_stack.py::fit_oof_predict", + "type": "function", + "name": "fit_oof_predict", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 108, + 133 + ], + "summary": "fit_oof_predict():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/score_level_meta_stack.py::write_sub", + "type": "function", + "name": "write_sub", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 136, + 144 + ], + "summary": "write_sub():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::main", + "type": "function", + "name": "main", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 147, + 232 + ], + "summary": "main():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/search_dynamic_fusion.py", + "type": "file", + "name": "search_dynamic_fusion.py", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 1, + 140 + ], + "summary": "动态融合超参/权重搜索。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/search_dynamic_fusion.py::load_train_module", + "type": "function", + "name": "load_train_module", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 16, + 21 + ], + "summary": "load_train_module():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_dynamic_fusion.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 24, + 28 + ], + "summary": "best_f1():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_dynamic_fusion.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 31, + 35 + ], + "summary": "rank01():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_dynamic_fusion.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 38, + 39 + ], + "summary": "zscore():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_dynamic_fusion.py::main", + "type": "function", + "name": "main", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 42, + 136 + ], + "summary": "main():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/search_val_fusion.py", + "type": "file", + "name": "search_val_fusion.py", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 1, + 127 + ], + "summary": "验证集融合权重搜索。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/search_val_fusion.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 15, + 20 + ], + "summary": "best_f1():定义于 search_val_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_val_fusion.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 23, + 27 + ], + "summary": "rank01():定义于 search_val_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_val_fusion.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 30, + 31 + ], + "summary": "zscore():定义于 search_val_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_val_fusion.py::main", + "type": "function", + "name": "main", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 34, + 123 + ], + "summary": "main():定义于 search_val_fusion.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/stack_rank_calibration.py", + "type": "file", + "name": "stack_rank_calibration.py", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 1, + 294 + ], + "summary": "两大事实共享库之一。定义 ExplicitGraphFeatures(18 维显式图/meta-path 特征:A-A-P/A-P-P/A-P-A-P 共同邻居、度等)与 add_rank_features(把任意分数转 score/global_rank/author_pct/author_rank 4 列)。被每个 stacker 加载,提供 Stage-2 的手工图特征骨架。", + "tags": [ + "shared-library", + "core", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/stack_rank_calibration.py::load_lgcn_module", + "type": "function", + "name": "load_lgcn_module", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 22, + 27 + ], + "summary": "load_lgcn_module():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 30, + 31 + ], + "summary": "read_txt():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 34, + 39 + ], + "summary": "best_f1():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 42, + 46 + ], + "summary": "rank01():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 49, + 50 + ], + "summary": "zscore():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::add_rank_features", + "type": "function", + "name": "add_rank_features", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 148, + 160 + ], + "summary": "把任意分数列转成 score/global_rank/author_pct/author_rank 4 维 rank 校准特征,喂 Stage-2 LightGBM。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::fit_oof", + "type": "function", + "name": "fit_oof", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 163, + 184 + ], + "summary": "fit_oof():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::boundary_rerank", + "type": "function", + "name": "boundary_rerank", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 187, + 201 + ], + "summary": "boundary_rerank():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::main", + "type": "function", + "name": "main", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 204, + 290 + ], + "summary": "main():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/stack_rank_calibration.py::ExplicitGraphFeatures", + "type": "class", + "name": "ExplicitGraphFeatures", + "filePath": "code/stack_rank_calibration.py", + "summary": "ExplicitGraphFeatures(类):定义于 stack_rank_calibration.py;方法 __init__, transform。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_dynamic_feature_fusion.py", + "type": "file", + "name": "train_dynamic_feature_fusion.py", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 1, + 282 + ], + "summary": "动态特征融合 stacker(融合多源分数),探索性。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::load_train_module", + "type": "function", + "name": "load_train_module", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 21, + 26 + ], + "summary": "load_train_module():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 29, + 30 + ], + "summary": "read_txt():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 33, + 37 + ], + "summary": "best_f1():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 40, + 44 + ], + "summary": "rank01():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 204, + 278 + ], + "summary": "main():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_dynamic_feature_fusion.py::FeatureBuilder", + "type": "class", + "name": "FeatureBuilder", + "filePath": "code/train_dynamic_feature_fusion.py", + "summary": "FeatureBuilder(类):定义于 train_dynamic_feature_fusion.py;方法 __init__, sample_train_pairs, sample_task_pairs, transform。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_val_hgt_bpr.py", + "type": "file", + "name": "train_val_hgt_bpr.py", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 1, + 188 + ], + "summary": "HGT(异构图 Transformer)+ BPR 训练实验,未进入最终集成(探索性)。", + "tags": [ + "model-training", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_hgt_bpr.py::load_lgcn_module", + "type": "function", + "name": "load_lgcn_module", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_lgcn_module():定义于 train_val_hgt_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_hgt_bpr.py::predict_scores", + "type": "function", + "name": "predict_scores", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 68, + 77 + ], + "summary": "predict_scores():定义于 train_val_hgt_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_hgt_bpr.py::train_one", + "type": "function", + "name": "train_one", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 80, + 130 + ], + "summary": "train_one():定义于 train_val_hgt_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_hgt_bpr.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 133, + 184 + ], + "summary": "main():定义于 train_val_hgt_bpr.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_hgt_bpr.py::HGTRecommender", + "type": "class", + "name": "HGTRecommender", + "filePath": "code/train_val_hgt_bpr.py", + "summary": "HGTRecommender(类):定义于 train_val_hgt_bpr.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_val_lgcn_ensemble.py", + "type": "file", + "name": "train_val_lgcn_ensemble.py", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 1, + 506 + ], + "summary": "两大事实共享库之一。定义数据载入(build_parts/build_data 读三类边 + feature.pkl)、确定性验证切分 make_notebook_style_split(seed=202, train_frac=0.9:留出 10% 正边 + 等量随机负边 = 136,484 对 1:1)、LightGCN 异构 CF 集成训练、best_f1()(PR 曲线 argmax 取最优 F1 阈值)。被 ~14 个下游脚本以 load_module 加载,是整个流水线的地基。", + "tags": [ + "shared-library", + "core", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 28, + 33 + ], + "summary": "set_seed():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 36, + 41 + ], + "summary": "read_txt():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 44, + 46 + ], + "summary": "log_norm():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 128, + 129 + ], + "summary": "cos_sim():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::make_notebook_style_split", + "type": "function", + "name": "make_notebook_style_split", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 132, + 165 + ], + "summary": "【确定性验证切分】seed=202、train_frac=0.9:留出 10% 已知正边(68,242)作验证正例,再等量随机采样非边作负例 → 136,484 对 1:1 人工平衡验证集。pandas.sample(random_state=202)+np.random.default_rng(202)。被全流水线共用。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::build_parts", + "type": "function", + "name": "build_parts", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 168, + 236 + ], + "summary": "读 data_and_docs 三类边 txt + feature.pkl,构造 author/paper 索引、二部/合著/引用邻接与 USE 嵌入矩阵。整个流水线的数据入口。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 239, + 270 + ], + "summary": "把 build_parts 的张量组装成 PyG/HeteroData 或训练用的边表 + 标签,供 LightGCN 训练。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 273, + 305 + ], + "summary": "LightGCN 硬负采样:混合 random/popular/coauthor-pool 策略采样难负例,提升 BPR 训练效果。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::predict_scores", + "type": "function", + "name": "predict_scores", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 309, + 337 + ], + "summary": "predict_scores():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 340, + 346 + ], + "summary": "由 precision_recall_curve 求 2PR/(P+R) 的 argmax,返回最优 F1 与对应阈值。leak-free 验证评估的标准函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::train_one", + "type": "function", + "name": "train_one", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 349, + 414 + ], + "summary": "train_one():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 417, + 502 + ], + "summary": "main():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_lgcn_ensemble.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/train_val_lgcn_ensemble.py", + "summary": "LightGCNLayer(类):定义于 train_val_lgcn_ensemble.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_lgcn_ensemble.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/train_val_lgcn_ensemble.py", + "summary": "LightGCN(类):定义于 train_val_lgcn_ensemble.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_lgcn_ensemble.py::LearnableWeightLightGCN", + "type": "class", + "name": "LearnableWeightLightGCN", + "filePath": "code/train_val_lgcn_ensemble.py", + "summary": "LearnableWeightLightGCN(类):定义于 train_val_lgcn_ensemble.py;方法 __init__, encode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_val_mf_bpr.py", + "type": "file", + "name": "train_val_mf_bpr.py", + "filePath": "code/train_val_mf_bpr.py", + "lineRange": [ + 1, + 110 + ], + "summary": "BPR 矩阵分解训练器(dim 可配),为 extra_score_sources 提供 bpr_mf 分数。", + "tags": [ + "model-training", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_mf_bpr.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/train_val_mf_bpr.py", + "lineRange": [ + 16, + 20 + ], + "summary": "best_f1():定义于 train_val_mf_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_mf_bpr.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_val_mf_bpr.py", + "lineRange": [ + 41, + 106 + ], + "summary": "main():定义于 train_val_mf_bpr.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_mf_bpr.py::MF", + "type": "class", + "name": "MF", + "filePath": "code/train_val_mf_bpr.py", + "summary": "MF(类):定义于 train_val_mf_bpr.py;方法 __init__, score。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_val_sage_bpr.py", + "type": "file", + "name": "train_val_sage_bpr.py", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 1, + 188 + ], + "summary": "GraphSAGE + BPR 训练实验,探索性对比。", + "tags": [ + "model-training", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_sage_bpr.py::load_lgcn_module", + "type": "function", + "name": "load_lgcn_module", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_lgcn_module():定义于 train_val_sage_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_sage_bpr.py::predict_scores", + "type": "function", + "name": "predict_scores", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 74, + 83 + ], + "summary": "predict_scores():定义于 train_val_sage_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_sage_bpr.py::train_one", + "type": "function", + "name": "train_one", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 86, + 130 + ], + "summary": "train_one():定义于 train_val_sage_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_sage_bpr.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 133, + 184 + ], + "summary": "main():定义于 train_val_sage_bpr.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_sage_bpr.py::ResidualSAGE", + "type": "class", + "name": "ResidualSAGE", + "filePath": "code/train_val_sage_bpr.py", + "summary": "ResidualSAGE(类):定义于 train_val_sage_bpr.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_sage_bpr.py::SAGERecommender", + "type": "class", + "name": "SAGERecommender", + "filePath": "code/train_val_sage_bpr.py", + "summary": "SAGERecommender(类):定义于 train_val_sage_bpr.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:data_and_docs/advice.md", + "type": "document", + "name": "advice.md", + "filePath": "data_and_docs/advice.md", + "lineRange": [ + 1, + 468 + ], + "summary": "课程建议/任务说明补充。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:data_and_docs/dataset.md", + "type": "document", + "name": "dataset.md", + "filePath": "data_and_docs/dataset.md", + "lineRange": [ + 1, + 26 + ], + "summary": "数据集字段说明(三类边文件 + feature.pkl)。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/project_description.md", + "type": "document", + "name": "project_description.md", + "filePath": "data_and_docs/project_description.md", + "lineRange": [ + 1, + 21 + ], + "summary": "项目任务描述(author-paper 推荐,F1 评测)。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/project_evaluation.md", + "type": "document", + "name": "project_evaluation.md", + "filePath": "data_and_docs/project_evaluation.md", + "lineRange": [ + 1, + 14 + ], + "summary": "评测细则(公开榜 50%、F1 系数、提交列名)。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/project-example-2026-pygver.ipynb", + "type": "file", + "name": "project-example-2026-pygver.ipynb", + "filePath": "data_and_docs/project-example-2026-pygver.ipynb", + "summary": "官方示例 notebook(PyG 版),参考基线来源。", + "tags": [ + "task-spec", + "data-doc" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/proposal.md", + "type": "document", + "name": "proposal.md", + "filePath": "data_and_docs/proposal.md", + "lineRange": [ + 1, + 49 + ], + "summary": "项目提案(早期方案)。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/references.md", + "type": "document", + "name": "references.md", + "filePath": "data_and_docs/references.md", + "lineRange": [ + 1, + 11 + ], + "summary": "参考文献列表。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:docs_first_principles/_fact_sheet.md", + "type": "document", + "name": "_fact_sheet.md", + "filePath": "docs_first_principles/_fact_sheet.md", + "lineRange": [ + 1, + 287 + ], + "summary": "【权威事实表】全部文档的数字真相源。§2 各阶段 F1、§2.4 高阶消融(108→190→214→259)、§2.5 259 维构成、§5 不一致台账、§6 代码定位。不直接进论文正文。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/00_README.md", + "type": "document", + "name": "00_README.md", + "filePath": "docs_first_principles/00_README.md", + "lineRange": [ + 1, + 152 + ], + "summary": "【第一性原理文档包入口】导航地图 + 全局数字索引。15 篇中文文档的阅读顺序与一句话用途。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/01_problem_and_dataset.md", + "type": "document", + "name": "01_problem_and_dataset.md", + "filePath": "docs_first_principles/01_problem_and_dataset.md", + "lineRange": [ + 1, + 168 + ], + "summary": "任务定义与数据集:异构图三类边、规模、F1 评测、稀疏/长尾难度。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/02_architecture_overview.md", + "type": "document", + "name": "02_architecture_overview.md", + "filePath": "docs_first_principles/02_architecture_overview.md", + "lineRange": [ + 1, + 236 + ], + "summary": "两阶段 stacking 架构总览:Stage-1 多源 + Stage-2 LightGBM + rank-cutoff。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/03_data_flow_and_artifacts.md", + "type": "document", + "name": "03_data_flow_and_artifacts.md", + "filePath": "docs_first_principles/03_data_flow_and_artifacts.md", + "lineRange": [ + 1, + 302 + ], + "summary": "数据流与产物:txt→切分→.npy 分数→OOF→submission,文件名约定与缓存。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/04_lightgcn_from_first_principles.md", + "type": "document", + "name": "04_lightgcn_from_first_principles.md", + "filePath": "docs_first_principles/04_lightgcn_from_first_principles.md", + "lineRange": [ + 1, + 335 + ], + "summary": "LightGCN 第一性原理:为何轻、BPR+硬负采样、点积解码、主分数生产者。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "type": "document", + "name": "05_feature_stacking_and_lightgbm.md", + "filePath": "docs_first_principles/05_feature_stacking_and_lightgbm.md", + "lineRange": [ + 1, + 242 + ], + "summary": "手工图/meta-path 特征 + LightGBM 二阶段融合:为何 stacking 是单阶段最大增益(+0.0174)。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/06_random_walk_features.md", + "type": "document", + "name": "06_random_walk_features.md", + "filePath": "docs_first_principles/06_random_walk_features.md", + "lineRange": [ + 1, + 254 + ], + "summary": "随机游走(DeepWalk/Node2Vec,7 块):补全局接近度信息。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/07_high_order_citation_propagation.md", + "type": "document", + "name": "07_high_order_citation_propagation.md", + "filePath": "docs_first_principles/07_high_order_citation_propagation.md", + "lineRange": [ + 1, + 357 + ], + "summary": "高阶引用传播:H_k=R·C^k / G_k=S·R·C^k,fwd/bwd/undir,最终核心增益。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:docs_first_principles/08_calibration_and_rank_cutoff.md", + "type": "document", + "name": "08_calibration_and_rank_cutoff.md", + "filePath": "docs_first_principles/08_calibration_and_rank_cutoff.md", + "lineRange": [ + 1, + 293 + ], + "summary": "校准与 rank cutoff:验证 1:1→测试分布漂移(阈值 0.4617 vs 漂移 0.5242)。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/09_experiment_timeline.md", + "type": "document", + "name": "09_experiment_timeline.md", + "filePath": "docs_first_principles/09_experiment_timeline.md", + "lineRange": [ + 1, + 141 + ], + "summary": "实验演进时间线:baseline 0.8850→最终 0.9669/0.96626 的结果表与三段跃迁解读。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/10_code_map_and_entrypoints.md", + "type": "document", + "name": "10_code_map_and_entrypoints.md", + "filePath": "docs_first_principles/10_code_map_and_entrypoints.md", + "lineRange": [ + 1, + 185 + ], + "summary": "代码地图与入口:30+ 脚本分类、两大共享库、legacy、三条核心命令。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/11_figures_and_paper_mapping.md", + "type": "document", + "name": "11_figures_and_paper_mapping.md", + "filePath": "docs_first_principles/11_figures_and_paper_mapping.md", + "lineRange": [ + 1, + 367 + ], + "summary": "图表与论文章节映射:11 张图 caption + 与正文小节对应。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:docs_first_principles/12_reproduction_guide.md", + "type": "document", + "name": "12_reproduction_guide.md", + "filePath": "docs_first_principles/12_reproduction_guide.md", + "lineRange": [ + 1, + 324 + ], + "summary": "复现指南:环境、最短/从零路径、快速验证、常见坑。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:docs_first_principles/13_common_questions_for_the_author.md", + "type": "document", + "name": "13_common_questions_for_the_author.md", + "filePath": "docs_first_principles/13_common_questions_for_the_author.md", + "lineRange": [ + 1, + 212 + ], + "summary": "答辩/审稿常见问题与回答。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/SUMMARY_FOR_PAPER.md", + "type": "document", + "name": "SUMMARY_FOR_PAPER.md", + "filePath": "docs_first_principles/SUMMARY_FOR_PAPER.md", + "lineRange": [ + 1, + 310 + ], + "summary": "论文级总览:可直接进 TeX 的正式表述 + 图表素材清单。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:env/conda-list-cs3319.txt", + "type": "document", + "name": "conda-list-cs3319.txt", + "filePath": "env/conda-list-cs3319.txt", + "lineRange": [ + 1, + 100 + ], + "summary": "conda list 导出(完整版本快照)。", + "tags": [ + "docs" + ], + "complexity": "simple" + }, + { + "id": "file:env/environment-cs3319.yml", + "type": "config", + "name": "environment-cs3319.yml", + "filePath": "env/environment-cs3319.yml", + "lineRange": [ + 1, + 106 + ], + "summary": "Conda 完整环境定义(numpy/pandas/scipy/sklearn/lightgbm/torch/torch-geometric/gensim/networkx/node2vec)。", + "tags": [ + "config" + ], + "complexity": "simple" + }, + { + "id": "file:env/requirements-minimal.txt", + "type": "document", + "name": "requirements-minimal.txt", + "filePath": "env/requirements-minimal.txt", + "lineRange": [ + 1, + 10 + ], + "summary": "最小 pinned 依赖(Python 3.10)。", + "tags": [ + "docs" + ], + "complexity": "simple" + }, + { + "id": "file:figures_paper/README_figures.md", + "type": "document", + "name": "README_figures.md", + "filePath": "figures_paper/README_figures.md", + "lineRange": [ + 1, + 115 + ], + "summary": "figures_paper 图集说明。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig1_graph_overview.py", + "type": "file", + "name": "fig1_graph_overview.py", + "filePath": "figures_paper/scripts/fig1_graph_overview.py", + "lineRange": [ + 1, + 96 + ], + "summary": "figures_paper 图1 异构图结构概览。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig1_graph_overview.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig1_graph_overview.py", + "lineRange": [ + 16, + 90 + ], + "summary": "make():定义于 fig1_graph_overview.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig2_sparsity.py", + "type": "file", + "name": "fig2_sparsity.py", + "filePath": "figures_paper/scripts/fig2_sparsity.py", + "lineRange": [ + 1, + 91 + ], + "summary": "figures_paper 图2 稀疏度/长尾分布。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig2_sparsity.py::_ccdf", + "type": "function", + "name": "_ccdf", + "filePath": "figures_paper/scripts/fig2_sparsity.py", + "lineRange": [ + 17, + 24 + ], + "summary": "_ccdf():定义于 fig2_sparsity.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig2_sparsity.py::_panel_ccdf", + "type": "function", + "name": "_panel_ccdf", + "filePath": "figures_paper/scripts/fig2_sparsity.py", + "lineRange": [ + 27, + 35 + ], + "summary": "_panel_ccdf():定义于 fig2_sparsity.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig2_sparsity.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig2_sparsity.py", + "lineRange": [ + 38, + 85 + ], + "summary": "make():定义于 fig2_sparsity.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig3_roadmap.py", + "type": "file", + "name": "fig3_roadmap.py", + "filePath": "figures_paper/scripts/fig3_roadmap.py", + "lineRange": [ + 1, + 90 + ], + "summary": "figures_paper 图3 方法路线图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig3_roadmap.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig3_roadmap.py", + "lineRange": [ + 27, + 84 + ], + "summary": "make():定义于 fig3_roadmap.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig4_architecture.py", + "type": "file", + "name": "fig4_architecture.py", + "filePath": "figures_paper/scripts/fig4_architecture.py", + "lineRange": [ + 1, + 87 + ], + "summary": "figures_paper 图4 架构图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig4_architecture.py::_box", + "type": "function", + "name": "_box", + "filePath": "figures_paper/scripts/fig4_architecture.py", + "lineRange": [ + 16, + 20 + ], + "summary": "_box():定义于 fig4_architecture.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig4_architecture.py::_arrow", + "type": "function", + "name": "_arrow", + "filePath": "figures_paper/scripts/fig4_architecture.py", + "lineRange": [ + 23, + 24 + ], + "summary": "_arrow():定义于 fig4_architecture.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig4_architecture.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig4_architecture.py", + "lineRange": [ + 27, + 81 + ], + "summary": "make():定义于 fig4_architecture.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig5_ablation_highorder.py", + "type": "file", + "name": "fig5_ablation_highorder.py", + "filePath": "figures_paper/scripts/fig5_ablation_highorder.py", + "lineRange": [ + 1, + 96 + ], + "summary": "figures_paper 图5 高阶消融。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig5_ablation_highorder.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig5_ablation_highorder.py", + "lineRange": [ + 31, + 90 + ], + "summary": "make():定义于 fig5_ablation_highorder.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig6_rank_vs_threshold.py", + "type": "file", + "name": "fig6_rank_vs_threshold.py", + "filePath": "figures_paper/scripts/fig6_rank_vs_threshold.py", + "lineRange": [ + 1, + 88 + ], + "summary": "figures_paper 图6 rank vs threshold 决策对比。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig6_rank_vs_threshold.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig6_rank_vs_threshold.py", + "lineRange": [ + 21, + 82 + ], + "summary": "make():定义于 fig6_rank_vs_threshold.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig7_error_heatmap.py", + "type": "file", + "name": "fig7_error_heatmap.py", + "filePath": "figures_paper/scripts/fig7_error_heatmap.py", + "lineRange": [ + 1, + 92 + ], + "summary": "figures_paper 图7 误差热图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig7_error_heatmap.py::_bucket_order_key", + "type": "function", + "name": "_bucket_order_key", + "filePath": "figures_paper/scripts/fig7_error_heatmap.py", + "lineRange": [ + 27, + 37 + ], + "summary": "_bucket_order_key():定义于 fig7_error_heatmap.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig7_error_heatmap.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig7_error_heatmap.py", + "lineRange": [ + 40, + 86 + ], + "summary": "make():定义于 fig7_error_heatmap.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/figA1_hyperparam.py", + "type": "file", + "name": "figA1_hyperparam.py", + "filePath": "figures_paper/scripts/figA1_hyperparam.py", + "lineRange": [ + 1, + 51 + ], + "summary": "figures_paper 附录图A1 超参。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/figA1_hyperparam.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/figA1_hyperparam.py", + "lineRange": [ + 14, + 45 + ], + "summary": "make():定义于 figA1_hyperparam.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/figA2_rw_ablation.py", + "type": "file", + "name": "figA2_rw_ablation.py", + "filePath": "figures_paper/scripts/figA2_rw_ablation.py", + "lineRange": [ + 1, + 44 + ], + "summary": "figures_paper 附录图A2 RW 消融。", + "tags": [ + "ablation", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/figA2_rw_ablation.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/figA2_rw_ablation.py", + "lineRange": [ + 11, + 38 + ], + "summary": "make():定义于 figA2_rw_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/figA3_feature_importance.py", + "type": "file", + "name": "figA3_feature_importance.py", + "filePath": "figures_paper/scripts/figA3_feature_importance.py", + "lineRange": [ + 1, + 50 + ], + "summary": "figures_paper 附录图A3 特征重要性。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/figA3_feature_importance.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/figA3_feature_importance.py", + "lineRange": [ + 25, + 44 + ], + "summary": "make():定义于 figA3_feature_importance.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:figures_paper/scripts/figA4_oof_pr.py", + "type": "file", + "name": "figA4_oof_pr.py", + "filePath": "figures_paper/scripts/figA4_oof_pr.py", + "lineRange": [ + 1, + 61 + ], + "summary": "figures_paper 附录图A4 OOF PR 曲线。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/figA4_oof_pr.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/figA4_oof_pr.py", + "lineRange": [ + 19, + 55 + ], + "summary": "make():定义于 figA4_oof_pr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/make_all_figures.py", + "type": "file", + "name": "make_all_figures.py", + "filePath": "figures_paper/scripts/make_all_figures.py", + "lineRange": [ + 1, + 119 + ], + "summary": "figures_paper 11 图集一键生成入口。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:figures_paper/scripts/make_all_figures.py::_load", + "type": "function", + "name": "_load", + "filePath": "figures_paper/scripts/make_all_figures.py", + "lineRange": [ + 38, + 42 + ], + "summary": "_load():定义于 make_all_figures.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/make_all_figures.py::main", + "type": "function", + "name": "main", + "filePath": "figures_paper/scripts/make_all_figures.py", + "lineRange": [ + 45, + 69 + ], + "summary": "main():定义于 make_all_figures.py 的函数。", + "tags": [ + "function" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/make_all_figures.py::_write_readme", + "type": "function", + "name": "_write_readme", + "filePath": "figures_paper/scripts/make_all_figures.py", + "lineRange": [ + 72, + 113 + ], + "summary": "_write_readme():定义于 make_all_figures.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/style.py", + "type": "file", + "name": "style.py", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 1, + 67 + ], + "summary": "figures_paper 图集共享 matplotlib 样式。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/style.py::apply", + "type": "function", + "name": "apply", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 20, + 45 + ], + "summary": "apply():定义于 style.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "func:figures_paper/scripts/style.py::ensure_dirs", + "type": "function", + "name": "ensure_dirs", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 48, + 55 + ], + "summary": "ensure_dirs():定义于 style.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/style.py::save", + "type": "function", + "name": "save", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 58, + 63 + ], + "summary": "save():定义于 style.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/style.py::stat_box", + "type": "function", + "name": "stat_box", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 66, + 67 + ], + "summary": "stat_box():定义于 style.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:notes/experiment_history.md", + "type": "document", + "name": "experiment_history.md", + "filePath": "notes/experiment_history.md", + "lineRange": [ + 1, + 319 + ], + "summary": "实验历史笔记:早期 GNN 实验(§1-3)、各阶段试错记录。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:README.md", + "type": "document", + "name": "README.md", + "filePath": "README.md", + "lineRange": [ + 1, + 253 + ], + "summary": "项目主 README:结果表(公开 F1 链)+ 精确复现命令 + 核心脚本表。读这份拿结果数据。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:reports/exploration_summary.md", + "type": "document", + "name": "exploration_summary.md", + "filePath": "reports/exploration_summary.md", + "lineRange": [ + 1, + 861 + ], + "summary": "探索总结:各阶段验证 F1 表、跨 seed 稳定性、RW 公开分偏乐观的教训(§16)。", + "tags": [ + "report", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:reports/final_report.md", + "type": "document", + "name": "final_report.md", + "filePath": "reports/final_report.md", + "lineRange": [ + 1, + 202 + ], + "summary": "最终报告:方法与结果叙事版。", + "tags": [ + "report", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:reports/paper_writing_guide.md", + "type": "document", + "name": "paper_writing_guide.md", + "filePath": "reports/paper_writing_guide.md", + "lineRange": [ + 1, + 321 + ], + "summary": "论文写作指南:章节结构与表述建议。", + "tags": [ + "report", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:reports/preliminary_report.md", + "type": "document", + "name": "preliminary_report.md", + "filePath": "reports/preliminary_report.md", + "lineRange": [ + 1, + 175 + ], + "summary": "初步报告(早期阶段叙事)。", + "tags": [ + "report", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:WORKSPACE_STATUS.md", + "type": "document", + "name": "WORKSPACE_STATUS.md", + "filePath": "WORKSPACE_STATUS.md", + "lineRange": [ + 1, + 262 + ], + "summary": "工作区状态备忘(2026-06-17),含目录存在性记录。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + } + ], + "edges": [ + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/figures/fig1_dataset_overview.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig10_rw_ensemble_size.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig2_framework.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig3_progression.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig4_highorder_ablation.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig5_pr_roc.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig6_feature_contribution.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig7_error_analysis.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig8_lgcn_ensemble_correlation.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig9_lgcn_hyperparam.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/content_rich_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/node2vec_deepwalk_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/post95_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/post95_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_ensemble_ablation.py", + "target": "file:code/generate_randomwalk_ensemble_submission.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/randomwalk_ensemble_ablation.py", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/randomwalk_one_ablation.py", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:figures_paper/scripts/fig1_graph_overview.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig2_sparsity.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig3_roadmap.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig4_architecture.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig5_ablation_highorder.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig6_rank_vs_threshold.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig7_error_heatmap.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/figA1_hyperparam.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/figA2_rw_ablation.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/figA3_feature_importance.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/figA4_oof_pr.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/make_all_figures.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::sample_hard_neg", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::evaluate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_vanilla_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_learnw_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_gat_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_sage_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_deep_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_wide_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::run_trial", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "class:code/compare_gnn.py::MeanAggLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/compare_gnn.py", + "target": "class:code/compare_gnn.py::GATAggLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/compare_gnn.py", + "target": "class:code/compare_gnn.py::SAGEAggLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::content_rich_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::prf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::score_at_threshold", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::author_rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::author_rank_position", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::score_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::fit_full_lgb", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::average_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::bucket_cut", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::bucket_quantile", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::load_submission_pred", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::write_submission", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::write_group_submission", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::group_threshold", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::summarize_pred", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::build_feature_names", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::build_val_test_context", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::error_analysis", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::add_agreement_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::boundary_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::load_train_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::infer_layers", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::score_model", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::score_to_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::content_mean_score", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::train_ranker_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "class:code/extra_score_sources_ablation.py::MF", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig1_dataset_overview.py", + "target": "func:code/figures/fig1_dataset_overview.py::plot_ccdf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/fig2_framework.py", + "target": "func:code/figures/fig2_framework.py::box", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/fig2_framework.py", + "target": "func:code/figures/fig2_framework.py::arrow", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/fig7_error_analysis.py", + "target": "func:code/figures/fig7_error_analysis.py::plot_buckets", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/fig9_lgcn_hyperparam.py", + "target": "func:code/figures/fig9_lgcn_hyperparam.py::parse", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/gen_val_labels.py", + "target": "func:code/figures/gen_val_labels.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/gen_val_labels.py", + "target": "func:code/figures/gen_val_labels.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/plot_style.py", + "target": "func:code/figures/plot_style.py::apply", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/plot_style.py", + "target": "func:code/figures/plot_style.py::save", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_conservative_rw_blends.py", + "target": "func:code/generate_conservative_rw_blends.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_conservative_rw_blends.py", + "target": "func:code/generate_conservative_rw_blends.py::write_ratio_submission", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_conservative_rw_blends.py", + "target": "func:code/generate_conservative_rw_blends.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "func:code/generate_content_rich_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "func:code/generate_content_rich_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "func:code/generate_content_rich_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::build", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::predict_dot", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::write", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "class:code/generate_dot_submission.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "class:code/generate_dot_submission.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::build_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "class:code/generate_ens6_submission.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "class:code/generate_ens6_submission.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "func:code/generate_extra_bprmf_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "func:code/generate_extra_bprmf_submission.py::train_mf_test_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "func:code/generate_extra_bprmf_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "func:code/generate_extra_bprmf_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::build_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::checkpoint_weight", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::percent_rank", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::write_threshold_submissions", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::write_top_ratio_submissions", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "class:code/generate_large_ensemble_submission.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "class:code/generate_large_ensemble_submission.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "func:code/generate_node2vec_deepwalk_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "func:code/generate_node2vec_deepwalk_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "func:code/generate_node2vec_deepwalk_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::infer_layers", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::infer_mode", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::score_cache_path", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::checkpoint_for_score", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::ensemble_member_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::score_val_path_on_test", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::select_variant_val_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::variant_feature_matrix", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::topk_content_similarity_fast", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::make_submissions", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "func:code/generate_randomwalk_ensemble_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "func:code/generate_randomwalk_ensemble_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "func:code/generate_randomwalk_ensemble_submission.py::aggregate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "func:code/generate_randomwalk_ensemble_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "func:code/generate_randomwalk_single_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "func:code/generate_randomwalk_single_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "func:code/generate_randomwalk_single_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::row_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::topk_prune_rows", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::extract_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::build_high_order", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::build_high_order_directed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::fit_full_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::write_ratio_submission", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_model_compare.py", + "target": "func:code/high_order_model_compare.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_model_compare.py", + "target": "func:code/high_order_model_compare.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_model_compare.py", + "target": "func:code/high_order_model_compare.py::fit_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_model_compare.py", + "target": "func:code/high_order_model_compare.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/make_notebook_style_split.py", + "target": "func:code/make_notebook_style_split.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/make_notebook_style_split.py", + "target": "func:code/make_notebook_style_split.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::build_graph", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::deepwalk_walks", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::train_deepwalk", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::train_node2vec", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::pair_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::prf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::bucket_series", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::error_analysis", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::group_threshold", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::author_quota_tuning", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::negative_evidence_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::topk_content_similarity", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_ensemble_ablation.py", + "target": "func:code/randomwalk_ensemble_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_one_ablation.py", + "target": "func:code/randomwalk_one_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::small_configs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::graph_configs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::extra_configs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::build_graph", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::deepwalk_walks", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::train_model", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::embedding_arrays", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::build_base_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::train_full_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::fit_full_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::write_sub", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "func:code/run_baseline.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "func:code/run_baseline.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "func:code/run_baseline.py::sample_negative_edges", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "func:code/run_baseline.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "class:code/run_baseline.py::HeteroMeanConv", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_baseline.py", + "target": "class:code/run_baseline.py::HeteroRecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::evaluate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::predict_cos_batched", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::train_model", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "class:code/run_final.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_final.py", + "target": "class:code/run_final.py::LightGCNRecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_graph_features.py", + "target": "func:code/run_graph_features.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_graph_features.py", + "target": "func:code/run_graph_features.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_graph_features.py", + "target": "func:code/run_graph_features.py::log1p_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_graph_features.py", + "target": "func:code/run_graph_features.py::compute_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::run_experiment", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::evaluate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::predict_all", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "class:code/run_improved.py::ResidualHeteroConv", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_improved.py", + "target": "class:code/run_improved.py::MLPDecoder", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_improved.py", + "target": "class:code/run_improved.py::ImprovedHeteroGNN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::predict_batched", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::train_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "class:code/run_lgcn_final.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "class:code/run_lgcn_final.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::predict_cos", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::train", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "class:code/run_lgcn_v2.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "class:code/run_lgcn_v2.py::LightGCN_Norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::predict_cos_batched", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::train_lightgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::train_sage", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "class:code/run_ultimate.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_ultimate.py", + "target": "class:code/run_ultimate.py::LightGCNRecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_ultimate.py", + "target": "class:code/run_ultimate.py::ResidualHeteroConv", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_ultimate.py", + "target": "class:code/run_ultimate.py::SAGERecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::evaluate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::predict_cos", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::run_experiment", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::predict_batched", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "class:code/run_v2.py::GNNEncoder", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_v2.py", + "target": "class:code/run_v2.py::DotDecoder", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_v2.py", + "target": "class:code/run_v2.py::Recommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::prf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::author_rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::add_score_block", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::load_sources", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::fit_oof_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::write_sub", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::load_train_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_val_fusion.py", + "target": "func:code/search_val_fusion.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_val_fusion.py", + "target": "func:code/search_val_fusion.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_val_fusion.py", + "target": "func:code/search_val_fusion.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_val_fusion.py", + "target": "func:code/search_val_fusion.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::load_lgcn_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::add_rank_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::fit_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::boundary_rerank", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "class:code/stack_rank_calibration.py::ExplicitGraphFeatures", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::load_train_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "class:code/train_dynamic_feature_fusion.py::FeatureBuilder", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "func:code/train_val_hgt_bpr.py::load_lgcn_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "func:code/train_val_hgt_bpr.py::predict_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "func:code/train_val_hgt_bpr.py::train_one", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "func:code/train_val_hgt_bpr.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "class:code/train_val_hgt_bpr.py::HGTRecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::make_notebook_style_split", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::build_parts", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::predict_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::train_one", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "class:code/train_val_lgcn_ensemble.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "class:code/train_val_lgcn_ensemble.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "class:code/train_val_lgcn_ensemble.py::LearnableWeightLightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_mf_bpr.py", + "target": "func:code/train_val_mf_bpr.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_mf_bpr.py", + "target": "func:code/train_val_mf_bpr.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_mf_bpr.py", + "target": "class:code/train_val_mf_bpr.py::MF", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "func:code/train_val_sage_bpr.py::load_lgcn_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "func:code/train_val_sage_bpr.py::predict_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "func:code/train_val_sage_bpr.py::train_one", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "func:code/train_val_sage_bpr.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "class:code/train_val_sage_bpr.py::ResidualSAGE", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "class:code/train_val_sage_bpr.py::SAGERecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig1_graph_overview.py", + "target": "func:figures_paper/scripts/fig1_graph_overview.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig2_sparsity.py", + "target": "func:figures_paper/scripts/fig2_sparsity.py::_ccdf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig2_sparsity.py", + "target": "func:figures_paper/scripts/fig2_sparsity.py::_panel_ccdf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig2_sparsity.py", + "target": "func:figures_paper/scripts/fig2_sparsity.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig3_roadmap.py", + "target": "func:figures_paper/scripts/fig3_roadmap.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig4_architecture.py", + "target": "func:figures_paper/scripts/fig4_architecture.py::_box", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig4_architecture.py", + "target": "func:figures_paper/scripts/fig4_architecture.py::_arrow", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig4_architecture.py", + "target": "func:figures_paper/scripts/fig4_architecture.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig5_ablation_highorder.py", + "target": "func:figures_paper/scripts/fig5_ablation_highorder.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig6_rank_vs_threshold.py", + "target": "func:figures_paper/scripts/fig6_rank_vs_threshold.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig7_error_heatmap.py", + "target": "func:figures_paper/scripts/fig7_error_heatmap.py::_bucket_order_key", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig7_error_heatmap.py", + "target": "func:figures_paper/scripts/fig7_error_heatmap.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/figA1_hyperparam.py", + "target": "func:figures_paper/scripts/figA1_hyperparam.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/figA2_rw_ablation.py", + "target": "func:figures_paper/scripts/figA2_rw_ablation.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/figA3_feature_importance.py", + "target": "func:figures_paper/scripts/figA3_feature_importance.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/figA4_oof_pr.py", + "target": "func:figures_paper/scripts/figA4_oof_pr.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/make_all_figures.py", + "target": "func:figures_paper/scripts/make_all_figures.py::_load", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/make_all_figures.py", + "target": "func:figures_paper/scripts/make_all_figures.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/make_all_figures.py", + "target": "func:figures_paper/scripts/make_all_figures.py::_write_readme", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/style.py", + "target": "func:figures_paper/scripts/style.py::apply", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/style.py", + "target": "func:figures_paper/scripts/style.py::ensure_dirs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/style.py", + "target": "func:figures_paper/scripts/style.py::save", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/style.py", + "target": "func:figures_paper/scripts/style.py::stat_box", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "func:code/compare_gnn.py::evaluate", + "target": "func:code/compare_gnn.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_vanilla_lgcn", + "target": "class:code/compare_gnn.py::MeanAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_learnw_lgcn", + "target": "class:code/compare_gnn.py::MeanAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_gat_lgcn", + "target": "class:code/compare_gnn.py::GATAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_sage_lgcn", + "target": "class:code/compare_gnn.py::SAGEAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_deep_lgcn", + "target": "class:code/compare_gnn.py::MeanAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_wide_lgcn", + "target": "func:code/compare_gnn.py::make_vanilla_lgcn", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::run_trial", + "target": "func:code/compare_gnn.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::run_trial", + "target": "func:code/compare_gnn.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::run_trial", + "target": "func:code/compare_gnn.py::sample_hard_neg", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::run_trial", + "target": "func:code/compare_gnn.py::evaluate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/content_rich_ablation.py::main", + "target": "func:code/content_rich_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/content_rich_ablation.py::main", + "target": "func:code/content_rich_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/content_rich_ablation.py::main", + "target": "func:code/content_rich_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/content_rich_ablation.py::main", + "target": "func:code/content_rich_ablation.py::content_rich_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::score_at_threshold", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::score_features", + "target": "func:code/error_group_calibration.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::score_features", + "target": "func:code/error_group_calibration.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::score_features", + "target": "func:code/error_group_calibration.py::author_rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::group_threshold", + "target": "func:code/error_group_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::group_threshold", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::summarize_pred", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::summarize_pred", + "target": "func:code/error_group_calibration.py::load_submission_pred", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::build_val_test_context", + "target": "func:code/error_group_calibration.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::build_val_test_context", + "target": "func:code/error_group_calibration.py::score_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::build_val_test_context", + "target": "func:code/error_group_calibration.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::build_val_test_context", + "target": "func:code/error_group_calibration.py::build_feature_names", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::error_analysis", + "target": "func:code/error_group_calibration.py::bucket_cut", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::error_analysis", + "target": "func:code/error_group_calibration.py::bucket_quantile", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::error_analysis", + "target": "func:code/error_group_calibration.py::author_rank_position", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::error_analysis", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::add_agreement_features", + "target": "func:code/error_group_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::add_agreement_features", + "target": "func:code/error_group_calibration.py::author_rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::boundary_features", + "target": "func:code/error_group_calibration.py::author_rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::boundary_features", + "target": "func:code/error_group_calibration.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::build_val_test_context", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::load_submission_pred", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::score_at_threshold", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::error_analysis", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::summarize_pred", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::write_submission", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::bucket_cut", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::group_threshold", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::write_group_submission", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::add_agreement_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::boundary_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::average_predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::fit_full_lgb", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/evaluate_val_checkpoints.py::main", + "target": "func:code/evaluate_val_checkpoints.py::load_train_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/evaluate_val_checkpoints.py::main", + "target": "func:code/evaluate_val_checkpoints.py::infer_layers", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/evaluate_val_checkpoints.py::main", + "target": "func:code/evaluate_val_checkpoints.py::score_model", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/evaluate_val_checkpoints.py::main", + "target": "func:code/evaluate_val_checkpoints.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::score_to_features", + "target": "func:code/extra_score_sources_ablation.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::score_to_features", + "target": "func:code/extra_score_sources_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "target": "class:code/extra_score_sources_ablation.py::MF", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "target": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::train_ranker_oof", + "target": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::content_mean_score", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::score_to_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::train_ranker_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/figures/gen_val_labels.py::main", + "target": "func:code/figures/gen_val_labels.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_conservative_rw_blends.py::main", + "target": "func:code/generate_conservative_rw_blends.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_conservative_rw_blends.py::main", + "target": "func:code/generate_conservative_rw_blends.py::write_ratio_submission", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_content_rich_submission.py::main", + "target": "func:code/generate_content_rich_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_content_rich_submission.py::main", + "target": "func:code/generate_content_rich_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::build", + "target": "func:code/generate_dot_submission.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::build", + "target": "func:code/generate_dot_submission.py::log_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "func:code/generate_dot_submission.py::build", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "class:code/generate_dot_submission.py::LightGCN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "func:code/generate_dot_submission.py::predict_dot", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "func:code/generate_dot_submission.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "func:code/generate_dot_submission.py::write", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::build_features", + "target": "func:code/generate_ens6_submission.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::build_features", + "target": "func:code/generate_ens6_submission.py::log_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::predict", + "target": "func:code/generate_ens6_submission.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::main", + "target": "func:code/generate_ens6_submission.py::build_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::main", + "target": "func:code/generate_ens6_submission.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::main", + "target": "class:code/generate_ens6_submission.py::LightGCN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::main", + "target": "func:code/generate_ens6_submission.py::predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_extra_bprmf_submission.py::main", + "target": "func:code/generate_extra_bprmf_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_extra_bprmf_submission.py::main", + "target": "func:code/generate_extra_bprmf_submission.py::train_mf_test_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_extra_bprmf_submission.py::main", + "target": "func:code/generate_extra_bprmf_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::build_features", + "target": "func:code/generate_large_ensemble_submission.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::build_features", + "target": "func:code/generate_large_ensemble_submission.py::log_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::predict", + "target": "func:code/generate_large_ensemble_submission.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::build_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "class:code/generate_large_ensemble_submission.py::LightGCN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::checkpoint_weight", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::write_threshold_submissions", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::percent_rank", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::write_top_ratio_submissions", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_node2vec_deepwalk_submission.py::main", + "target": "func:code/generate_node2vec_deepwalk_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_node2vec_deepwalk_submission.py::main", + "target": "func:code/generate_node2vec_deepwalk_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "target": "func:code/generate_post95_submission.py::score_cache_path", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "target": "func:code/generate_post95_submission.py::checkpoint_for_score", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "target": "func:code/generate_post95_submission.py::infer_layers", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "target": "func:code/generate_post95_submission.py::infer_mode", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_val_path_on_test", + "target": "func:code/generate_post95_submission.py::score_cache_path", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_val_path_on_test", + "target": "func:code/generate_post95_submission.py::ensemble_member_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_val_path_on_test", + "target": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::topk_content_similarity_fast", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::select_variant_val_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::variant_feature_matrix", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::score_val_path_on_test", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::make_submissions", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_ensemble_submission.py::main", + "target": "func:code/generate_randomwalk_ensemble_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_ensemble_submission.py::main", + "target": "func:code/generate_randomwalk_ensemble_submission.py::aggregate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_ensemble_submission.py::main", + "target": "func:code/generate_randomwalk_ensemble_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_single_submission.py::main", + "target": "func:code/generate_randomwalk_single_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_single_submission.py::main", + "target": "func:code/generate_randomwalk_single_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order", + "target": "func:code/high_order_graph_stack.py::row_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order", + "target": "func:code/high_order_graph_stack.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order", + "target": "func:code/high_order_graph_stack.py::topk_prune_rows", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order", + "target": "func:code/high_order_graph_stack.py::extract_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order_directed", + "target": "func:code/high_order_graph_stack.py::row_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order_directed", + "target": "func:code/high_order_graph_stack.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order_directed", + "target": "func:code/high_order_graph_stack.py::topk_prune_rows", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order_directed", + "target": "func:code/high_order_graph_stack.py::extract_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::build_high_order", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::build_high_order_directed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::fit_full_predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::write_ratio_submission", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_model_compare.py::main", + "target": "func:code/high_order_model_compare.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_model_compare.py::main", + "target": "func:code/high_order_model_compare.py::fit_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_model_compare.py::main", + "target": "func:code/high_order_model_compare.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/make_notebook_style_split.py::main", + "target": "func:code/make_notebook_style_split.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "target": "func:code/node2vec_deepwalk_ablation.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "target": "func:code/node2vec_deepwalk_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::build_graph", + "target": "func:code/node2vec_deepwalk_ablation.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::train_deepwalk", + "target": "func:code/node2vec_deepwalk_ablation.py::deepwalk_walks", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "target": "func:code/node2vec_deepwalk_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "target": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::build_graph", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::train_deepwalk", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::train_node2vec", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::pair_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::error_analysis", + "target": "func:code/post95_ablation.py::bucket_series", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::error_analysis", + "target": "func:code/post95_ablation.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::group_threshold", + "target": "func:code/post95_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::group_threshold", + "target": "func:code/post95_ablation.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::author_quota_tuning", + "target": "func:code/post95_ablation.py::bucket_series", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::author_quota_tuning", + "target": "func:code/post95_ablation.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::negative_evidence_features", + "target": "func:code/post95_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "target": "func:code/post95_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "target": "func:code/post95_ablation.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "target": "func:code/post95_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::error_analysis", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::bucket_series", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::group_threshold", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::author_quota_tuning", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::negative_evidence_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::topk_content_similarity", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::small_configs", + "target": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::graph_configs", + "target": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::extra_configs", + "target": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::build_graph", + "target": "func:code/randomwalk_systematic_ablation.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::train_model", + "target": "func:code/randomwalk_systematic_ablation.py::deepwalk_walks", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "target": "func:code/randomwalk_systematic_ablation.py::embedding_arrays", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "target": "func:code/randomwalk_systematic_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::build_base_features", + "target": "func:code/randomwalk_systematic_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::build_base_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::small_configs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::graph_configs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::build_graph", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::train_model", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::fit_full_predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::write_sub", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::evaluate", + "target": "func:code/run_final.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::predict_cos_batched", + "target": "func:code/run_final.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "func:code/run_final.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "func:code/run_final.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "class:code/run_final.py::LightGCNRecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "func:code/run_final.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "func:code/run_final.py::evaluate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_improved.py::run_experiment", + "target": "func:code/run_improved.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_improved.py::run_experiment", + "target": "class:code/run_improved.py::ImprovedHeteroGNN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_improved.py::run_experiment", + "target": "func:code/run_improved.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_improved.py::run_experiment", + "target": "func:code/run_improved.py::evaluate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::predict_batched", + "target": "func:code/run_lgcn_final.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::train_lgcn", + "target": "func:code/run_lgcn_final.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::train_lgcn", + "target": "func:code/run_lgcn_final.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::train_lgcn", + "target": "class:code/run_lgcn_final.py::LightGCN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::train_lgcn", + "target": "func:code/run_lgcn_final.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::predict_cos", + "target": "func:code/run_lgcn_v2.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::train", + "target": "func:code/run_lgcn_v2.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::train", + "target": "func:code/run_lgcn_v2.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::train", + "target": "class:code/run_lgcn_v2.py::LightGCN_Norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::train", + "target": "func:code/run_lgcn_v2.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::predict_cos_batched", + "target": "func:code/run_ultimate.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_lightgcn", + "target": "func:code/run_ultimate.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_lightgcn", + "target": "func:code/run_ultimate.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_lightgcn", + "target": "class:code/run_ultimate.py::LightGCNRecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_lightgcn", + "target": "func:code/run_ultimate.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_sage", + "target": "func:code/run_ultimate.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_sage", + "target": "func:code/run_ultimate.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_sage", + "target": "class:code/run_ultimate.py::SAGERecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_sage", + "target": "func:code/run_ultimate.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::evaluate", + "target": "func:code/run_v2.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::predict_cos", + "target": "func:code/run_v2.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::run_experiment", + "target": "func:code/run_v2.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::run_experiment", + "target": "class:code/run_v2.py::Recommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::run_experiment", + "target": "func:code/run_v2.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::run_experiment", + "target": "func:code/run_v2.py::evaluate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::predict_batched", + "target": "func:code/run_v2.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::add_score_block", + "target": "func:code/score_level_meta_stack.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::add_score_block", + "target": "func:code/score_level_meta_stack.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::add_score_block", + "target": "func:code/score_level_meta_stack.py::author_rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::load_sources", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::add_score_block", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::fit_oof_predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::write_sub", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_dynamic_fusion.py::main", + "target": "func:code/search_dynamic_fusion.py::load_train_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_dynamic_fusion.py::main", + "target": "func:code/search_dynamic_fusion.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_dynamic_fusion.py::main", + "target": "func:code/search_dynamic_fusion.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_val_fusion.py::main", + "target": "func:code/search_val_fusion.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_val_fusion.py::main", + "target": "func:code/search_val_fusion.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::add_rank_features", + "target": "func:code/stack_rank_calibration.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::boundary_rerank", + "target": "func:code/stack_rank_calibration.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::boundary_rerank", + "target": "func:code/stack_rank_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::load_lgcn_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "class:code/stack_rank_calibration.py::ExplicitGraphFeatures", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::add_rank_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::fit_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::boundary_rerank", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_dynamic_feature_fusion.py::main", + "target": "func:code/train_dynamic_feature_fusion.py::load_train_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_dynamic_feature_fusion.py::main", + "target": "class:code/train_dynamic_feature_fusion.py::FeatureBuilder", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_dynamic_feature_fusion.py::main", + "target": "func:code/train_dynamic_feature_fusion.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_dynamic_feature_fusion.py::main", + "target": "func:code/train_dynamic_feature_fusion.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_hgt_bpr.py::train_one", + "target": "class:code/train_val_hgt_bpr.py::HGTRecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_hgt_bpr.py::train_one", + "target": "func:code/train_val_hgt_bpr.py::predict_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_hgt_bpr.py::main", + "target": "func:code/train_val_hgt_bpr.py::load_lgcn_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_hgt_bpr.py::main", + "target": "func:code/train_val_hgt_bpr.py::train_one", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::make_notebook_style_split", + "target": "func:code/train_val_lgcn_ensemble.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::build_parts", + "target": "func:code/train_val_lgcn_ensemble.py::make_notebook_style_split", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::build_parts", + "target": "func:code/train_val_lgcn_ensemble.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::build_parts", + "target": "func:code/train_val_lgcn_ensemble.py::log_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::predict_scores", + "target": "func:code/train_val_lgcn_ensemble.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::train_one", + "target": "func:code/train_val_lgcn_ensemble.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::train_one", + "target": "func:code/train_val_lgcn_ensemble.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::train_one", + "target": "func:code/train_val_lgcn_ensemble.py::predict_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::train_one", + "target": "func:code/train_val_lgcn_ensemble.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::main", + "target": "func:code/train_val_lgcn_ensemble.py::build_parts", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::main", + "target": "func:code/train_val_lgcn_ensemble.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::main", + "target": "func:code/train_val_lgcn_ensemble.py::train_one", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::main", + "target": "func:code/train_val_lgcn_ensemble.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_mf_bpr.py::main", + "target": "class:code/train_val_mf_bpr.py::MF", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_mf_bpr.py::main", + "target": "func:code/train_val_mf_bpr.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_sage_bpr.py::train_one", + "target": "class:code/train_val_sage_bpr.py::SAGERecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_sage_bpr.py::train_one", + "target": "func:code/train_val_sage_bpr.py::predict_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_sage_bpr.py::main", + "target": "func:code/train_val_sage_bpr.py::load_lgcn_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_sage_bpr.py::main", + "target": "func:code/train_val_sage_bpr.py::train_one", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/fig2_sparsity.py::_panel_ccdf", + "target": "func:figures_paper/scripts/fig2_sparsity.py::_ccdf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/fig2_sparsity.py::make", + "target": "func:figures_paper/scripts/fig2_sparsity.py::_panel_ccdf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/fig4_architecture.py::make", + "target": "func:figures_paper/scripts/fig4_architecture.py::_box", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/fig4_architecture.py::make", + "target": "func:figures_paper/scripts/fig4_architecture.py::_arrow", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/make_all_figures.py::main", + "target": "func:figures_paper/scripts/make_all_figures.py::_load", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/make_all_figures.py::main", + "target": "func:figures_paper/scripts/make_all_figures.py::_write_readme", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/04_lightgcn_from_first_principles.md", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "target": "file:code/stack_rank_calibration.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "target": "file:code/high_order_graph_stack.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/07_high_order_citation_propagation.md", + "target": "file:code/high_order_graph_stack.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/06_random_walk_features.md", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/06_random_walk_features.md", + "target": "file:code/generate_randomwalk_ensemble_submission.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/03_data_flow_and_artifacts.md", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/03_data_flow_and_artifacts.md", + "target": "file:code/high_order_graph_stack.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/10_code_map_and_entrypoints.md", + "target": "file:code/high_order_graph_stack.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/10_code_map_and_entrypoints.md", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/10_code_map_and_entrypoints.md", + "target": "file:code/stack_rank_calibration.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + } + ], + "layers": [ + { + "id": "L1", + "name": "数据与共享地基 (Data & Shared Foundation)", + "description": "读三类边 + feature.pkl、确定性 1:1 验证切分(seed=202)、best_f1 评估。两大事实共享库被全流水线 load_module 加载。", + "nodeIds": [ + "file:code/make_notebook_style_split.py", + "file:code/stack_rank_calibration.py", + "file:code/train_val_lgcn_ensemble.py" + ] + }, + { + "id": "L2", + "name": "LightGCN 集成主分数 (Primary Score)", + "description": "无权重/无非线性的异构协同过滤 + BPR + 硬负采样,多 seed/维集成,产 val_vanilla_ensemble_mean.npy 主分数(验证 0.9386)。", + "nodeIds": [ + "file:code/train_val_lgcn_ensemble.py" + ] + }, + { + "id": "L3", + "name": "分数变体聚合 (Variant Aggregation)", + "description": "20 个 LightGCN 变体分数做 zscore+rank01 聚合、top-k 内容相似度、负证据。Post95→BPR-MF。验证 0.9571→0.9593。", + "nodeIds": [ + "file:code/extra_score_sources_ablation.py", + "file:code/generate_extra_bprmf_submission.py", + "file:code/generate_post95_submission.py", + "file:code/post95_ablation.py" + ] + }, + { + "id": "L4", + "name": "内容语义特征 (Content)", + "description": "从 512-d USE 论文嵌入抽作者/候选内容画像(18 维),CF 之外的语义互补视角。验证 ≈0.9599。", + "nodeIds": [ + "file:code/content_rich_ablation.py", + "file:code/generate_content_rich_submission.py" + ] + }, + { + "id": "L5", + "name": "随机游走特征 (Random Walk)", + "description": "7 个 DeepWalk/Node2Vec 配置产全局接近度嵌入(每块 11 维)+ 一致性聚合,补 LightGCN 局部 CF 看不到的全局尺度。验证 0.9621→0.9649。", + "nodeIds": [ + "file:code/generate_conservative_rw_blends.py", + "file:code/generate_node2vec_deepwalk_submission.py", + "file:code/generate_randomwalk_ensemble_submission.py", + "file:code/generate_randomwalk_single_submission.py", + "file:code/node2vec_deepwalk_ablation.py", + "file:code/randomwalk_ensemble_ablation.py", + "file:code/randomwalk_one_ablation.py", + "file:code/randomwalk_systematic_ablation.py", + "file:code/rich_randomwalk_stack.py" + ] + }, + { + "id": "L6", + "name": "最终堆叠与高阶传播 (Final Stack & High-order)", + "description": "【最终方法】259 维特征上的 LightGBM meta-learner;高阶有向引用传播 H_k=R·C^k / G_k=S·R·C^k(fwd/bwd/undir)是核心增益。验证 0.9669 / 公开 0.96626。", + "nodeIds": [ + "file:code/high_order_graph_stack.py", + "file:code/high_order_model_compare.py" + ] + }, + { + "id": "L7", + "name": "校准/误差/搜索 (Calibration, Error, Search)", + "description": "误差分桶、校准曲线、ratio/threshold 搜索,论证 rank-cutoff 决策并选最优提交。", + "nodeIds": [ + "file:code/error_group_calibration.py", + "file:code/evaluate_val_checkpoints.py", + "file:code/score_level_meta_stack.py", + "file:code/search_dynamic_fusion.py", + "file:code/search_val_fusion.py" + ] + }, + { + "id": "L8", + "name": "提交生成 (Submission Generation)", + "description": "各阶段从 checkpoint/分数生成 Kaggle 提交 CSV(Index,Predicted)。", + "nodeIds": [ + "file:code/generate_conservative_rw_blends.py", + "file:code/generate_content_rich_submission.py", + "file:code/generate_dot_submission.py", + "file:code/generate_ens6_submission.py", + "file:code/generate_extra_bprmf_submission.py", + "file:code/generate_large_ensemble_submission.py", + "file:code/generate_node2vec_deepwalk_submission.py", + "file:code/generate_post95_submission.py", + "file:code/generate_randomwalk_ensemble_submission.py", + "file:code/generate_randomwalk_single_submission.py" + ] + }, + { + "id": "L9", + "name": "可视化 (Visualization)", + "description": "两套论文图脚本:code/figures/(主图 + 补齐 y/特征重要性)与 figures_paper/scripts/(11 图集)。", + "nodeIds": [ + "file:code/figures/fig1_dataset_overview.py", + "file:code/figures/fig10_rw_ensemble_size.py", + "file:code/figures/fig2_framework.py", + "file:code/figures/fig3_progression.py", + "file:code/figures/fig4_highorder_ablation.py", + "file:code/figures/fig5_pr_roc.py", + "file:code/figures/fig6_feature_contribution.py", + "file:code/figures/fig7_error_analysis.py", + "file:code/figures/fig8_lgcn_ensemble_correlation.py", + "file:code/figures/fig9_lgcn_hyperparam.py", + "file:code/figures/gen_val_labels.py", + "file:code/figures/plot_style.py", + "file:figures_paper/README_figures.md", + "file:figures_paper/scripts/fig1_graph_overview.py", + "file:figures_paper/scripts/fig2_sparsity.py", + "file:figures_paper/scripts/fig3_roadmap.py", + "file:figures_paper/scripts/fig4_architecture.py", + "file:figures_paper/scripts/fig5_ablation_highorder.py", + "file:figures_paper/scripts/fig6_rank_vs_threshold.py", + "file:figures_paper/scripts/fig7_error_heatmap.py", + "file:figures_paper/scripts/figA1_hyperparam.py", + "file:figures_paper/scripts/figA2_rw_ablation.py", + "file:figures_paper/scripts/figA3_feature_importance.py", + "file:figures_paper/scripts/figA4_oof_pr.py", + "file:figures_paper/scripts/make_all_figures.py", + "file:figures_paper/scripts/style.py" + ] + }, + { + "id": "L10", + "name": "文档与报告 (Docs & Reports)", + "description": "第一性原理文档包(权威事实表 _fact_sheet)+ reports 叙事 + 任务规格。", + "nodeIds": [ + "file:CLAUDE_zh.md", + "file:CLAUDE.md", + "file:data_and_docs/advice.md", + "file:data_and_docs/dataset.md", + "file:data_and_docs/project_description.md", + "file:data_and_docs/project_evaluation.md", + "file:data_and_docs/project-example-2026-pygver.ipynb", + "file:data_and_docs/proposal.md", + "file:data_and_docs/references.md", + "file:docs_first_principles/_fact_sheet.md", + "file:docs_first_principles/00_README.md", + "file:docs_first_principles/01_problem_and_dataset.md", + "file:docs_first_principles/02_architecture_overview.md", + "file:docs_first_principles/03_data_flow_and_artifacts.md", + "file:docs_first_principles/04_lightgcn_from_first_principles.md", + "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "file:docs_first_principles/06_random_walk_features.md", + "file:docs_first_principles/07_high_order_citation_propagation.md", + "file:docs_first_principles/08_calibration_and_rank_cutoff.md", + "file:docs_first_principles/09_experiment_timeline.md", + "file:docs_first_principles/10_code_map_and_entrypoints.md", + "file:docs_first_principles/11_figures_and_paper_mapping.md", + "file:docs_first_principles/12_reproduction_guide.md", + "file:docs_first_principles/13_common_questions_for_the_author.md", + "file:docs_first_principles/SUMMARY_FOR_PAPER.md", + "file:notes/experiment_history.md", + "file:README.md", + "file:reports/exploration_summary.md", + "file:reports/final_report.md", + "file:reports/paper_writing_guide.md", + "file:reports/preliminary_report.md", + "file:WORKSPACE_STATUS.md" + ] + }, + { + "id": "L11", + "name": "配置与环境 (Config & Environment)", + "description": "Conda/最小依赖/pinned 版本快照。", + "nodeIds": [ + "file:env/conda-list-cs3319.txt", + "file:env/environment-cs3319.yml", + "file:env/requirements-minimal.txt" + ] + }, + { + "id": "L12", + "name": "遗留原型 (Legacy Prototypes)", + "description": "早期 run_*/compare_gnn,硬编码 /home/lzc 路径、无 argparse,仅供溯源不可直接运行。", + "nodeIds": [ + "file:code/compare_gnn.py", + "file:code/run_baseline.py", + "file:code/run_final.py", + "file:code/run_graph_features.py", + "file:code/run_improved.py", + "file:code/run_lgcn_final.py", + "file:code/run_lgcn_v2.py", + "file:code/run_ultimate.py", + "file:code/run_v2.py" + ] + } + ], + "tour": [ + { + "order": 1, + "title": "任务与数据集", + "description": "先读任务定义:异构学术网络(6611 作者/79937 论文)上的 author-paper 二部图链路预测,对 2.05M 测试对输出 0/1,公开榜评 50%,指标 F1。理解稀疏(密度 1.29e-3)与长尾(56% 作者度=1)难度。", + "nodeIds": [ + "file:docs_first_principles/01_problem_and_dataset.md", + "file:data_and_docs/project_description.md", + "file:data_and_docs/dataset.md" + ], + "languageLesson": "F1 为指标;公开榜只评测 50% 测试集,这与最终选择 rank-cutoff 而非概率阈值直接相关。" + }, + { + "order": 2, + "title": "整体两阶段架构", + "description": "Stage-1 多源生产 raw 分数/嵌入(LightGCN/BPR-MF/RW/content/高阶)→ Stage-2 用 259 维 LightGBM meta-learner 融合 → rank-cutoff top 50% 决策。先建立全局图再钻细节。", + "nodeIds": [ + "file:docs_first_principles/02_architecture_overview.md", + "file:docs_first_principles/SUMMARY_FOR_PAPER.md" + ], + "languageLesson": "stacking 的本质:把多个互补视角交给一个 calibrator 联合裁决。" + }, + { + "order": 3, + "title": "数据流与产物", + "description": "txt → make_notebook_style_split(seed=202)→ 136484 对 1:1 验证集 → val_*/test_*_oof.npy 分数 → submission。掌握 .npy 文件名约定与 feature_cache 缓存,这是读懂后续脚本的钥匙。", + "nodeIds": [ + "file:docs_first_principles/03_data_flow_and_artifacts.md", + "file:code/train_val_lgcn_ensemble.py" + ], + "languageLesson": "--split-seed 是 load-bearing:种子 baked 进每个分数文件,换 seed 必须端到端重跑。" + }, + { + "order": 4, + "title": "共享地基:两大事实库", + "description": "无 utils.py,脚本用 importlib load_module 互相当库加载。train_val_lgcn_ensemble.py(数据/切分/best_f1)与 stack_rank_calibration.py(显式图特征/rank)是两大共享库,各被 ~14 个脚本加载——改动它们会波及全流水线。", + "nodeIds": [ + "file:code/train_val_lgcn_ensemble.py", + "file:code/stack_rank_calibration.py" + ], + "languageLesson": "load_module(importlib.util)是本仓库代码复用的核心机制,也是图上 imports 边的骨干。" + }, + { + "order": 5, + "title": "LightGCN 主分数", + "description": "为何'轻'?删掉所有权重矩阵与非线性,只做入度归一邻居聚合 + 点积解码 + BPR + 硬负采样。在极稀疏图上比过参数化 GNN 更稳更强。验证 0.9386,是后续堆叠的主分数源。", + "nodeIds": [ + "file:docs_first_principles/04_lightgcn_from_first_principles.md", + "file:code/train_val_lgcn_ensemble.py" + ], + "languageLesson": "推荐任务里:CF 前端越简洁越不易过拟合稀疏图噪声,特征交互交给后端 LightGBM。" + }, + { + "order": 6, + "title": "meta-path 堆叠 = 单阶段最大增益", + "description": "LightGCN 学的是局部隐式 CF,看不见'合著者读过哪些论文''我读的论文引用了哪些候选'这类显式多跳结构。把它们做成 ~76 维手工特征喂 LightGBM,验证 0.939→0.956(+0.0174,全程最大跃迁)。", + "nodeIds": [ + "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "file:code/stack_rank_calibration.py" + ], + "languageLesson": "'模型不确定的'+'图结构明确告诉你的'两条信息源交给 calibrator 联合裁决 = stacking 的价值。" + }, + { + "order": 7, + "title": "随机游走补全局接近度", + "description": "DeepWalk/Node2Vec 在二部/合著/引用图上随机游走 + Word2Vec,捕获 LightGCN 局部 CF 看不到的全局接近度。系统化 7 块配置 + 一致性聚合,验证 →0.9649。但注意:验证对'堆更多同源模型'系统性偏乐观(公开分反略降)。", + "nodeIds": [ + "file:docs_first_principles/06_random_walk_features.md", + "file:code/randomwalk_systematic_ablation.py", + "file:code/generate_randomwalk_ensemble_submission.py" + ], + "languageLesson": "1:1 人工平衡验证集会高估同源模型堆叠——这是放弃验证最优阈值的直接原因。" + }, + { + "order": 8, + "title": "高阶有向引用传播 = 核心贡献", + "description": "最终增益来源:H_k=R·C^k(作者历史论文 k 步引用扩散)、G_k=S·R·C^k(合著者历史论文扩散),fwd/bwd/undir 三向。消融 108→190→214→259 维,验证 0.9643→0.9669、公开 0.96252→0.96626。方向性抓住了 LightGCN/无向聚合无法区分的引用因果结构。", + "nodeIds": [ + "file:docs_first_principles/07_high_order_citation_propagation.md", + "file:code/high_order_graph_stack.py" + ], + "languageLesson": "把'我读过的论文→它引用/被引用的论文→候选'这条有向语义链路显式建模成稀疏矩阵幂,可解释且有效。" + }, + { + "order": 9, + "title": "决策:rank-cutoff 而非概率阈值", + "description": "验证最优概率阈值 0.4617 迁移到 test 后正例率漂移到 0.5242(多 2.4pt)。改用 rank top 50% + 强制 test_known_mask(524,083 条训练-测试重叠正边)为 1,正例率精确锁 0.5。这就是最终 0.96626 的来源。", + "nodeIds": [ + "file:docs_first_principles/08_calibration_and_rank_cutoff.md", + "file:code/error_group_calibration.py" + ], + "languageLesson": "分布漂移下,rank-cutoff 比 probability threshold 更稳健——校准问题的工程化解法。" + }, + { + "order": 10, + "title": "复现与核验", + "description": "最短路径:已有 submission 直接核验;或从缓存重生成 high_order_graph_stack。所有中间产物已缓存于包内,通常只需重跑改动的那一阶段。", + "nodeIds": [ + "file:docs_first_principles/12_reproduction_guide.md", + "file:README.md", + "file:docs_first_principles/_fact_sheet.md" + ], + "languageLesson": "权威数字一律以 _fact_sheet.md(状态日期 2026-06-18)为准,叙述与事实表冲突时以事实表为准。" + } + ] +} \ No newline at end of file diff --git a/.understand-anything/intermediate/batches.json b/.understand-anything/intermediate/batches.json new file mode 100644 index 0000000000000000000000000000000000000000..a947cb146ecd4fdf4f2a2f58419385078913028d --- /dev/null +++ b/.understand-anything/intermediate/batches.json @@ -0,0 +1,1842 @@ +{ + "schemaVersion": 1, + "algorithm": "louvain", + "totalFiles": 102, + "totalBatches": 11, + "exportsByPath": { + "code/compare_gnn.py": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "sample_hard_neg", + "cos_sim", + "evaluate", + "MeanAggLayer", + "GATAggLayer", + "SAGEAggLayer", + "make_vanilla_lgcn", + "make_learnw_lgcn", + "make_gat_lgcn", + "make_sage_lgcn", + "make_deep_lgcn", + "make_wide_lgcn", + "run_trial" + ], + "code/content_rich_ablation.py": [ + "load_module", + "best_f1", + "fit_lgb_oof", + "content_rich_features", + "main" + ], + "code/error_group_calibration.py": [ + "load_module", + "read_txt", + "prf", + "best_f1", + "score_at_threshold", + "rank01", + "zscore", + "author_rank01", + "author_rank_position", + "score_features", + "fit_lgb_oof", + "fit_full_lgb", + "average_predict", + "bucket_cut", + "bucket_quantile", + "load_submission_pred", + "write_submission", + "write_group_submission", + "group_threshold", + "summarize_pred", + "build_feature_names", + "build_val_test_context", + "error_analysis", + "add_agreement_features", + "boundary_features", + "main" + ], + "code/evaluate_val_checkpoints.py": [ + "load_train_module", + "best_f1", + "infer_layers", + "score_model", + "main" + ], + "code/extra_score_sources_ablation.py": [ + "load_module", + "best_f1", + "rank01", + "zscore", + "score_to_features", + "fit_lgb_oof", + "content_mean_score", + "MF", + "train_mf_bpr_score", + "train_ranker_oof", + "main" + ], + "code/figures/fig1_dataset_overview.py": [ + "plot_ccdf" + ], + "code/figures/fig10_rw_ensemble_size.py": [], + "code/figures/fig2_framework.py": [ + "box", + "arrow" + ], + "code/figures/fig3_progression.py": [], + "code/figures/fig4_highorder_ablation.py": [], + "code/figures/fig5_pr_roc.py": [], + "code/figures/fig6_feature_contribution.py": [], + "code/figures/fig7_error_analysis.py": [ + "plot_buckets" + ], + "code/figures/fig8_lgcn_ensemble_correlation.py": [], + "code/figures/fig9_lgcn_hyperparam.py": [ + "parse" + ], + "code/figures/gen_val_labels.py": [ + "load_module", + "main" + ], + "code/figures/plot_style.py": [ + "apply", + "save" + ], + "code/generate_conservative_rw_blends.py": [ + "rank01", + "write_ratio_submission", + "main" + ], + "code/generate_content_rich_submission.py": [ + "load_module", + "make_subs", + "main" + ], + "code/generate_dot_submission.py": [ + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "build", + "predict_dot", + "rank01", + "write", + "main" + ], + "code/generate_ens6_submission.py": [ + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "cos_sim", + "build_features", + "build_data", + "predict", + "main" + ], + "code/generate_extra_bprmf_submission.py": [ + "load_module", + "train_mf_test_scores", + "make_subs", + "main" + ], + "code/generate_large_ensemble_submission.py": [ + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "cos_sim", + "build_features", + "build_data", + "predict", + "checkpoint_weight", + "percent_rank", + "write_threshold_submissions", + "write_top_ratio_submissions", + "main" + ], + "code/generate_node2vec_deepwalk_submission.py": [ + "load_module", + "make_subs", + "main" + ], + "code/generate_post95_submission.py": [ + "load_module", + "read_txt", + "infer_layers", + "infer_mode", + "score_cache_path", + "checkpoint_for_score", + "ensemble_member_scores", + "score_checkpoint_on_test", + "score_val_path_on_test", + "select_variant_val_scores", + "variant_feature_matrix", + "topk_content_similarity_fast", + "make_submissions", + "main" + ], + "code/generate_randomwalk_ensemble_submission.py": [ + "load_module", + "make_subs", + "aggregate", + "main" + ], + "code/generate_randomwalk_single_submission.py": [ + "load_module", + "make_subs", + "main" + ], + "code/high_order_graph_stack.py": [ + "load_module", + "read_txt", + "best_f1", + "row_norm", + "topk_prune_rows", + "extract_scores", + "build_high_order", + "build_high_order_directed", + "fit_lgb_oof", + "fit_full_predict", + "write_ratio_submission", + "main" + ], + "code/high_order_model_compare.py": [ + "load_module", + "best_f1", + "fit_oof", + "main" + ], + "code/make_notebook_style_split.py": [ + "read_txt", + "main" + ], + "code/node2vec_deepwalk_ablation.py": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "score_to_features", + "build_graph", + "deepwalk_walks", + "train_deepwalk", + "train_node2vec", + "pair_scores", + "build_current_best_features", + "main" + ], + "code/post95_ablation.py": [ + "load_module", + "best_f1", + "prf", + "rank01", + "zscore", + "fit_lgb_oof", + "bucket_series", + "error_analysis", + "group_threshold", + "author_quota_tuning", + "negative_evidence_features", + "topk_content_similarity", + "load_lgcn_variant_scores", + "main" + ], + "code/randomwalk_ensemble_ablation.py": [ + "main" + ], + "code/randomwalk_one_ablation.py": [ + "main" + ], + "code/randomwalk_systematic_ablation.py": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "RWConfig", + "small_configs", + "graph_configs", + "extra_configs", + "build_graph", + "deepwalk_walks", + "train_model", + "embedding_arrays", + "pair_feature_block", + "build_base_features", + "train_full_predict", + "main" + ], + "code/rich_randomwalk_stack.py": [ + "load_module", + "best_f1", + "fit_lgb_oof", + "fit_full_predict", + "write_sub", + "main" + ], + "code/run_baseline.py": [ + "set_seed", + "read_txt", + "HeteroMeanConv", + "HeteroRecommender", + "sample_negative_edges", + "cos_sim" + ], + "code/run_final.py": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "LightGCNLayer", + "LightGCNRecommender", + "sample_hard_negatives", + "cos_sim", + "evaluate", + "predict_cos_batched", + "train_model" + ], + "code/run_graph_features.py": [ + "set_seed", + "read_txt", + "log1p_norm", + "compute_features" + ], + "code/run_improved.py": [ + "set_seed", + "read_txt", + "log_norm", + "ResidualHeteroConv", + "MLPDecoder", + "ImprovedHeteroGNN", + "sample_hard_negatives", + "run_experiment", + "evaluate", + "predict_all" + ], + "code/run_lgcn_final.py": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "sample_hard_negatives", + "LightGCNLayer", + "LightGCN", + "cos_sim", + "predict_batched", + "train_lgcn" + ], + "code/run_lgcn_v2.py": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "sample_hard_negatives", + "LightGCNLayer", + "LightGCN_Norm", + "cos_sim", + "predict_cos", + "train" + ], + "code/run_ultimate.py": [ + "set_seed", + "read_txt", + "log_norm", + "build_data", + "sample_hard_negatives", + "cos_sim", + "LightGCNLayer", + "LightGCNRecommender", + "ResidualHeteroConv", + "SAGERecommender", + "predict_cos_batched", + "train_lightgcn", + "train_sage" + ], + "code/run_v2.py": [ + "set_seed", + "read_txt", + "log_norm", + "GNNEncoder", + "DotDecoder", + "Recommender", + "sample_hard_negatives", + "cos_sim", + "evaluate", + "predict_cos", + "run_experiment", + "predict_batched" + ], + "code/score_level_meta_stack.py": [ + "load_module", + "best_f1", + "prf", + "rank01", + "zscore", + "author_rank01", + "add_score_block", + "read_txt", + "load_sources", + "fit_oof_predict", + "write_sub", + "main" + ], + "code/search_dynamic_fusion.py": [ + "load_train_module", + "best_f1", + "rank01", + "zscore", + "main" + ], + "code/search_val_fusion.py": [ + "best_f1", + "rank01", + "zscore", + "main" + ], + "code/stack_rank_calibration.py": [ + "load_lgcn_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "ExplicitGraphFeatures", + "add_rank_features", + "fit_oof", + "boundary_rerank", + "main" + ], + "code/train_dynamic_feature_fusion.py": [ + "load_train_module", + "read_txt", + "best_f1", + "rank01", + "FeatureBuilder", + "main" + ], + "code/train_val_hgt_bpr.py": [ + "load_lgcn_module", + "HGTRecommender", + "predict_scores", + "train_one", + "main" + ], + "code/train_val_lgcn_ensemble.py": [ + "set_seed", + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "LearnableWeightLightGCN", + "cos_sim", + "make_notebook_style_split", + "build_parts", + "build_data", + "sample_hard_negatives", + "predict_scores", + "best_f1", + "train_one", + "main" + ], + "code/train_val_mf_bpr.py": [ + "best_f1", + "MF", + "main" + ], + "code/train_val_sage_bpr.py": [ + "load_lgcn_module", + "ResidualSAGE", + "SAGERecommender", + "predict_scores", + "train_one", + "main" + ], + "data_and_docs/project-example-2026-pygver.ipynb": [], + "figures_paper/scripts/fig1_graph_overview.py": [ + "make" + ], + "figures_paper/scripts/fig2_sparsity.py": [ + "_ccdf", + "_panel_ccdf", + "make" + ], + "figures_paper/scripts/fig3_roadmap.py": [ + "make" + ], + "figures_paper/scripts/fig4_architecture.py": [ + "_box", + "_arrow", + "make" + ], + "figures_paper/scripts/fig5_ablation_highorder.py": [ + "make" + ], + "figures_paper/scripts/fig6_rank_vs_threshold.py": [ + "make" + ], + "figures_paper/scripts/fig7_error_heatmap.py": [ + "_bucket_order_key", + "make" + ], + "figures_paper/scripts/figA1_hyperparam.py": [ + "make" + ], + "figures_paper/scripts/figA2_rw_ablation.py": [ + "make" + ], + "figures_paper/scripts/figA3_feature_importance.py": [ + "make" + ], + "figures_paper/scripts/figA4_oof_pr.py": [ + "make" + ], + "figures_paper/scripts/make_all_figures.py": [ + "_load", + "main", + "_write_readme" + ], + "figures_paper/scripts/style.py": [ + "apply", + "ensure_dirs", + "save", + "stat_box" + ] + }, + "batches": [ + { + "batchIndex": 1, + "files": [ + { + "path": "figures_paper/scripts/fig1_graph_overview.py", + "language": "python", + "sizeLines": 96, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig2_sparsity.py", + "language": "python", + "sizeLines": 91, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig3_roadmap.py", + "language": "python", + "sizeLines": 90, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig4_architecture.py", + "language": "python", + "sizeLines": 87, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig5_ablation_highorder.py", + "language": "python", + "sizeLines": 96, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig6_rank_vs_threshold.py", + "language": "python", + "sizeLines": 88, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig7_error_heatmap.py", + "language": "python", + "sizeLines": 92, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA1_hyperparam.py", + "language": "python", + "sizeLines": 51, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA2_rw_ablation.py", + "language": "python", + "sizeLines": 44, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA3_feature_importance.py", + "language": "python", + "sizeLines": 50, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA4_oof_pr.py", + "language": "python", + "sizeLines": 61, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/make_all_figures.py", + "language": "python", + "sizeLines": 119, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/style.py", + "language": "python", + "sizeLines": 67, + "fileCategory": "code" + } + ], + "batchImportData": { + "figures_paper/scripts/fig1_graph_overview.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig2_sparsity.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig3_roadmap.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig4_architecture.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig5_ablation_highorder.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig6_rank_vs_threshold.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig7_error_heatmap.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA1_hyperparam.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA2_rw_ablation.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA3_feature_importance.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA4_oof_pr.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/make_all_figures.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/style.py": [] + }, + "neighborMap": {} + }, + { + "batchIndex": 2, + "files": [ + { + "path": "code/content_rich_ablation.py", + "language": "python", + "sizeLines": 208, + "fileCategory": "code" + }, + { + "path": "code/error_group_calibration.py", + "language": "python", + "sizeLines": 800, + "fileCategory": "code" + }, + { + "path": "code/extra_score_sources_ablation.py", + "language": "python", + "sizeLines": 286, + "fileCategory": "code" + }, + { + "path": "code/generate_content_rich_submission.py", + "language": "python", + "sizeLines": 127, + "fileCategory": "code" + }, + { + "path": "code/generate_extra_bprmf_submission.py", + "language": "python", + "sizeLines": 174, + "fileCategory": "code" + }, + { + "path": "code/generate_node2vec_deepwalk_submission.py", + "language": "python", + "sizeLines": 146, + "fileCategory": "code" + }, + { + "path": "code/generate_post95_submission.py", + "language": "python", + "sizeLines": 331, + "fileCategory": "code" + }, + { + "path": "code/generate_randomwalk_single_submission.py", + "language": "python", + "sizeLines": 147, + "fileCategory": "code" + }, + { + "path": "code/node2vec_deepwalk_ablation.py", + "language": "python", + "sizeLines": 257, + "fileCategory": "code" + }, + { + "path": "code/post95_ablation.py", + "language": "python", + "sizeLines": 321, + "fileCategory": "code" + }, + { + "path": "code/stack_rank_calibration.py", + "language": "python", + "sizeLines": 294, + "fileCategory": "code" + }, + { + "path": "code/train_val_lgcn_ensemble.py", + "language": "python", + "sizeLines": 506, + "fileCategory": "code" + } + ], + "batchImportData": { + "code/content_rich_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/error_group_calibration.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/extra_score_sources_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py" + ], + "code/generate_content_rich_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/content_rich_ablation.py" + ], + "code/generate_extra_bprmf_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/generate_node2vec_deepwalk_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/node2vec_deepwalk_ablation.py" + ], + "code/generate_post95_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py" + ], + "code/generate_randomwalk_single_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/randomwalk_systematic_ablation.py" + ], + "code/node2vec_deepwalk_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/post95_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py" + ], + "code/stack_rank_calibration.py": [], + "code/train_val_lgcn_ensemble.py": [] + }, + "neighborMap": { + "code/extra_score_sources_ablation.py": [ + { + "path": "code/generate_randomwalk_ensemble_submission.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "make_subs", + "aggregate", + "main" + ] + }, + { + "path": "code/randomwalk_systematic_ablation.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "RWConfig", + "small_configs", + "graph_configs", + "extra_configs", + "build_graph", + "deepwalk_walks", + "train_model", + "embedding_arrays", + "pair_feature_block", + "build_base_features", + "train_full_predict", + "main" + ] + } + ], + "code/generate_post95_submission.py": [ + { + "path": "code/generate_randomwalk_ensemble_submission.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "make_subs", + "aggregate", + "main" + ] + }, + { + "path": "code/randomwalk_systematic_ablation.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "RWConfig", + "small_configs", + "graph_configs", + "extra_configs", + "build_graph", + "deepwalk_walks", + "train_model", + "embedding_arrays", + "pair_feature_block", + "build_base_features", + "train_full_predict", + "main" + ] + } + ], + "code/generate_randomwalk_single_submission.py": [ + { + "path": "code/randomwalk_systematic_ablation.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "RWConfig", + "small_configs", + "graph_configs", + "extra_configs", + "build_graph", + "deepwalk_walks", + "train_model", + "embedding_arrays", + "pair_feature_block", + "build_base_features", + "train_full_predict", + "main" + ] + } + ], + "code/post95_ablation.py": [ + { + "path": "code/generate_randomwalk_ensemble_submission.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "make_subs", + "aggregate", + "main" + ] + }, + { + "path": "code/randomwalk_systematic_ablation.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "RWConfig", + "small_configs", + "graph_configs", + "extra_configs", + "build_graph", + "deepwalk_walks", + "train_model", + "embedding_arrays", + "pair_feature_block", + "build_base_features", + "train_full_predict", + "main" + ] + } + ], + "code/stack_rank_calibration.py": [ + { + "path": "code/generate_randomwalk_ensemble_submission.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "make_subs", + "aggregate", + "main" + ] + }, + { + "path": "code/randomwalk_systematic_ablation.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "RWConfig", + "small_configs", + "graph_configs", + "extra_configs", + "build_graph", + "deepwalk_walks", + "train_model", + "embedding_arrays", + "pair_feature_block", + "build_base_features", + "train_full_predict", + "main" + ] + } + ], + "code/train_val_lgcn_ensemble.py": [ + { + "path": "code/generate_randomwalk_ensemble_submission.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "make_subs", + "aggregate", + "main" + ] + }, + { + "path": "code/randomwalk_systematic_ablation.py", + "batchIndex": 4, + "symbols": [ + "load_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "fit_lgb_oof", + "RWConfig", + "small_configs", + "graph_configs", + "extra_configs", + "build_graph", + "deepwalk_walks", + "train_model", + "embedding_arrays", + "pair_feature_block", + "build_base_features", + "train_full_predict", + "main" + ] + } + ] + } + }, + { + "batchIndex": 3, + "files": [ + { + "path": "code/figures/fig10_rw_ensemble_size.py", + "language": "python", + "sizeLines": 39, + "fileCategory": "code" + }, + { + "path": "code/figures/fig1_dataset_overview.py", + "language": "python", + "sizeLines": 62, + "fileCategory": "code" + }, + { + "path": "code/figures/fig2_framework.py", + "language": "python", + "sizeLines": 55, + "fileCategory": "code" + }, + { + "path": "code/figures/fig3_progression.py", + "language": "python", + "sizeLines": 59, + "fileCategory": "code" + }, + { + "path": "code/figures/fig4_highorder_ablation.py", + "language": "python", + "sizeLines": 48, + "fileCategory": "code" + }, + { + "path": "code/figures/fig5_pr_roc.py", + "language": "python", + "sizeLines": 61, + "fileCategory": "code" + }, + { + "path": "code/figures/fig6_feature_contribution.py", + "language": "python", + "sizeLines": 48, + "fileCategory": "code" + }, + { + "path": "code/figures/fig7_error_analysis.py", + "language": "python", + "sizeLines": 71, + "fileCategory": "code" + }, + { + "path": "code/figures/fig8_lgcn_ensemble_correlation.py", + "language": "python", + "sizeLines": 34, + "fileCategory": "code" + }, + { + "path": "code/figures/fig9_lgcn_hyperparam.py", + "language": "python", + "sizeLines": 50, + "fileCategory": "code" + }, + { + "path": "code/figures/plot_style.py", + "language": "python", + "sizeLines": 53, + "fileCategory": "code" + } + ], + "batchImportData": { + "code/figures/fig10_rw_ensemble_size.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig1_dataset_overview.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig2_framework.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig3_progression.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig4_highorder_ablation.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig5_pr_roc.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig6_feature_contribution.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig7_error_analysis.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig8_lgcn_ensemble_correlation.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig9_lgcn_hyperparam.py": [ + "code/figures/plot_style.py" + ], + "code/figures/plot_style.py": [] + }, + "neighborMap": {} + }, + { + "batchIndex": 4, + "files": [ + { + "path": "code/generate_randomwalk_ensemble_submission.py", + "language": "python", + "sizeLines": 159, + "fileCategory": "code" + }, + { + "path": "code/randomwalk_ensemble_ablation.py", + "language": "python", + "sizeLines": 61, + "fileCategory": "code" + }, + { + "path": "code/randomwalk_one_ablation.py", + "language": "python", + "sizeLines": 70, + "fileCategory": "code" + }, + { + "path": "code/randomwalk_systematic_ablation.py", + "language": "python", + "sizeLines": 446, + "fileCategory": "code" + } + ], + "batchImportData": { + "code/generate_randomwalk_ensemble_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/randomwalk_systematic_ablation.py" + ], + "code/randomwalk_ensemble_ablation.py": [ + "code/generate_randomwalk_ensemble_submission.py", + "code/randomwalk_systematic_ablation.py" + ], + "code/randomwalk_one_ablation.py": [ + "code/randomwalk_systematic_ablation.py" + ], + "code/randomwalk_systematic_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ] + }, + "neighborMap": { + "code/generate_randomwalk_ensemble_submission.py": [ + { + "path": "code/stack_rank_calibration.py", + "batchIndex": 2, + "symbols": [ + "load_lgcn_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "ExplicitGraphFeatures", + "add_rank_features", + "fit_oof", + "boundary_rerank", + "main" + ] + }, + { + "path": "code/train_val_lgcn_ensemble.py", + "batchIndex": 2, + "symbols": [ + "set_seed", + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "LearnableWeightLightGCN", + "cos_sim", + "make_notebook_style_split", + "build_parts", + "build_data", + "sample_hard_negatives", + "predict_scores", + "best_f1", + "train_one", + "main" + ] + }, + { + "path": "code/post95_ablation.py", + "batchIndex": 2, + "symbols": [ + "load_module", + "best_f1", + "prf", + "rank01", + "zscore", + "fit_lgb_oof", + "bucket_series", + "error_analysis", + "group_threshold", + "author_quota_tuning", + "negative_evidence_features", + "topk_content_similarity", + "load_lgcn_variant_scores", + "main" + ] + }, + { + "path": "code/generate_post95_submission.py", + "batchIndex": 2, + "symbols": [ + "load_module", + "read_txt", + "infer_layers", + "infer_mode", + "score_cache_path", + "checkpoint_for_score", + "ensemble_member_scores", + "score_checkpoint_on_test", + "score_val_path_on_test", + "select_variant_val_scores", + "variant_feature_matrix", + "topk_content_similarity_fast", + "make_submissions", + "main" + ] + }, + { + "path": "code/extra_score_sources_ablation.py", + "batchIndex": 2, + "symbols": [ + "load_module", + "best_f1", + "rank01", + "zscore", + "score_to_features", + "fit_lgb_oof", + "content_mean_score", + "MF", + "train_mf_bpr_score", + "train_ranker_oof", + "main" + ] + } + ], + "code/randomwalk_systematic_ablation.py": [ + { + "path": "code/stack_rank_calibration.py", + "batchIndex": 2, + "symbols": [ + "load_lgcn_module", + "read_txt", + "best_f1", + "rank01", + "zscore", + "ExplicitGraphFeatures", + "add_rank_features", + "fit_oof", + "boundary_rerank", + "main" + ] + }, + { + "path": "code/train_val_lgcn_ensemble.py", + "batchIndex": 2, + "symbols": [ + "set_seed", + "read_txt", + "log_norm", + "LightGCNLayer", + "LightGCN", + "LearnableWeightLightGCN", + "cos_sim", + "make_notebook_style_split", + "build_parts", + "build_data", + "sample_hard_negatives", + "predict_scores", + "best_f1", + "train_one", + "main" + ] + }, + { + "path": "code/post95_ablation.py", + "batchIndex": 2, + "symbols": [ + "load_module", + "best_f1", + "prf", + "rank01", + "zscore", + "fit_lgb_oof", + "bucket_series", + "error_analysis", + "group_threshold", + "author_quota_tuning", + "negative_evidence_features", + "topk_content_similarity", + "load_lgcn_variant_scores", + "main" + ] + }, + { + "path": "code/generate_post95_submission.py", + "batchIndex": 2, + "symbols": [ + "load_module", + "read_txt", + "infer_layers", + "infer_mode", + "score_cache_path", + "checkpoint_for_score", + "ensemble_member_scores", + "score_checkpoint_on_test", + "score_val_path_on_test", + "select_variant_val_scores", + "variant_feature_matrix", + "topk_content_similarity_fast", + "make_submissions", + "main" + ] + }, + { + "path": "code/extra_score_sources_ablation.py", + "batchIndex": 2, + "symbols": [ + "load_module", + "best_f1", + "rank01", + "zscore", + "score_to_features", + "fit_lgb_oof", + "content_mean_score", + "MF", + "train_mf_bpr_score", + "train_ranker_oof", + "main" + ] + }, + { + "path": "code/generate_randomwalk_single_submission.py", + "batchIndex": 2, + "symbols": [ + "load_module", + "make_subs", + "main" + ] + } + ] + } + }, + { + "batchIndex": 5, + "files": [ + { + "path": "CLAUDE.md", + "language": "markdown", + "sizeLines": 218, + "fileCategory": "docs" + }, + { + "path": "CLAUDE_zh.md", + "language": "markdown", + "sizeLines": 206, + "fileCategory": "docs" + }, + { + "path": "README.md", + "language": "markdown", + "sizeLines": 253, + "fileCategory": "docs" + }, + { + "path": "WORKSPACE_STATUS.md", + "language": "markdown", + "sizeLines": 262, + "fileCategory": "docs" + } + ], + "batchImportData": { + "CLAUDE.md": [], + "CLAUDE_zh.md": [], + "README.md": [], + "WORKSPACE_STATUS.md": [] + }, + "neighborMap": {} + }, + { + "batchIndex": 6, + "files": [ + { + "path": "data_and_docs/advice.md", + "language": "markdown", + "sizeLines": 468, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/dataset.md", + "language": "markdown", + "sizeLines": 26, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/project_description.md", + "language": "markdown", + "sizeLines": 21, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/project_evaluation.md", + "language": "markdown", + "sizeLines": 14, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/proposal.md", + "language": "markdown", + "sizeLines": 49, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/references.md", + "language": "markdown", + "sizeLines": 11, + "fileCategory": "docs" + } + ], + "batchImportData": { + "data_and_docs/advice.md": [], + "data_and_docs/dataset.md": [], + "data_and_docs/project_description.md": [], + "data_and_docs/project_evaluation.md": [], + "data_and_docs/proposal.md": [], + "data_and_docs/references.md": [] + }, + "neighborMap": {} + }, + { + "batchIndex": 7, + "files": [ + { + "path": "docs_first_principles/00_README.md", + "language": "markdown", + "sizeLines": 152, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/01_problem_and_dataset.md", + "language": "markdown", + "sizeLines": 168, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/02_architecture_overview.md", + "language": "markdown", + "sizeLines": 236, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/03_data_flow_and_artifacts.md", + "language": "markdown", + "sizeLines": 302, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/04_lightgcn_from_first_principles.md", + "language": "markdown", + "sizeLines": 335, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/05_feature_stacking_and_lightgbm.md", + "language": "markdown", + "sizeLines": 242, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/06_random_walk_features.md", + "language": "markdown", + "sizeLines": 254, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/07_high_order_citation_propagation.md", + "language": "markdown", + "sizeLines": 357, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/08_calibration_and_rank_cutoff.md", + "language": "markdown", + "sizeLines": 293, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/09_experiment_timeline.md", + "language": "markdown", + "sizeLines": 141, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/10_code_map_and_entrypoints.md", + "language": "markdown", + "sizeLines": 185, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/11_figures_and_paper_mapping.md", + "language": "markdown", + "sizeLines": 367, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/12_reproduction_guide.md", + "language": "markdown", + "sizeLines": 324, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/13_common_questions_for_the_author.md", + "language": "markdown", + "sizeLines": 212, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/SUMMARY_FOR_PAPER.md", + "language": "markdown", + "sizeLines": 310, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/_fact_sheet.md", + "language": "markdown", + "sizeLines": 287, + "fileCategory": "docs" + } + ], + "batchImportData": { + "docs_first_principles/00_README.md": [], + "docs_first_principles/01_problem_and_dataset.md": [], + "docs_first_principles/02_architecture_overview.md": [], + "docs_first_principles/03_data_flow_and_artifacts.md": [], + "docs_first_principles/04_lightgcn_from_first_principles.md": [], + "docs_first_principles/05_feature_stacking_and_lightgbm.md": [], + "docs_first_principles/06_random_walk_features.md": [], + "docs_first_principles/07_high_order_citation_propagation.md": [], + "docs_first_principles/08_calibration_and_rank_cutoff.md": [], + "docs_first_principles/09_experiment_timeline.md": [], + "docs_first_principles/10_code_map_and_entrypoints.md": [], + "docs_first_principles/11_figures_and_paper_mapping.md": [], + "docs_first_principles/12_reproduction_guide.md": [], + "docs_first_principles/13_common_questions_for_the_author.md": [], + "docs_first_principles/SUMMARY_FOR_PAPER.md": [], + "docs_first_principles/_fact_sheet.md": [] + }, + "neighborMap": {} + }, + { + "batchIndex": 8, + "files": [ + { + "path": "env/conda-list-cs3319.txt", + "language": "txt", + "sizeLines": 100, + "fileCategory": "docs" + }, + { + "path": "env/environment-cs3319.yml", + "language": "yaml", + "sizeLines": 106, + "fileCategory": "config" + }, + { + "path": "env/requirements-minimal.txt", + "language": "txt", + "sizeLines": 10, + "fileCategory": "docs" + } + ], + "batchImportData": { + "env/conda-list-cs3319.txt": [], + "env/environment-cs3319.yml": [], + "env/requirements-minimal.txt": [] + }, + "neighborMap": {} + }, + { + "batchIndex": 9, + "files": [ + { + "path": "reports/exploration_summary.md", + "language": "markdown", + "sizeLines": 861, + "fileCategory": "docs" + }, + { + "path": "reports/final_report.md", + "language": "markdown", + "sizeLines": 202, + "fileCategory": "docs" + }, + { + "path": "reports/paper_writing_guide.md", + "language": "markdown", + "sizeLines": 321, + "fileCategory": "docs" + }, + { + "path": "reports/preliminary_report.md", + "language": "markdown", + "sizeLines": 175, + "fileCategory": "docs" + } + ], + "batchImportData": { + "reports/exploration_summary.md": [], + "reports/final_report.md": [], + "reports/paper_writing_guide.md": [], + "reports/preliminary_report.md": [] + }, + "neighborMap": {} + }, + { + "batchIndex": 10, + "files": [ + { + "path": "code/compare_gnn.py", + "language": "python", + "sizeLines": 414, + "fileCategory": "code" + }, + { + "path": "code/evaluate_val_checkpoints.py", + "language": "python", + "sizeLines": 147, + "fileCategory": "code" + }, + { + "path": "code/figures/gen_val_labels.py", + "language": "python", + "sizeLines": 65, + "fileCategory": "code" + }, + { + "path": "code/generate_conservative_rw_blends.py", + "language": "python", + "sizeLines": 71, + "fileCategory": "code" + }, + { + "path": "code/generate_dot_submission.py", + "language": "python", + "sizeLines": 187, + "fileCategory": "code" + }, + { + "path": "code/generate_ens6_submission.py", + "language": "python", + "sizeLines": 263, + "fileCategory": "code" + }, + { + "path": "code/generate_large_ensemble_submission.py", + "language": "python", + "sizeLines": 342, + "fileCategory": "code" + }, + { + "path": "code/high_order_graph_stack.py", + "language": "python", + "sizeLines": 351, + "fileCategory": "code" + }, + { + "path": "code/high_order_model_compare.py", + "language": "python", + "sizeLines": 166, + "fileCategory": "code" + }, + { + "path": "code/make_notebook_style_split.py", + "language": "python", + "sizeLines": 86, + "fileCategory": "code" + }, + { + "path": "code/rich_randomwalk_stack.py", + "language": "python", + "sizeLines": 189, + "fileCategory": "code" + }, + { + "path": "code/run_baseline.py", + "language": "python", + "sizeLines": 352, + "fileCategory": "code" + }, + { + "path": "code/run_final.py", + "language": "python", + "sizeLines": 494, + "fileCategory": "code" + }, + { + "path": "code/run_graph_features.py", + "language": "python", + "sizeLines": 315, + "fileCategory": "code" + }, + { + "path": "code/run_improved.py", + "language": "python", + "sizeLines": 596, + "fileCategory": "code" + }, + { + "path": "code/run_lgcn_final.py", + "language": "python", + "sizeLines": 308, + "fileCategory": "code" + }, + { + "path": "code/run_lgcn_v2.py", + "language": "python", + "sizeLines": 311, + "fileCategory": "code" + }, + { + "path": "code/run_ultimate.py", + "language": "python", + "sizeLines": 450, + "fileCategory": "code" + }, + { + "path": "code/run_v2.py", + "language": "python", + "sizeLines": 520, + "fileCategory": "code" + }, + { + "path": "code/score_level_meta_stack.py", + "language": "python", + "sizeLines": 236, + "fileCategory": "code" + }, + { + "path": "code/search_dynamic_fusion.py", + "language": "python", + "sizeLines": 140, + "fileCategory": "code" + }, + { + "path": "code/search_val_fusion.py", + "language": "python", + "sizeLines": 127, + "fileCategory": "code" + }, + { + "path": "code/train_dynamic_feature_fusion.py", + "language": "python", + "sizeLines": 282, + "fileCategory": "code" + }, + { + "path": "code/train_val_hgt_bpr.py", + "language": "python", + "sizeLines": 188, + "fileCategory": "code" + }, + { + "path": "code/train_val_mf_bpr.py", + "language": "python", + "sizeLines": 110, + "fileCategory": "code" + } + ], + "batchImportData": { + "code/compare_gnn.py": [], + "code/evaluate_val_checkpoints.py": [], + "code/figures/gen_val_labels.py": [], + "code/generate_conservative_rw_blends.py": [], + "code/generate_dot_submission.py": [], + "code/generate_ens6_submission.py": [], + "code/generate_large_ensemble_submission.py": [], + "code/high_order_graph_stack.py": [], + "code/high_order_model_compare.py": [], + "code/make_notebook_style_split.py": [], + "code/rich_randomwalk_stack.py": [], + "code/run_baseline.py": [], + "code/run_final.py": [], + "code/run_graph_features.py": [], + "code/run_improved.py": [], + "code/run_lgcn_final.py": [], + "code/run_lgcn_v2.py": [], + "code/run_ultimate.py": [], + "code/run_v2.py": [], + "code/score_level_meta_stack.py": [], + "code/search_dynamic_fusion.py": [], + "code/search_val_fusion.py": [], + "code/train_dynamic_feature_fusion.py": [], + "code/train_val_hgt_bpr.py": [], + "code/train_val_mf_bpr.py": [] + }, + "neighborMap": {} + }, + { + "batchIndex": 11, + "files": [ + { + "path": "code/train_val_sage_bpr.py", + "language": "python", + "sizeLines": 188, + "fileCategory": "code" + }, + { + "path": "data_and_docs/project-example-2026-pygver.ipynb", + "language": "ipynb", + "sizeLines": 0, + "fileCategory": "code" + }, + { + "path": "figures_paper/README_figures.md", + "language": "markdown", + "sizeLines": 115, + "fileCategory": "docs" + }, + { + "path": "notes/experiment_history.md", + "language": "markdown", + "sizeLines": 319, + "fileCategory": "docs" + } + ], + "batchImportData": { + "code/train_val_sage_bpr.py": [], + "data_and_docs/project-example-2026-pygver.ipynb": [], + "figures_paper/README_figures.md": [], + "notes/experiment_history.md": [] + }, + "neighborMap": {} + } + ] +} \ No newline at end of file diff --git a/.understand-anything/intermediate/import-map-input.json b/.understand-anything/intermediate/import-map-input.json new file mode 100644 index 0000000000000000000000000000000000000000..a5ac1d2d95b6ea3303595d2abcb212a52fbd96d4 --- /dev/null +++ b/.understand-anything/intermediate/import-map-input.json @@ -0,0 +1 @@ +{"projectRoot":"D:/reps/26H1_cs3319_final_deliverable","files":[{"path":"CLAUDE_zh.md","language":"markdown","fileCategory":"docs"},{"path":"CLAUDE.md","language":"markdown","fileCategory":"docs"},{"path":"code/compare_gnn.py","language":"python","fileCategory":"code"},{"path":"code/content_rich_ablation.py","language":"python","fileCategory":"code"},{"path":"code/error_group_calibration.py","language":"python","fileCategory":"code"},{"path":"code/evaluate_val_checkpoints.py","language":"python","fileCategory":"code"},{"path":"code/extra_score_sources_ablation.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig1_dataset_overview.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig10_rw_ensemble_size.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig2_framework.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig3_progression.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig4_highorder_ablation.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig5_pr_roc.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig6_feature_contribution.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig7_error_analysis.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig8_lgcn_ensemble_correlation.py","language":"python","fileCategory":"code"},{"path":"code/figures/fig9_lgcn_hyperparam.py","language":"python","fileCategory":"code"},{"path":"code/figures/gen_val_labels.py","language":"python","fileCategory":"code"},{"path":"code/figures/plot_style.py","language":"python","fileCategory":"code"},{"path":"code/generate_conservative_rw_blends.py","language":"python","fileCategory":"code"},{"path":"code/generate_content_rich_submission.py","language":"python","fileCategory":"code"},{"path":"code/generate_dot_submission.py","language":"python","fileCategory":"code"},{"path":"code/generate_ens6_submission.py","language":"python","fileCategory":"code"},{"path":"code/generate_extra_bprmf_submission.py","language":"python","fileCategory":"code"},{"path":"code/generate_large_ensemble_submission.py","language":"python","fileCategory":"code"},{"path":"code/generate_node2vec_deepwalk_submission.py","language":"python","fileCategory":"code"},{"path":"code/generate_post95_submission.py","language":"python","fileCategory":"code"},{"path":"code/generate_randomwalk_ensemble_submission.py","language":"python","fileCategory":"code"},{"path":"code/generate_randomwalk_single_submission.py","language":"python","fileCategory":"code"},{"path":"code/high_order_graph_stack.py","language":"python","fileCategory":"code"},{"path":"code/high_order_model_compare.py","language":"python","fileCategory":"code"},{"path":"code/make_notebook_style_split.py","language":"python","fileCategory":"code"},{"path":"code/node2vec_deepwalk_ablation.py","language":"python","fileCategory":"code"},{"path":"code/post95_ablation.py","language":"python","fileCategory":"code"},{"path":"code/randomwalk_ensemble_ablation.py","language":"python","fileCategory":"code"},{"path":"code/randomwalk_one_ablation.py","language":"python","fileCategory":"code"},{"path":"code/randomwalk_systematic_ablation.py","language":"python","fileCategory":"code"},{"path":"code/rich_randomwalk_stack.py","language":"python","fileCategory":"code"},{"path":"code/run_baseline.py","language":"python","fileCategory":"code"},{"path":"code/run_final.py","language":"python","fileCategory":"code"},{"path":"code/run_graph_features.py","language":"python","fileCategory":"code"},{"path":"code/run_improved.py","language":"python","fileCategory":"code"},{"path":"code/run_lgcn_final.py","language":"python","fileCategory":"code"},{"path":"code/run_lgcn_v2.py","language":"python","fileCategory":"code"},{"path":"code/run_ultimate.py","language":"python","fileCategory":"code"},{"path":"code/run_v2.py","language":"python","fileCategory":"code"},{"path":"code/score_level_meta_stack.py","language":"python","fileCategory":"code"},{"path":"code/search_dynamic_fusion.py","language":"python","fileCategory":"code"},{"path":"code/search_val_fusion.py","language":"python","fileCategory":"code"},{"path":"code/stack_rank_calibration.py","language":"python","fileCategory":"code"},{"path":"code/train_dynamic_feature_fusion.py","language":"python","fileCategory":"code"},{"path":"code/train_val_hgt_bpr.py","language":"python","fileCategory":"code"},{"path":"code/train_val_lgcn_ensemble.py","language":"python","fileCategory":"code"},{"path":"code/train_val_mf_bpr.py","language":"python","fileCategory":"code"},{"path":"code/train_val_sage_bpr.py","language":"python","fileCategory":"code"},{"path":"data_and_docs/advice.md","language":"markdown","fileCategory":"docs"},{"path":"data_and_docs/dataset.md","language":"markdown","fileCategory":"docs"},{"path":"data_and_docs/project_description.md","language":"markdown","fileCategory":"docs"},{"path":"data_and_docs/project_evaluation.md","language":"markdown","fileCategory":"docs"},{"path":"data_and_docs/project-example-2026-pygver.ipynb","language":"ipynb","fileCategory":"code"},{"path":"data_and_docs/proposal.md","language":"markdown","fileCategory":"docs"},{"path":"data_and_docs/references.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/_fact_sheet.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/00_README.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/01_problem_and_dataset.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/02_architecture_overview.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/03_data_flow_and_artifacts.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/04_lightgcn_from_first_principles.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/05_feature_stacking_and_lightgbm.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/06_random_walk_features.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/07_high_order_citation_propagation.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/08_calibration_and_rank_cutoff.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/09_experiment_timeline.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/10_code_map_and_entrypoints.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/11_figures_and_paper_mapping.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/12_reproduction_guide.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/13_common_questions_for_the_author.md","language":"markdown","fileCategory":"docs"},{"path":"docs_first_principles/SUMMARY_FOR_PAPER.md","language":"markdown","fileCategory":"docs"},{"path":"env/conda-list-cs3319.txt","language":"txt","fileCategory":"docs"},{"path":"env/environment-cs3319.yml","language":"yaml","fileCategory":"config"},{"path":"env/requirements-minimal.txt","language":"txt","fileCategory":"docs"},{"path":"figures_paper/README_figures.md","language":"markdown","fileCategory":"docs"},{"path":"figures_paper/scripts/fig1_graph_overview.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/fig2_sparsity.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/fig3_roadmap.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/fig4_architecture.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/fig5_ablation_highorder.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/fig6_rank_vs_threshold.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/fig7_error_heatmap.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/figA1_hyperparam.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/figA2_rw_ablation.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/figA3_feature_importance.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/figA4_oof_pr.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/make_all_figures.py","language":"python","fileCategory":"code"},{"path":"figures_paper/scripts/style.py","language":"python","fileCategory":"code"},{"path":"notes/experiment_history.md","language":"markdown","fileCategory":"docs"},{"path":"README.md","language":"markdown","fileCategory":"docs"},{"path":"reports/exploration_summary.md","language":"markdown","fileCategory":"docs"},{"path":"reports/final_report.md","language":"markdown","fileCategory":"docs"},{"path":"reports/paper_writing_guide.md","language":"markdown","fileCategory":"docs"},{"path":"reports/preliminary_report.md","language":"markdown","fileCategory":"docs"},{"path":"WORKSPACE_STATUS.md","language":"markdown","fileCategory":"docs"}]} \ No newline at end of file diff --git a/.understand-anything/intermediate/import-map.json b/.understand-anything/intermediate/import-map.json new file mode 100644 index 0000000000000000000000000000000000000000..422cd0a18dcf7184b3a6e9582c13ac9a381ff1d3 --- /dev/null +++ b/.understand-anything/intermediate/import-map.json @@ -0,0 +1,231 @@ +{ + "scriptCompleted": true, + "stats": { + "filesScanned": 102, + "filesWithImports": 36, + "totalEdges": 83 + }, + "importMap": { + "CLAUDE_zh.md": [], + "CLAUDE.md": [], + "code/compare_gnn.py": [], + "code/content_rich_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/error_group_calibration.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/evaluate_val_checkpoints.py": [], + "code/extra_score_sources_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py" + ], + "code/figures/fig1_dataset_overview.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig10_rw_ensemble_size.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig2_framework.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig3_progression.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig4_highorder_ablation.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig5_pr_roc.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig6_feature_contribution.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig7_error_analysis.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig8_lgcn_ensemble_correlation.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig9_lgcn_hyperparam.py": [ + "code/figures/plot_style.py" + ], + "code/figures/gen_val_labels.py": [], + "code/figures/plot_style.py": [], + "code/generate_conservative_rw_blends.py": [], + "code/generate_content_rich_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/content_rich_ablation.py" + ], + "code/generate_dot_submission.py": [], + "code/generate_ens6_submission.py": [], + "code/generate_extra_bprmf_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/generate_large_ensemble_submission.py": [], + "code/generate_node2vec_deepwalk_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/node2vec_deepwalk_ablation.py" + ], + "code/generate_post95_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py" + ], + "code/generate_randomwalk_ensemble_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/randomwalk_systematic_ablation.py" + ], + "code/generate_randomwalk_single_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/randomwalk_systematic_ablation.py" + ], + "code/high_order_graph_stack.py": [], + "code/high_order_model_compare.py": [], + "code/make_notebook_style_split.py": [], + "code/node2vec_deepwalk_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/post95_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py" + ], + "code/randomwalk_ensemble_ablation.py": [ + "code/generate_randomwalk_ensemble_submission.py", + "code/randomwalk_systematic_ablation.py" + ], + "code/randomwalk_one_ablation.py": [ + "code/randomwalk_systematic_ablation.py" + ], + "code/randomwalk_systematic_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/rich_randomwalk_stack.py": [], + "code/run_baseline.py": [], + "code/run_final.py": [], + "code/run_graph_features.py": [], + "code/run_improved.py": [], + "code/run_lgcn_final.py": [], + "code/run_lgcn_v2.py": [], + "code/run_ultimate.py": [], + "code/run_v2.py": [], + "code/score_level_meta_stack.py": [], + "code/search_dynamic_fusion.py": [], + "code/search_val_fusion.py": [], + "code/stack_rank_calibration.py": [], + "code/train_dynamic_feature_fusion.py": [], + "code/train_val_hgt_bpr.py": [], + "code/train_val_lgcn_ensemble.py": [], + "code/train_val_mf_bpr.py": [], + "code/train_val_sage_bpr.py": [], + "data_and_docs/advice.md": [], + "data_and_docs/dataset.md": [], + "data_and_docs/project_description.md": [], + "data_and_docs/project_evaluation.md": [], + "data_and_docs/project-example-2026-pygver.ipynb": [], + "data_and_docs/proposal.md": [], + "data_and_docs/references.md": [], + "docs_first_principles/_fact_sheet.md": [], + "docs_first_principles/00_README.md": [], + "docs_first_principles/01_problem_and_dataset.md": [], + "docs_first_principles/02_architecture_overview.md": [], + "docs_first_principles/03_data_flow_and_artifacts.md": [], + "docs_first_principles/04_lightgcn_from_first_principles.md": [], + "docs_first_principles/05_feature_stacking_and_lightgbm.md": [], + "docs_first_principles/06_random_walk_features.md": [], + "docs_first_principles/07_high_order_citation_propagation.md": [], + "docs_first_principles/08_calibration_and_rank_cutoff.md": [], + "docs_first_principles/09_experiment_timeline.md": [], + "docs_first_principles/10_code_map_and_entrypoints.md": [], + "docs_first_principles/11_figures_and_paper_mapping.md": [], + "docs_first_principles/12_reproduction_guide.md": [], + "docs_first_principles/13_common_questions_for_the_author.md": [], + "docs_first_principles/SUMMARY_FOR_PAPER.md": [], + "env/conda-list-cs3319.txt": [], + "env/environment-cs3319.yml": [], + "env/requirements-minimal.txt": [], + "figures_paper/README_figures.md": [], + "figures_paper/scripts/fig1_graph_overview.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig2_sparsity.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig3_roadmap.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig4_architecture.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig5_ablation_highorder.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig6_rank_vs_threshold.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig7_error_heatmap.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA1_hyperparam.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA2_rw_ablation.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA3_feature_importance.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA4_oof_pr.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/make_all_figures.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/style.py": [], + "notes/experiment_history.md": [], + "README.md": [], + "reports/exploration_summary.md": [], + "reports/final_report.md": [], + "reports/paper_writing_guide.md": [], + "reports/preliminary_report.md": [], + "WORKSPACE_STATUS.md": [] + } +} \ No newline at end of file diff --git a/.understand-anything/intermediate/scan-raw.json b/.understand-anything/intermediate/scan-raw.json new file mode 100644 index 0000000000000000000000000000000000000000..6e223f5c2db3139e8c2a1ba120895c5acb233853 --- /dev/null +++ b/.understand-anything/intermediate/scan-raw.json @@ -0,0 +1,635 @@ +{ + "scriptCompleted": true, + "files": [ + { + "path": "CLAUDE_zh.md", + "language": "markdown", + "sizeLines": 206, + "fileCategory": "docs" + }, + { + "path": "CLAUDE.md", + "language": "markdown", + "sizeLines": 218, + "fileCategory": "docs" + }, + { + "path": "code/compare_gnn.py", + "language": "python", + "sizeLines": 414, + "fileCategory": "code" + }, + { + "path": "code/content_rich_ablation.py", + "language": "python", + "sizeLines": 208, + "fileCategory": "code" + }, + { + "path": "code/error_group_calibration.py", + "language": "python", + "sizeLines": 800, + "fileCategory": "code" + }, + { + "path": "code/evaluate_val_checkpoints.py", + "language": "python", + "sizeLines": 147, + "fileCategory": "code" + }, + { + "path": "code/extra_score_sources_ablation.py", + "language": "python", + "sizeLines": 286, + "fileCategory": "code" + }, + { + "path": "code/figures/fig1_dataset_overview.py", + "language": "python", + "sizeLines": 62, + "fileCategory": "code" + }, + { + "path": "code/figures/fig10_rw_ensemble_size.py", + "language": "python", + "sizeLines": 39, + "fileCategory": "code" + }, + { + "path": "code/figures/fig2_framework.py", + "language": "python", + "sizeLines": 55, + "fileCategory": "code" + }, + { + "path": "code/figures/fig3_progression.py", + "language": "python", + "sizeLines": 59, + "fileCategory": "code" + }, + { + "path": "code/figures/fig4_highorder_ablation.py", + "language": "python", + "sizeLines": 48, + "fileCategory": "code" + }, + { + "path": "code/figures/fig5_pr_roc.py", + "language": "python", + "sizeLines": 61, + "fileCategory": "code" + }, + { + "path": "code/figures/fig6_feature_contribution.py", + "language": "python", + "sizeLines": 48, + "fileCategory": "code" + }, + { + "path": "code/figures/fig7_error_analysis.py", + "language": "python", + "sizeLines": 71, + "fileCategory": "code" + }, + { + "path": "code/figures/fig8_lgcn_ensemble_correlation.py", + "language": "python", + "sizeLines": 34, + "fileCategory": "code" + }, + { + "path": "code/figures/fig9_lgcn_hyperparam.py", + "language": "python", + "sizeLines": 50, + "fileCategory": "code" + }, + { + "path": "code/figures/gen_val_labels.py", + "language": "python", + "sizeLines": 65, + "fileCategory": "code" + }, + { + "path": "code/figures/plot_style.py", + "language": "python", + "sizeLines": 53, + "fileCategory": "code" + }, + { + "path": "code/generate_conservative_rw_blends.py", + "language": "python", + "sizeLines": 71, + "fileCategory": "code" + }, + { + "path": "code/generate_content_rich_submission.py", + "language": "python", + "sizeLines": 127, + "fileCategory": "code" + }, + { + "path": "code/generate_dot_submission.py", + "language": "python", + "sizeLines": 187, + "fileCategory": "code" + }, + { + "path": "code/generate_ens6_submission.py", + "language": "python", + "sizeLines": 263, + "fileCategory": "code" + }, + { + "path": "code/generate_extra_bprmf_submission.py", + "language": "python", + "sizeLines": 174, + "fileCategory": "code" + }, + { + "path": "code/generate_large_ensemble_submission.py", + "language": "python", + "sizeLines": 342, + "fileCategory": "code" + }, + { + "path": "code/generate_node2vec_deepwalk_submission.py", + "language": "python", + "sizeLines": 146, + "fileCategory": "code" + }, + { + "path": "code/generate_post95_submission.py", + "language": "python", + "sizeLines": 331, + "fileCategory": "code" + }, + { + "path": "code/generate_randomwalk_ensemble_submission.py", + "language": "python", + "sizeLines": 159, + "fileCategory": "code" + }, + { + "path": "code/generate_randomwalk_single_submission.py", + "language": "python", + "sizeLines": 147, + "fileCategory": "code" + }, + { + "path": "code/high_order_graph_stack.py", + "language": "python", + "sizeLines": 351, + "fileCategory": "code" + }, + { + "path": "code/high_order_model_compare.py", + "language": "python", + "sizeLines": 166, + "fileCategory": "code" + }, + { + "path": "code/make_notebook_style_split.py", + "language": "python", + "sizeLines": 86, + "fileCategory": "code" + }, + { + "path": "code/node2vec_deepwalk_ablation.py", + "language": "python", + "sizeLines": 257, + "fileCategory": "code" + }, + { + "path": "code/post95_ablation.py", + "language": "python", + "sizeLines": 321, + "fileCategory": "code" + }, + { + "path": "code/randomwalk_ensemble_ablation.py", + "language": "python", + "sizeLines": 61, + "fileCategory": "code" + }, + { + "path": "code/randomwalk_one_ablation.py", + "language": "python", + "sizeLines": 70, + "fileCategory": "code" + }, + { + "path": "code/randomwalk_systematic_ablation.py", + "language": "python", + "sizeLines": 446, + "fileCategory": "code" + }, + { + "path": "code/rich_randomwalk_stack.py", + "language": "python", + "sizeLines": 189, + "fileCategory": "code" + }, + { + "path": "code/run_baseline.py", + "language": "python", + "sizeLines": 352, + "fileCategory": "code" + }, + { + "path": "code/run_final.py", + "language": "python", + "sizeLines": 494, + "fileCategory": "code" + }, + { + "path": "code/run_graph_features.py", + "language": "python", + "sizeLines": 315, + "fileCategory": "code" + }, + { + "path": "code/run_improved.py", + "language": "python", + "sizeLines": 596, + "fileCategory": "code" + }, + { + "path": "code/run_lgcn_final.py", + "language": "python", + "sizeLines": 308, + "fileCategory": "code" + }, + { + "path": "code/run_lgcn_v2.py", + "language": "python", + "sizeLines": 311, + "fileCategory": "code" + }, + { + "path": "code/run_ultimate.py", + "language": "python", + "sizeLines": 450, + "fileCategory": "code" + }, + { + "path": "code/run_v2.py", + "language": "python", + "sizeLines": 520, + "fileCategory": "code" + }, + { + "path": "code/score_level_meta_stack.py", + "language": "python", + "sizeLines": 236, + "fileCategory": "code" + }, + { + "path": "code/search_dynamic_fusion.py", + "language": "python", + "sizeLines": 140, + "fileCategory": "code" + }, + { + "path": "code/search_val_fusion.py", + "language": "python", + "sizeLines": 127, + "fileCategory": "code" + }, + { + "path": "code/stack_rank_calibration.py", + "language": "python", + "sizeLines": 294, + "fileCategory": "code" + }, + { + "path": "code/train_dynamic_feature_fusion.py", + "language": "python", + "sizeLines": 282, + "fileCategory": "code" + }, + { + "path": "code/train_val_hgt_bpr.py", + "language": "python", + "sizeLines": 188, + "fileCategory": "code" + }, + { + "path": "code/train_val_lgcn_ensemble.py", + "language": "python", + "sizeLines": 506, + "fileCategory": "code" + }, + { + "path": "code/train_val_mf_bpr.py", + "language": "python", + "sizeLines": 110, + "fileCategory": "code" + }, + { + "path": "code/train_val_sage_bpr.py", + "language": "python", + "sizeLines": 188, + "fileCategory": "code" + }, + { + "path": "data_and_docs/advice.md", + "language": "markdown", + "sizeLines": 468, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/dataset.md", + "language": "markdown", + "sizeLines": 26, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/project_description.md", + "language": "markdown", + "sizeLines": 21, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/project_evaluation.md", + "language": "markdown", + "sizeLines": 14, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/project-example-2026-pygver.ipynb", + "language": "ipynb", + "sizeLines": 0, + "fileCategory": "code" + }, + { + "path": "data_and_docs/proposal.md", + "language": "markdown", + "sizeLines": 49, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/references.md", + "language": "markdown", + "sizeLines": 11, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/_fact_sheet.md", + "language": "markdown", + "sizeLines": 287, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/00_README.md", + "language": "markdown", + "sizeLines": 152, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/01_problem_and_dataset.md", + "language": "markdown", + "sizeLines": 168, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/02_architecture_overview.md", + "language": "markdown", + "sizeLines": 236, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/03_data_flow_and_artifacts.md", + "language": "markdown", + "sizeLines": 302, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/04_lightgcn_from_first_principles.md", + "language": "markdown", + "sizeLines": 335, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/05_feature_stacking_and_lightgbm.md", + "language": "markdown", + "sizeLines": 242, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/06_random_walk_features.md", + "language": "markdown", + "sizeLines": 254, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/07_high_order_citation_propagation.md", + "language": "markdown", + "sizeLines": 357, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/08_calibration_and_rank_cutoff.md", + "language": "markdown", + "sizeLines": 293, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/09_experiment_timeline.md", + "language": "markdown", + "sizeLines": 141, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/10_code_map_and_entrypoints.md", + "language": "markdown", + "sizeLines": 185, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/11_figures_and_paper_mapping.md", + "language": "markdown", + "sizeLines": 367, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/12_reproduction_guide.md", + "language": "markdown", + "sizeLines": 324, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/13_common_questions_for_the_author.md", + "language": "markdown", + "sizeLines": 212, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/SUMMARY_FOR_PAPER.md", + "language": "markdown", + "sizeLines": 310, + "fileCategory": "docs" + }, + { + "path": "env/conda-list-cs3319.txt", + "language": "txt", + "sizeLines": 100, + "fileCategory": "docs" + }, + { + "path": "env/environment-cs3319.yml", + "language": "yaml", + "sizeLines": 106, + "fileCategory": "config" + }, + { + "path": "env/requirements-minimal.txt", + "language": "txt", + "sizeLines": 10, + "fileCategory": "docs" + }, + { + "path": "figures_paper/README_figures.md", + "language": "markdown", + "sizeLines": 115, + "fileCategory": "docs" + }, + { + "path": "figures_paper/scripts/fig1_graph_overview.py", + "language": "python", + "sizeLines": 96, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig2_sparsity.py", + "language": "python", + "sizeLines": 91, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig3_roadmap.py", + "language": "python", + "sizeLines": 90, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig4_architecture.py", + "language": "python", + "sizeLines": 87, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig5_ablation_highorder.py", + "language": "python", + "sizeLines": 96, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig6_rank_vs_threshold.py", + "language": "python", + "sizeLines": 88, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig7_error_heatmap.py", + "language": "python", + "sizeLines": 92, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA1_hyperparam.py", + "language": "python", + "sizeLines": 51, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA2_rw_ablation.py", + "language": "python", + "sizeLines": 44, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA3_feature_importance.py", + "language": "python", + "sizeLines": 50, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA4_oof_pr.py", + "language": "python", + "sizeLines": 61, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/make_all_figures.py", + "language": "python", + "sizeLines": 119, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/style.py", + "language": "python", + "sizeLines": 67, + "fileCategory": "code" + }, + { + "path": "notes/experiment_history.md", + "language": "markdown", + "sizeLines": 319, + "fileCategory": "docs" + }, + { + "path": "README.md", + "language": "markdown", + "sizeLines": 253, + "fileCategory": "docs" + }, + { + "path": "reports/exploration_summary.md", + "language": "markdown", + "sizeLines": 861, + "fileCategory": "docs" + }, + { + "path": "reports/final_report.md", + "language": "markdown", + "sizeLines": 202, + "fileCategory": "docs" + }, + { + "path": "reports/paper_writing_guide.md", + "language": "markdown", + "sizeLines": 321, + "fileCategory": "docs" + }, + { + "path": "reports/preliminary_report.md", + "language": "markdown", + "sizeLines": 175, + "fileCategory": "docs" + }, + { + "path": "WORKSPACE_STATUS.md", + "language": "markdown", + "sizeLines": 262, + "fileCategory": "docs" + } + ], + "totalFiles": 102, + "filteredByIgnore": 276, + "estimatedComplexity": "moderate", + "stats": { + "filesScanned": 102, + "byCategory": { + "docs": 34, + "code": 67, + "config": 1 + }, + "byLanguage": { + "markdown": 32, + "python": 66, + "ipynb": 1, + "txt": 2, + "yaml": 1 + } + } +} \ No newline at end of file diff --git a/.understand-anything/intermediate/scan-result.json b/.understand-anything/intermediate/scan-result.json new file mode 100644 index 0000000000000000000000000000000000000000..73a9e90791d9b2107a304370fe018534c86c79c3 --- /dev/null +++ b/.understand-anything/intermediate/scan-result.json @@ -0,0 +1,882 @@ +{ + "name": "CS3319 Project 2 Final Deliverable", + "description": "Author–paper link-prediction (reading recommendation) on a heterogeneous academic graph (6611 authors, 79937 papers). Two-stage stacking: Stage-1 score producers (LightGCN ensemble, BPR-MF, 7 DeepWalk/Node2Vec blocks, content profiles, explicit graph/meta-path, directed high-order citation propagation) feed a 259-dim LightGBM Stage-2 meta-learner with rank-cutoff top-50% decision. Final public F1 0.96626.", + "languages": [ + "python", + "markdown" + ], + "frameworks": [ + "numpy", + "pandas", + "scipy", + "scikit-learn", + "lightgbm", + "torch", + "torch-geometric", + "gensim", + "networkx", + "node2vec", + "matplotlib", + "seaborn" + ], + "files": [ + { + "path": "CLAUDE_zh.md", + "language": "markdown", + "sizeLines": 206, + "fileCategory": "docs" + }, + { + "path": "CLAUDE.md", + "language": "markdown", + "sizeLines": 218, + "fileCategory": "docs" + }, + { + "path": "code/compare_gnn.py", + "language": "python", + "sizeLines": 414, + "fileCategory": "code" + }, + { + "path": "code/content_rich_ablation.py", + "language": "python", + "sizeLines": 208, + "fileCategory": "code" + }, + { + "path": "code/error_group_calibration.py", + "language": "python", + "sizeLines": 800, + "fileCategory": "code" + }, + { + "path": "code/evaluate_val_checkpoints.py", + "language": "python", + "sizeLines": 147, + "fileCategory": "code" + }, + { + "path": "code/extra_score_sources_ablation.py", + "language": "python", + "sizeLines": 286, + "fileCategory": "code" + }, + { + "path": "code/figures/fig1_dataset_overview.py", + "language": "python", + "sizeLines": 62, + "fileCategory": "code" + }, + { + "path": "code/figures/fig10_rw_ensemble_size.py", + "language": "python", + "sizeLines": 39, + "fileCategory": "code" + }, + { + "path": "code/figures/fig2_framework.py", + "language": "python", + "sizeLines": 55, + "fileCategory": "code" + }, + { + "path": "code/figures/fig3_progression.py", + "language": "python", + "sizeLines": 59, + "fileCategory": "code" + }, + { + "path": "code/figures/fig4_highorder_ablation.py", + "language": "python", + "sizeLines": 48, + "fileCategory": "code" + }, + { + "path": "code/figures/fig5_pr_roc.py", + "language": "python", + "sizeLines": 61, + "fileCategory": "code" + }, + { + "path": "code/figures/fig6_feature_contribution.py", + "language": "python", + "sizeLines": 48, + "fileCategory": "code" + }, + { + "path": "code/figures/fig7_error_analysis.py", + "language": "python", + "sizeLines": 71, + "fileCategory": "code" + }, + { + "path": "code/figures/fig8_lgcn_ensemble_correlation.py", + "language": "python", + "sizeLines": 34, + "fileCategory": "code" + }, + { + "path": "code/figures/fig9_lgcn_hyperparam.py", + "language": "python", + "sizeLines": 50, + "fileCategory": "code" + }, + { + "path": "code/figures/gen_val_labels.py", + "language": "python", + "sizeLines": 65, + "fileCategory": "code" + }, + { + "path": "code/figures/plot_style.py", + "language": "python", + "sizeLines": 53, + "fileCategory": "code" + }, + { + "path": "code/generate_conservative_rw_blends.py", + "language": "python", + "sizeLines": 71, + "fileCategory": "code" + }, + { + "path": "code/generate_content_rich_submission.py", + "language": "python", + "sizeLines": 127, + "fileCategory": "code" + }, + { + "path": "code/generate_dot_submission.py", + "language": "python", + "sizeLines": 187, + "fileCategory": "code" + }, + { + "path": "code/generate_ens6_submission.py", + "language": "python", + "sizeLines": 263, + "fileCategory": "code" + }, + { + "path": "code/generate_extra_bprmf_submission.py", + "language": "python", + "sizeLines": 174, + "fileCategory": "code" + }, + { + "path": "code/generate_large_ensemble_submission.py", + "language": "python", + "sizeLines": 342, + "fileCategory": "code" + }, + { + "path": "code/generate_node2vec_deepwalk_submission.py", + "language": "python", + "sizeLines": 146, + "fileCategory": "code" + }, + { + "path": "code/generate_post95_submission.py", + "language": "python", + "sizeLines": 331, + "fileCategory": "code" + }, + { + "path": "code/generate_randomwalk_ensemble_submission.py", + "language": "python", + "sizeLines": 159, + "fileCategory": "code" + }, + { + "path": "code/generate_randomwalk_single_submission.py", + "language": "python", + "sizeLines": 147, + "fileCategory": "code" + }, + { + "path": "code/high_order_graph_stack.py", + "language": "python", + "sizeLines": 351, + "fileCategory": "code" + }, + { + "path": "code/high_order_model_compare.py", + "language": "python", + "sizeLines": 166, + "fileCategory": "code" + }, + { + "path": "code/make_notebook_style_split.py", + "language": "python", + "sizeLines": 86, + "fileCategory": "code" + }, + { + "path": "code/node2vec_deepwalk_ablation.py", + "language": "python", + "sizeLines": 257, + "fileCategory": "code" + }, + { + "path": "code/post95_ablation.py", + "language": "python", + "sizeLines": 321, + "fileCategory": "code" + }, + { + "path": "code/randomwalk_ensemble_ablation.py", + "language": "python", + "sizeLines": 61, + "fileCategory": "code" + }, + { + "path": "code/randomwalk_one_ablation.py", + "language": "python", + "sizeLines": 70, + "fileCategory": "code" + }, + { + "path": "code/randomwalk_systematic_ablation.py", + "language": "python", + "sizeLines": 446, + "fileCategory": "code" + }, + { + "path": "code/rich_randomwalk_stack.py", + "language": "python", + "sizeLines": 189, + "fileCategory": "code" + }, + { + "path": "code/run_baseline.py", + "language": "python", + "sizeLines": 352, + "fileCategory": "code" + }, + { + "path": "code/run_final.py", + "language": "python", + "sizeLines": 494, + "fileCategory": "code" + }, + { + "path": "code/run_graph_features.py", + "language": "python", + "sizeLines": 315, + "fileCategory": "code" + }, + { + "path": "code/run_improved.py", + "language": "python", + "sizeLines": 596, + "fileCategory": "code" + }, + { + "path": "code/run_lgcn_final.py", + "language": "python", + "sizeLines": 308, + "fileCategory": "code" + }, + { + "path": "code/run_lgcn_v2.py", + "language": "python", + "sizeLines": 311, + "fileCategory": "code" + }, + { + "path": "code/run_ultimate.py", + "language": "python", + "sizeLines": 450, + "fileCategory": "code" + }, + { + "path": "code/run_v2.py", + "language": "python", + "sizeLines": 520, + "fileCategory": "code" + }, + { + "path": "code/score_level_meta_stack.py", + "language": "python", + "sizeLines": 236, + "fileCategory": "code" + }, + { + "path": "code/search_dynamic_fusion.py", + "language": "python", + "sizeLines": 140, + "fileCategory": "code" + }, + { + "path": "code/search_val_fusion.py", + "language": "python", + "sizeLines": 127, + "fileCategory": "code" + }, + { + "path": "code/stack_rank_calibration.py", + "language": "python", + "sizeLines": 294, + "fileCategory": "code" + }, + { + "path": "code/train_dynamic_feature_fusion.py", + "language": "python", + "sizeLines": 282, + "fileCategory": "code" + }, + { + "path": "code/train_val_hgt_bpr.py", + "language": "python", + "sizeLines": 188, + "fileCategory": "code" + }, + { + "path": "code/train_val_lgcn_ensemble.py", + "language": "python", + "sizeLines": 506, + "fileCategory": "code" + }, + { + "path": "code/train_val_mf_bpr.py", + "language": "python", + "sizeLines": 110, + "fileCategory": "code" + }, + { + "path": "code/train_val_sage_bpr.py", + "language": "python", + "sizeLines": 188, + "fileCategory": "code" + }, + { + "path": "data_and_docs/advice.md", + "language": "markdown", + "sizeLines": 468, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/dataset.md", + "language": "markdown", + "sizeLines": 26, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/project_description.md", + "language": "markdown", + "sizeLines": 21, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/project_evaluation.md", + "language": "markdown", + "sizeLines": 14, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/project-example-2026-pygver.ipynb", + "language": "ipynb", + "sizeLines": 0, + "fileCategory": "code" + }, + { + "path": "data_and_docs/proposal.md", + "language": "markdown", + "sizeLines": 49, + "fileCategory": "docs" + }, + { + "path": "data_and_docs/references.md", + "language": "markdown", + "sizeLines": 11, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/_fact_sheet.md", + "language": "markdown", + "sizeLines": 287, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/00_README.md", + "language": "markdown", + "sizeLines": 152, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/01_problem_and_dataset.md", + "language": "markdown", + "sizeLines": 168, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/02_architecture_overview.md", + "language": "markdown", + "sizeLines": 236, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/03_data_flow_and_artifacts.md", + "language": "markdown", + "sizeLines": 302, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/04_lightgcn_from_first_principles.md", + "language": "markdown", + "sizeLines": 335, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/05_feature_stacking_and_lightgbm.md", + "language": "markdown", + "sizeLines": 242, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/06_random_walk_features.md", + "language": "markdown", + "sizeLines": 254, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/07_high_order_citation_propagation.md", + "language": "markdown", + "sizeLines": 357, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/08_calibration_and_rank_cutoff.md", + "language": "markdown", + "sizeLines": 293, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/09_experiment_timeline.md", + "language": "markdown", + "sizeLines": 141, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/10_code_map_and_entrypoints.md", + "language": "markdown", + "sizeLines": 185, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/11_figures_and_paper_mapping.md", + "language": "markdown", + "sizeLines": 367, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/12_reproduction_guide.md", + "language": "markdown", + "sizeLines": 324, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/13_common_questions_for_the_author.md", + "language": "markdown", + "sizeLines": 212, + "fileCategory": "docs" + }, + { + "path": "docs_first_principles/SUMMARY_FOR_PAPER.md", + "language": "markdown", + "sizeLines": 310, + "fileCategory": "docs" + }, + { + "path": "env/conda-list-cs3319.txt", + "language": "txt", + "sizeLines": 100, + "fileCategory": "docs" + }, + { + "path": "env/environment-cs3319.yml", + "language": "yaml", + "sizeLines": 106, + "fileCategory": "config" + }, + { + "path": "env/requirements-minimal.txt", + "language": "txt", + "sizeLines": 10, + "fileCategory": "docs" + }, + { + "path": "figures_paper/README_figures.md", + "language": "markdown", + "sizeLines": 115, + "fileCategory": "docs" + }, + { + "path": "figures_paper/scripts/fig1_graph_overview.py", + "language": "python", + "sizeLines": 96, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig2_sparsity.py", + "language": "python", + "sizeLines": 91, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig3_roadmap.py", + "language": "python", + "sizeLines": 90, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig4_architecture.py", + "language": "python", + "sizeLines": 87, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig5_ablation_highorder.py", + "language": "python", + "sizeLines": 96, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig6_rank_vs_threshold.py", + "language": "python", + "sizeLines": 88, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/fig7_error_heatmap.py", + "language": "python", + "sizeLines": 92, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA1_hyperparam.py", + "language": "python", + "sizeLines": 51, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA2_rw_ablation.py", + "language": "python", + "sizeLines": 44, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA3_feature_importance.py", + "language": "python", + "sizeLines": 50, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/figA4_oof_pr.py", + "language": "python", + "sizeLines": 61, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/make_all_figures.py", + "language": "python", + "sizeLines": 119, + "fileCategory": "code" + }, + { + "path": "figures_paper/scripts/style.py", + "language": "python", + "sizeLines": 67, + "fileCategory": "code" + }, + { + "path": "notes/experiment_history.md", + "language": "markdown", + "sizeLines": 319, + "fileCategory": "docs" + }, + { + "path": "README.md", + "language": "markdown", + "sizeLines": 253, + "fileCategory": "docs" + }, + { + "path": "reports/exploration_summary.md", + "language": "markdown", + "sizeLines": 861, + "fileCategory": "docs" + }, + { + "path": "reports/final_report.md", + "language": "markdown", + "sizeLines": 202, + "fileCategory": "docs" + }, + { + "path": "reports/paper_writing_guide.md", + "language": "markdown", + "sizeLines": 321, + "fileCategory": "docs" + }, + { + "path": "reports/preliminary_report.md", + "language": "markdown", + "sizeLines": 175, + "fileCategory": "docs" + }, + { + "path": "WORKSPACE_STATUS.md", + "language": "markdown", + "sizeLines": 262, + "fileCategory": "docs" + } + ], + "importMap": { + "CLAUDE_zh.md": [], + "CLAUDE.md": [], + "code/compare_gnn.py": [], + "code/content_rich_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/error_group_calibration.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/evaluate_val_checkpoints.py": [], + "code/extra_score_sources_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py" + ], + "code/figures/fig1_dataset_overview.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig10_rw_ensemble_size.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig2_framework.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig3_progression.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig4_highorder_ablation.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig5_pr_roc.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig6_feature_contribution.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig7_error_analysis.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig8_lgcn_ensemble_correlation.py": [ + "code/figures/plot_style.py" + ], + "code/figures/fig9_lgcn_hyperparam.py": [ + "code/figures/plot_style.py" + ], + "code/figures/gen_val_labels.py": [], + "code/figures/plot_style.py": [], + "code/generate_conservative_rw_blends.py": [], + "code/generate_content_rich_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/content_rich_ablation.py" + ], + "code/generate_dot_submission.py": [], + "code/generate_ens6_submission.py": [], + "code/generate_extra_bprmf_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/generate_large_ensemble_submission.py": [], + "code/generate_node2vec_deepwalk_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/node2vec_deepwalk_ablation.py" + ], + "code/generate_post95_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py" + ], + "code/generate_randomwalk_ensemble_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/randomwalk_systematic_ablation.py" + ], + "code/generate_randomwalk_single_submission.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py", + "code/randomwalk_systematic_ablation.py" + ], + "code/high_order_graph_stack.py": [], + "code/high_order_model_compare.py": [], + "code/make_notebook_style_split.py": [], + "code/node2vec_deepwalk_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/post95_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py" + ], + "code/randomwalk_ensemble_ablation.py": [ + "code/generate_randomwalk_ensemble_submission.py", + "code/randomwalk_systematic_ablation.py" + ], + "code/randomwalk_one_ablation.py": [ + "code/randomwalk_systematic_ablation.py" + ], + "code/randomwalk_systematic_ablation.py": [ + "code/stack_rank_calibration.py", + "code/train_val_lgcn_ensemble.py", + "code/post95_ablation.py", + "code/generate_post95_submission.py", + "code/extra_score_sources_ablation.py" + ], + "code/rich_randomwalk_stack.py": [], + "code/run_baseline.py": [], + "code/run_final.py": [], + "code/run_graph_features.py": [], + "code/run_improved.py": [], + "code/run_lgcn_final.py": [], + "code/run_lgcn_v2.py": [], + "code/run_ultimate.py": [], + "code/run_v2.py": [], + "code/score_level_meta_stack.py": [], + "code/search_dynamic_fusion.py": [], + "code/search_val_fusion.py": [], + "code/stack_rank_calibration.py": [], + "code/train_dynamic_feature_fusion.py": [], + "code/train_val_hgt_bpr.py": [], + "code/train_val_lgcn_ensemble.py": [], + "code/train_val_mf_bpr.py": [], + "code/train_val_sage_bpr.py": [], + "data_and_docs/advice.md": [], + "data_and_docs/dataset.md": [], + "data_and_docs/project_description.md": [], + "data_and_docs/project_evaluation.md": [], + "data_and_docs/project-example-2026-pygver.ipynb": [], + "data_and_docs/proposal.md": [], + "data_and_docs/references.md": [], + "docs_first_principles/_fact_sheet.md": [], + "docs_first_principles/00_README.md": [], + "docs_first_principles/01_problem_and_dataset.md": [], + "docs_first_principles/02_architecture_overview.md": [], + "docs_first_principles/03_data_flow_and_artifacts.md": [], + "docs_first_principles/04_lightgcn_from_first_principles.md": [], + "docs_first_principles/05_feature_stacking_and_lightgbm.md": [], + "docs_first_principles/06_random_walk_features.md": [], + "docs_first_principles/07_high_order_citation_propagation.md": [], + "docs_first_principles/08_calibration_and_rank_cutoff.md": [], + "docs_first_principles/09_experiment_timeline.md": [], + "docs_first_principles/10_code_map_and_entrypoints.md": [], + "docs_first_principles/11_figures_and_paper_mapping.md": [], + "docs_first_principles/12_reproduction_guide.md": [], + "docs_first_principles/13_common_questions_for_the_author.md": [], + "docs_first_principles/SUMMARY_FOR_PAPER.md": [], + "env/conda-list-cs3319.txt": [], + "env/environment-cs3319.yml": [], + "env/requirements-minimal.txt": [], + "figures_paper/README_figures.md": [], + "figures_paper/scripts/fig1_graph_overview.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig2_sparsity.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig3_roadmap.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig4_architecture.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig5_ablation_highorder.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig6_rank_vs_threshold.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/fig7_error_heatmap.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA1_hyperparam.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA2_rw_ablation.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA3_feature_importance.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/figA4_oof_pr.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/make_all_figures.py": [ + "figures_paper/scripts/style.py" + ], + "figures_paper/scripts/style.py": [], + "notes/experiment_history.md": [], + "README.md": [], + "reports/exploration_summary.md": [], + "reports/final_report.md": [], + "reports/paper_writing_guide.md": [], + "reports/preliminary_report.md": [], + "WORKSPACE_STATUS.md": [] + }, + "totalFiles": 102, + "filteredByIgnore": 276, + "estimatedComplexity": "moderate", + "stats": { + "filesScanned": 102, + "byCategory": { + "docs": 34, + "code": 67, + "config": 1 + }, + "byLanguage": { + "markdown": 32, + "python": 66, + "ipynb": 1, + "txt": 2, + "yaml": 1 + } + }, + "importMapStats": { + "filesScanned": 102, + "filesWithImports": 36, + "totalEdges": 83 + } +} \ No newline at end of file diff --git a/.understand-anything/knowledge-graph.json b/.understand-anything/knowledge-graph.json new file mode 100644 index 0000000000000000000000000000000000000000..e8a73c5c20b1dd55d527773dd6ea2898dd9b84de --- /dev/null +++ b/.understand-anything/knowledge-graph.json @@ -0,0 +1,13883 @@ +{ + "version": "2.8.0", + "project": { + "name": "CS3319 Project 2 Final Deliverable", + "languages": [ + "python", + "markdown" + ], + "frameworks": [ + "numpy", + "pandas", + "scipy", + "scikit-learn", + "lightgbm", + "torch", + "torch-geometric", + "gensim", + "networkx", + "node2vec", + "matplotlib", + "seaborn" + ], + "description": "Author–paper link-prediction (reading recommendation) on a heterogeneous academic graph (6611 authors, 79937 papers). Two-stage stacking: Stage-1 score producers (LightGCN ensemble, BPR-MF, 7 DeepWalk/Node2Vec blocks, content profiles, explicit graph/meta-path, directed high-order citation propagation) feed a 259-dim LightGBM Stage-2 meta-learner with rank-cutoff top-50% decision. Final public F1 0.96626.", + "analyzedAt": "2026-06-18T00:00:00Z", + "gitCommitHash": "non-git-local" + }, + "nodes": [ + { + "id": "file:CLAUDE_zh.md", + "type": "document", + "name": "CLAUDE_zh.md", + "filePath": "CLAUDE_zh.md", + "lineRange": [ + 1, + 206 + ], + "summary": "CLAUDE.md 的中文版工作指引。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:CLAUDE.md", + "type": "document", + "name": "CLAUDE.md", + "filePath": "CLAUDE.md", + "lineRange": [ + 1, + 218 + ], + "summary": "Claude Code 工作指引:架构总览、CLI 约定、验证框架 dynamic_seed202、提交决策规则、关键约定与坑。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:code/compare_gnn.py", + "type": "file", + "name": "compare_gnn.py", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 1, + 414 + ], + "summary": "【legacy】多 GNN(LightGCN/GAT/SAGE/MeanAgg)对比实验,硬编码 /home/lzc 路径、无 argparse。仅供溯源。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/compare_gnn.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 16, + 19 + ], + "summary": "set_seed():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 24, + 28 + ], + "summary": "read_txt():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 58, + 59 + ], + "summary": "log_norm():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 99, + 111 + ], + "summary": "build_data():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::sample_hard_neg", + "type": "function", + "name": "sample_hard_neg", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 114, + 134 + ], + "summary": "sample_hard_neg():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 137, + 138 + ], + "summary": "cos_sim():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::evaluate", + "type": "function", + "name": "evaluate", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 142, + 152 + ], + "summary": "evaluate():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::make_vanilla_lgcn", + "type": "function", + "name": "make_vanilla_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 205, + 230 + ], + "summary": "make_vanilla_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_learnw_lgcn", + "type": "function", + "name": "make_learnw_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 233, + 259 + ], + "summary": "make_learnw_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_gat_lgcn", + "type": "function", + "name": "make_gat_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 262, + 287 + ], + "summary": "make_gat_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_sage_lgcn", + "type": "function", + "name": "make_sage_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 290, + 315 + ], + "summary": "make_sage_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_deep_lgcn", + "type": "function", + "name": "make_deep_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 318, + 343 + ], + "summary": "make_deep_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/compare_gnn.py::make_wide_lgcn", + "type": "function", + "name": "make_wide_lgcn", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 346, + 348 + ], + "summary": "make_wide_lgcn():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/compare_gnn.py::run_trial", + "type": "function", + "name": "run_trial", + "filePath": "code/compare_gnn.py", + "lineRange": [ + 354, + 387 + ], + "summary": "run_trial():定义于 compare_gnn.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/compare_gnn.py::MeanAggLayer", + "type": "class", + "name": "MeanAggLayer", + "filePath": "code/compare_gnn.py", + "summary": "MeanAggLayer(类):定义于 compare_gnn.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/compare_gnn.py::GATAggLayer", + "type": "class", + "name": "GATAggLayer", + "filePath": "code/compare_gnn.py", + "summary": "GATAggLayer(类):定义于 compare_gnn.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/compare_gnn.py::SAGEAggLayer", + "type": "class", + "name": "SAGEAggLayer", + "filePath": "code/compare_gnn.py", + "summary": "SAGEAggLayer(类):定义于 compare_gnn.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/content_rich_ablation.py", + "type": "file", + "name": "content_rich_ablation.py", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 1, + 208 + ], + "summary": "从 512-d USE 论文嵌入(feature.pkl)直接抽 18 维作者/候选内容画像(content_rich_features)。命中 feature_cache 缓存。验证 F1 ≈0.95990。", + "tags": [ + "ablation", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/content_rich_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_module():定义于 content_rich_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/content_rich_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 25, + 30 + ], + "summary": "best_f1():定义于 content_rich_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/content_rich_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 33, + 51 + ], + "summary": "fit_lgb_oof():定义于 content_rich_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/content_rich_ablation.py::content_rich_features", + "type": "function", + "name": "content_rich_features", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 54, + 129 + ], + "summary": "从 feature.pkl 的 512-d USE 嵌入直接抽 18 维作者/候选内容画像(命中 feature_cache)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/content_rich_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/content_rich_ablation.py", + "lineRange": [ + 132, + 204 + ], + "summary": "main():定义于 content_rich_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/error_group_calibration.py", + "type": "file", + "name": "error_group_calibration.py", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 1, + 800 + ], + "summary": "误差分桶分析:按作者度/论文度分桶算 F1(冷启动低度节点性能下降)、校准曲线、ratio-F1。论证 rank-cutoff 决策。", + "tags": [ + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/error_group_calibration.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 44, + 49 + ], + "summary": "load_module():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 52, + 53 + ], + "summary": "read_txt():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::prf", + "type": "function", + "name": "prf", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 56, + 65 + ], + "summary": "prf():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 68, + 73 + ], + "summary": "best_f1():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::score_at_threshold", + "type": "function", + "name": "score_at_threshold", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 76, + 88 + ], + "summary": "score_at_threshold():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 91, + 95 + ], + "summary": "rank01():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 98, + 99 + ], + "summary": "zscore():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::author_rank01", + "type": "function", + "name": "author_rank01", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 102, + 110 + ], + "summary": "author_rank01():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::author_rank_position", + "type": "function", + "name": "author_rank_position", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 113, + 122 + ], + "summary": "author_rank_position():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::score_features", + "type": "function", + "name": "score_features", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 125, + 129 + ], + "summary": "score_features():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 132, + 164 + ], + "summary": "fit_lgb_oof():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::fit_full_lgb", + "type": "function", + "name": "fit_full_lgb", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 167, + 184 + ], + "summary": "fit_full_lgb():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::average_predict", + "type": "function", + "name": "average_predict", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 187, + 192 + ], + "summary": "average_predict():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::bucket_cut", + "type": "function", + "name": "bucket_cut", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 195, + 201 + ], + "summary": "bucket_cut():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::bucket_quantile", + "type": "function", + "name": "bucket_quantile", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 204, + 205 + ], + "summary": "bucket_quantile():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::load_submission_pred", + "type": "function", + "name": "load_submission_pred", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 208, + 209 + ], + "summary": "load_submission_pred():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::write_submission", + "type": "function", + "name": "write_submission", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 212, + 222 + ], + "summary": "write_submission():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::write_group_submission", + "type": "function", + "name": "write_group_submission", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 225, + 238 + ], + "summary": "write_group_submission():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::group_threshold", + "type": "function", + "name": "group_threshold", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 241, + 258 + ], + "summary": "group_threshold():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::summarize_pred", + "type": "function", + "name": "summarize_pred", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 261, + 274 + ], + "summary": "summarize_pred():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::build_feature_names", + "type": "function", + "name": "build_feature_names", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 277, + 298 + ], + "summary": "build_feature_names():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/error_group_calibration.py::build_val_test_context", + "type": "function", + "name": "build_val_test_context", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 301, + 413 + ], + "summary": "build_val_test_context():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::error_analysis", + "type": "function", + "name": "error_analysis", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 416, + 453 + ], + "summary": "error_analysis():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::add_agreement_features", + "type": "function", + "name": "add_agreement_features", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 456, + 517 + ], + "summary": "add_agreement_features():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::boundary_features", + "type": "function", + "name": "boundary_features", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 520, + 583 + ], + "summary": "boundary_features():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/error_group_calibration.py::main", + "type": "function", + "name": "main", + "filePath": "code/error_group_calibration.py", + "lineRange": [ + 586, + 796 + ], + "summary": "main():定义于 error_group_calibration.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/evaluate_val_checkpoints.py", + "type": "file", + "name": "evaluate_val_checkpoints.py", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 1, + 147 + ], + "summary": "评估验证集上多个 checkpoint 的分数,选最佳。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::load_train_module", + "type": "function", + "name": "load_train_module", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 16, + 21 + ], + "summary": "load_train_module():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 24, + 29 + ], + "summary": "best_f1():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::infer_layers", + "type": "function", + "name": "infer_layers", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 32, + 42 + ], + "summary": "infer_layers():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::score_model", + "type": "function", + "name": "score_model", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 46, + 65 + ], + "summary": "score_model():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/evaluate_val_checkpoints.py::main", + "type": "function", + "name": "main", + "filePath": "code/evaluate_val_checkpoints.py", + "lineRange": [ + 68, + 143 + ], + "summary": "main():定义于 evaluate_val_checkpoints.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/extra_score_sources_ablation.py", + "type": "file", + "name": "extra_score_sources_ablation.py", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 1, + 286 + ], + "summary": "额外分数源:content_mean_score(作者历史论文 embedding 均值 · 候选向量,content_mean 4 维)、score_to_features(BPR-MF 分数 4 维)、BPR-MF(dim=256)。验证 F1 0.95763(content mean)→0.95931(BPR-MF)。", + "tags": [ + "ablation", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/extra_score_sources_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 20, + 25 + ], + "summary": "load_module():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 28, + 33 + ], + "summary": "best_f1():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 36, + 40 + ], + "summary": "rank01():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 43, + 44 + ], + "summary": "zscore():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::score_to_features", + "type": "function", + "name": "score_to_features", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 47, + 56 + ], + "summary": "把单分数转 zscore/rank 等 4 维特征(BPR/content_mean 复用)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 59, + 77 + ], + "summary": "fit_lgb_oof():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::content_mean_score", + "type": "function", + "name": "content_mean_score", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 80, + 97 + ], + "summary": "作者历史论文 embedding 均值 · 候选论文向量,作第 4 个 CF 分数源。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "type": "function", + "name": "train_mf_bpr_score", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 116, + 163 + ], + "summary": "train_mf_bpr_score():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/extra_score_sources_ablation.py::train_ranker_oof", + "type": "function", + "name": "train_ranker_oof", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 166, + 196 + ], + "summary": "train_ranker_oof():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/extra_score_sources_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/extra_score_sources_ablation.py", + "lineRange": [ + 199, + 282 + ], + "summary": "main():定义于 extra_score_sources_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/extra_score_sources_ablation.py::MF", + "type": "class", + "name": "MF", + "filePath": "code/extra_score_sources_ablation.py", + "summary": "MF(类):定义于 extra_score_sources_ablation.py;方法 __init__, score。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/figures/fig1_dataset_overview.py", + "type": "file", + "name": "fig1_dataset_overview.py", + "filePath": "code/figures/fig1_dataset_overview.py", + "lineRange": [ + 1, + 62 + ], + "summary": "图1 数据集概览:异构图统计 + 度分布 log-log + 幂律拟合。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig1_dataset_overview.py::plot_ccdf", + "type": "function", + "name": "plot_ccdf", + "filePath": "code/figures/fig1_dataset_overview.py", + "lineRange": [ + 30, + 47 + ], + "summary": "plot_ccdf():定义于 fig1_dataset_overview.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig10_rw_ensemble_size.py", + "type": "file", + "name": "fig10_rw_ensemble_size.py", + "filePath": "code/figures/fig10_rw_ensemble_size.py", + "lineRange": [ + 1, + 39 + ], + "summary": "图10(附录)RW 集成规模 vs F1。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig2_framework.py", + "type": "file", + "name": "fig2_framework.py", + "filePath": "code/figures/fig2_framework.py", + "lineRange": [ + 1, + 55 + ], + "summary": "图2 两阶段堆叠框架示意图(Stage1 分数源→特征工程→Stage2 LightGBM→rank-cutoff)。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig2_framework.py::box", + "type": "function", + "name": "box", + "filePath": "code/figures/fig2_framework.py", + "lineRange": [ + 21, + 25 + ], + "summary": "box():定义于 fig2_framework.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig2_framework.py::arrow", + "type": "function", + "name": "arrow", + "filePath": "code/figures/fig2_framework.py", + "lineRange": [ + 28, + 29 + ], + "summary": "arrow():定义于 fig2_framework.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig3_progression.py", + "type": "file", + "name": "fig3_progression.py", + "filePath": "code/figures/fig3_progression.py", + "lineRange": [ + 1, + 59 + ], + "summary": "图3【主角】方法演进三级跳:验证 F1(实线)+ 公开 LB(稀疏点线),标注三段突破。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig4_highorder_ablation.py", + "type": "file", + "name": "fig4_highorder_ablation.py", + "filePath": "code/figures/fig4_highorder_ablation.py", + "lineRange": [ + 1, + 48 + ], + "summary": "图4 高阶传播消融:108/190/214/259 维四阶段 F1+AUC 柱状图。", + "tags": [ + "ablation", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig5_pr_roc.py", + "type": "file", + "name": "fig5_pr_roc.py", + "filePath": "code/figures/fig5_pr_roc.py", + "lineRange": [ + 1, + 61 + ], + "summary": "图5 多模型 PR/ROC 曲线(需 gen_val_labels 的 y)。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig6_feature_contribution.py", + "type": "file", + "name": "fig6_feature_contribution.py", + "filePath": "code/figures/fig6_feature_contribution.py", + "lineRange": [ + 1, + 48 + ], + "summary": "图6 特征贡献:按组聚合 importance + top-20 单特征。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig7_error_analysis.py", + "type": "file", + "name": "fig7_error_analysis.py", + "filePath": "code/figures/fig7_error_analysis.py", + "lineRange": [ + 1, + 71 + ], + "summary": "图7 误差分析与决策稳健性:度分桶 F1 + 校准曲线 + ratio-F1 + 阈值漂移。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig7_error_analysis.py::plot_buckets", + "type": "function", + "name": "plot_buckets", + "filePath": "code/figures/fig7_error_analysis.py", + "lineRange": [ + 31, + 41 + ], + "summary": "plot_buckets():定义于 fig7_error_analysis.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig8_lgcn_ensemble_correlation.py", + "type": "file", + "name": "fig8_lgcn_ensemble_correlation.py", + "filePath": "code/figures/fig8_lgcn_ensemble_correlation.py", + "lineRange": [ + 1, + 34 + ], + "summary": "图8(附录)LightGCN 模型分数相关性热图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/fig9_lgcn_hyperparam.py", + "type": "file", + "name": "fig9_lgcn_hyperparam.py", + "filePath": "code/figures/fig9_lgcn_hyperparam.py", + "lineRange": [ + 1, + 50 + ], + "summary": "图9(附录)LightGCN 超参(dim×layers)热图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/fig9_lgcn_hyperparam.py::parse", + "type": "function", + "name": "parse", + "filePath": "code/figures/fig9_lgcn_hyperparam.py", + "lineRange": [ + 26, + 28 + ], + "summary": "parse():定义于 fig9_lgcn_hyperparam.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/figures/gen_val_labels.py", + "type": "file", + "name": "gen_val_labels.py", + "filePath": "code/figures/gen_val_labels.py", + "lineRange": [ + 1, + 65 + ], + "summary": "补齐脚本:用 train_val_lgcn_ensemble.make_notebook_style_split(seed=202) 生成验证集标签 y(136484),并断言复算 best F1≈0.966874 证明行序对齐。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/gen_val_labels.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/figures/gen_val_labels.py", + "lineRange": [ + 23, + 29 + ], + "summary": "load_module():定义于 gen_val_labels.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/gen_val_labels.py::main", + "type": "function", + "name": "main", + "filePath": "code/figures/gen_val_labels.py", + "lineRange": [ + 32, + 61 + ], + "summary": "main():定义于 gen_val_labels.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/figures/plot_style.py", + "type": "file", + "name": "plot_style.py", + "filePath": "code/figures/plot_style.py", + "lineRange": [ + 1, + 53 + ], + "summary": "论文图表共享 seaborn 样式(whitegrid + deep/muted 调色板, pdf.fonttype=42 嵌 TrueType)。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/figures/plot_style.py::apply", + "type": "function", + "name": "apply", + "filePath": "code/figures/plot_style.py", + "lineRange": [ + 18, + 44 + ], + "summary": "apply():定义于 plot_style.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "func:code/figures/plot_style.py::save", + "type": "function", + "name": "save", + "filePath": "code/figures/plot_style.py", + "lineRange": [ + 47, + 53 + ], + "summary": "save():定义于 plot_style.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:code/generate_conservative_rw_blends.py", + "type": "file", + "name": "generate_conservative_rw_blends.py", + "filePath": "code/generate_conservative_rw_blends.py", + "lineRange": [ + 1, + 71 + ], + "summary": "保守 RW 混合权重实验。", + "tags": [ + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_conservative_rw_blends.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/generate_conservative_rw_blends.py", + "lineRange": [ + 15, + 19 + ], + "summary": "rank01():定义于 generate_conservative_rw_blends.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_conservative_rw_blends.py::write_ratio_submission", + "type": "function", + "name": "write_ratio_submission", + "filePath": "code/generate_conservative_rw_blends.py", + "lineRange": [ + 22, + 30 + ], + "summary": "write_ratio_submission():定义于 generate_conservative_rw_blends.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_conservative_rw_blends.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_conservative_rw_blends.py", + "lineRange": [ + 33, + 67 + ], + "summary": "main():定义于 generate_conservative_rw_blends.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_content_rich_submission.py", + "type": "file", + "name": "generate_content_rich_submission.py", + "filePath": "code/generate_content_rich_submission.py", + "lineRange": [ + 1, + 127 + ], + "summary": "基于 content_rich 特征生成提交 CSV 的脚本。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_content_rich_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_content_rich_submission.py", + "lineRange": [ + 14, + 19 + ], + "summary": "load_module():定义于 generate_content_rich_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_content_rich_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_content_rich_submission.py", + "lineRange": [ + 22, + 35 + ], + "summary": "make_subs():定义于 generate_content_rich_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_content_rich_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_content_rich_submission.py", + "lineRange": [ + 38, + 123 + ], + "summary": "main():定义于 generate_content_rich_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_dot_submission.py", + "type": "file", + "name": "generate_dot_submission.py", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 1, + 187 + ], + "summary": "点积解码变体提交生成。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_dot_submission.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 25, + 26 + ], + "summary": "read_txt():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 29, + 31 + ], + "summary": "log_norm():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::build", + "type": "function", + "name": "build", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 69, + 101 + ], + "summary": "build():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_dot_submission.py::predict_dot", + "type": "function", + "name": "predict_dot", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 105, + 113 + ], + "summary": "predict_dot():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 116, + 120 + ], + "summary": "rank01():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::write", + "type": "function", + "name": "write", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 123, + 134 + ], + "summary": "write():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_dot_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_dot_submission.py", + "lineRange": [ + 137, + 183 + ], + "summary": "main():定义于 generate_dot_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_dot_submission.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/generate_dot_submission.py", + "summary": "LightGCNLayer(类):定义于 generate_dot_submission.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_dot_submission.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/generate_dot_submission.py", + "summary": "LightGCN(类):定义于 generate_dot_submission.py;方法 __init__, encode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_ens6_submission.py", + "type": "file", + "name": "generate_ens6_submission.py", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 1, + 263 + ], + "summary": "从 checkpoint 重生成 6-model LightGCN 集成提交(sub_ens6_t0.36.csv,公开 0.93044)。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_ens6_submission.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 42, + 47 + ], + "summary": "read_txt():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 50, + 52 + ], + "summary": "log_norm():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 104, + 105 + ], + "summary": "cos_sim():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::build_features", + "type": "function", + "name": "build_features", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 108, + 150 + ], + "summary": "build_features():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_ens6_submission.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 153, + 176 + ], + "summary": "build_data():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::predict", + "type": "function", + "name": "predict", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 180, + 190 + ], + "summary": "predict():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_ens6_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_ens6_submission.py", + "lineRange": [ + 193, + 258 + ], + "summary": "main():定义于 generate_ens6_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_ens6_submission.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/generate_ens6_submission.py", + "summary": "LightGCNLayer(类):定义于 generate_ens6_submission.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_ens6_submission.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/generate_ens6_submission.py", + "summary": "LightGCN(类):定义于 generate_ens6_submission.py;方法 __init__, encode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_extra_bprmf_submission.py", + "type": "file", + "name": "generate_extra_bprmf_submission.py", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 1, + 174 + ], + "summary": "BPR-MF 额外分数提交生成。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_extra_bprmf_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 16, + 21 + ], + "summary": "load_module():定义于 generate_extra_bprmf_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_extra_bprmf_submission.py::train_mf_test_scores", + "type": "function", + "name": "train_mf_test_scores", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 24, + 65 + ], + "summary": "train_mf_test_scores():定义于 generate_extra_bprmf_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_extra_bprmf_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 68, + 81 + ], + "summary": "make_subs():定义于 generate_extra_bprmf_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_extra_bprmf_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_extra_bprmf_submission.py", + "lineRange": [ + 84, + 170 + ], + "summary": "main():定义于 generate_extra_bprmf_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_large_ensemble_submission.py", + "type": "file", + "name": "generate_large_ensemble_submission.py", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 1, + 342 + ], + "summary": "大集成(多 LightGCN 变体)提交生成。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 34, + 39 + ], + "summary": "read_txt():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 42, + 44 + ], + "summary": "log_norm():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 96, + 97 + ], + "summary": "cos_sim():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::build_features", + "type": "function", + "name": "build_features", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 100, + 136 + ], + "summary": "build_features():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 139, + 162 + ], + "summary": "build_data():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::predict", + "type": "function", + "name": "predict", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 166, + 176 + ], + "summary": "predict():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::checkpoint_weight", + "type": "function", + "name": "checkpoint_weight", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 179, + 194 + ], + "summary": "checkpoint_weight():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::percent_rank", + "type": "function", + "name": "percent_rank", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 197, + 201 + ], + "summary": "percent_rank():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::write_threshold_submissions", + "type": "function", + "name": "write_threshold_submissions", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 204, + 222 + ], + "summary": "write_threshold_submissions():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::write_top_ratio_submissions", + "type": "function", + "name": "write_top_ratio_submissions", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 225, + 246 + ], + "summary": "write_top_ratio_submissions():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_large_ensemble_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_large_ensemble_submission.py", + "lineRange": [ + 249, + 338 + ], + "summary": "main():定义于 generate_large_ensemble_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_large_ensemble_submission.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/generate_large_ensemble_submission.py", + "summary": "LightGCNLayer(类):定义于 generate_large_ensemble_submission.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/generate_large_ensemble_submission.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/generate_large_ensemble_submission.py", + "summary": "LightGCN(类):定义于 generate_large_ensemble_submission.py;方法 __init__, encode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_node2vec_deepwalk_submission.py", + "type": "file", + "name": "generate_node2vec_deepwalk_submission.py", + "filePath": "code/generate_node2vec_deepwalk_submission.py", + "lineRange": [ + 1, + 146 + ], + "summary": "Node2Vec/DeepWalk 分数提交生成。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_node2vec_deepwalk_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_node2vec_deepwalk_submission.py", + "lineRange": [ + 15, + 20 + ], + "summary": "load_module():定义于 generate_node2vec_deepwalk_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_node2vec_deepwalk_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_node2vec_deepwalk_submission.py", + "lineRange": [ + 23, + 37 + ], + "summary": "make_subs():定义于 generate_node2vec_deepwalk_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_node2vec_deepwalk_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_node2vec_deepwalk_submission.py", + "lineRange": [ + 40, + 142 + ], + "summary": "main():定义于 generate_node2vec_deepwalk_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_post95_submission.py", + "type": "file", + "name": "generate_post95_submission.py", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 1, + 331 + ], + "summary": "Post95 阶段:对 20 个 LightGCN 变体分数做 zscore+rank01 聚合(variant_feature_matrix 43 维),含 topk_content_similarity_fast(top-k 内容相似度 3 维)。选 top-N GNN 分数变体并生成 test 对应分数。验证 F1 0.95711。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/generate_post95_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_module():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 25, + 26 + ], + "summary": "read_txt():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::infer_layers", + "type": "function", + "name": "infer_layers", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 29, + 39 + ], + "summary": "infer_layers():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::infer_mode", + "type": "function", + "name": "infer_mode", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 42, + 48 + ], + "summary": "infer_mode():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::score_cache_path", + "type": "function", + "name": "score_cache_path", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 51, + 55 + ], + "summary": "score_cache_path():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::checkpoint_for_score", + "type": "function", + "name": "checkpoint_for_score", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 58, + 67 + ], + "summary": "checkpoint_for_score():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::ensemble_member_scores", + "type": "function", + "name": "ensemble_member_scores", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 70, + 76 + ], + "summary": "ensemble_member_scores():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "type": "function", + "name": "score_checkpoint_on_test", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 80, + 130 + ], + "summary": "score_checkpoint_on_test():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_post95_submission.py::score_val_path_on_test", + "type": "function", + "name": "score_val_path_on_test", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 133, + 157 + ], + "summary": "score_val_path_on_test():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::select_variant_val_scores", + "type": "function", + "name": "select_variant_val_scores", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 160, + 172 + ], + "summary": "select_variant_val_scores():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::variant_feature_matrix", + "type": "function", + "name": "variant_feature_matrix", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 175, + 183 + ], + "summary": "20 个 LightGCN 变体分数做 zscore+rank01 → 43 维。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::topk_content_similarity_fast", + "type": "function", + "name": "topk_content_similarity_fast", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 186, + 216 + ], + "summary": "top-k 内容相似度 3 维(快速版)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_post95_submission.py::make_submissions", + "type": "function", + "name": "make_submissions", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 219, + 229 + ], + "summary": "make_submissions():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_post95_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_post95_submission.py", + "lineRange": [ + 232, + 327 + ], + "summary": "main():定义于 generate_post95_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_randomwalk_ensemble_submission.py", + "type": "file", + "name": "generate_randomwalk_ensemble_submission.py", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 1, + 159 + ], + "summary": "aggregate():把 7 个 RW 块做一致性聚合(11 维);生成 RW 集成提交。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_randomwalk_ensemble_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 16, + 22 + ], + "summary": "load_module():定义于 generate_randomwalk_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_ensemble_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 25, + 47 + ], + "summary": "make_subs():定义于 generate_randomwalk_ensemble_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_ensemble_submission.py::aggregate", + "type": "function", + "name": "aggregate", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 50, + 69 + ], + "summary": "把 7 个 RW pair 特征块做一致性聚合,产 11 维 aggregate 块。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_ensemble_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_randomwalk_ensemble_submission.py", + "lineRange": [ + 72, + 155 + ], + "summary": "main():定义于 generate_randomwalk_ensemble_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/generate_randomwalk_single_submission.py", + "type": "file", + "name": "generate_randomwalk_single_submission.py", + "filePath": "code/generate_randomwalk_single_submission.py", + "lineRange": [ + 1, + 147 + ], + "summary": "单个 RW 配置的提交生成(对照用)。", + "tags": [ + "submission-generator", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/generate_randomwalk_single_submission.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/generate_randomwalk_single_submission.py", + "lineRange": [ + 16, + 22 + ], + "summary": "load_module():定义于 generate_randomwalk_single_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_single_submission.py::make_subs", + "type": "function", + "name": "make_subs", + "filePath": "code/generate_randomwalk_single_submission.py", + "lineRange": [ + 25, + 47 + ], + "summary": "make_subs():定义于 generate_randomwalk_single_submission.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/generate_randomwalk_single_submission.py::main", + "type": "function", + "name": "main", + "filePath": "code/generate_randomwalk_single_submission.py", + "lineRange": [ + 50, + 143 + ], + "summary": "main():定义于 generate_randomwalk_single_submission.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/high_order_graph_stack.py", + "type": "file", + "name": "high_order_graph_stack.py", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 1, + 351 + ], + "summary": "【最终方法入口】Stage-2 LightGBM meta-learner。core:build_high_order(H_k=R·C^k 作者历史论文 k 步引用扩散,无向 24 维)、build_high_order_directed(G_k=S·R·C^k 合著者历史论文扩散,fwd/bwd/undir 三向 45 维);拼出 259 维特征 X_best;fit_lgb_oof(5-fold)→fit_full_predict;write_ratio_submission rank-cutoff top 50% + test_known_mask 强制 1。验证 F1 0.966874 / 公开 0.96626。硬编码稀疏矩阵形状 6611×79937。", + "tags": [ + "final-method", + "lightgbm", + "high-order", + "entry-point", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/high_order_graph_stack.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 19, + 25 + ], + "summary": "load_module():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 28, + 29 + ], + "summary": "read_txt():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 32, + 36 + ], + "summary": "best_f1():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::row_norm", + "type": "function", + "name": "row_norm", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 39, + 44 + ], + "summary": "row_norm():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::topk_prune_rows", + "type": "function", + "name": "topk_prune_rows", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 47, + 67 + ], + "summary": "topk_prune_rows():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::extract_scores", + "type": "function", + "name": "extract_scores", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 70, + 71 + ], + "summary": "extract_scores():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::build_high_order", + "type": "function", + "name": "build_high_order", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 74, + 122 + ], + "summary": "无向高阶传播:H_k=R·C^k,作者历史论文经 k 步引用扩散到候选,产 24 维(读 *_names.txt)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/high_order_graph_stack.py::build_high_order_directed", + "type": "function", + "name": "build_high_order_directed", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 125, + 176 + ], + "summary": "有向高阶传播:G_k=S·R·C^k,合著者历史论文扩散,fwd/bwd/undir 三向,产 45 维。最终核心增益来源。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/high_order_graph_stack.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 179, + 198 + ], + "summary": "5-fold StratifiedKFold OOF LightGBM,返回 leak-free OOF 概率(存 *_oof.npy)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::fit_full_predict", + "type": "function", + "name": "fit_full_predict", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 201, + 216 + ], + "summary": "用最终超参(num_leaves=15, reg_lambda=8, n_estimators=1400, lr=0.022)在全验证集 fit 并预测 test,代表最终模型。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::write_ratio_submission", + "type": "function", + "name": "write_ratio_submission", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 219, + 229 + ], + "summary": "rank-cutoff 提交生成:按最终分数排序取 top ratio(0.5)为 1,并 force test_known_mask 中训练已知正边为 1。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_graph_stack.py::main", + "type": "function", + "name": "main", + "filePath": "code/high_order_graph_stack.py", + "lineRange": [ + 232, + 347 + ], + "summary": "main():定义于 high_order_graph_stack.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/high_order_model_compare.py", + "type": "file", + "name": "high_order_model_compare.py", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 1, + 166 + ], + "summary": "高阶传播变体对比实验:无向 vs 有向 vs 不同 k 值的 OOF F1/AUC 对照,支撑 high_order_graph_stack 的消融结论。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/high_order_model_compare.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 20, + 26 + ], + "summary": "load_module():定义于 high_order_model_compare.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_model_compare.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 29, + 33 + ], + "summary": "best_f1():定义于 high_order_model_compare.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/high_order_model_compare.py::fit_oof", + "type": "function", + "name": "fit_oof", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 36, + 95 + ], + "summary": "fit_oof():定义于 high_order_model_compare.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/high_order_model_compare.py::main", + "type": "function", + "name": "main", + "filePath": "code/high_order_model_compare.py", + "lineRange": [ + 98, + 162 + ], + "summary": "main():定义于 high_order_model_compare.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/make_notebook_style_split.py", + "type": "file", + "name": "make_notebook_style_split.py", + "filePath": "code/make_notebook_style_split.py", + "lineRange": [ + 1, + 86 + ], + "summary": "切分脚本的独立早期版本(只写 splits/),非堆叠链使用。真正被流水线调用的是 train_val_lgcn_ensemble.py 内的同名函数。遗留参考。", + "tags": [ + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/make_notebook_style_split.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/make_notebook_style_split.py", + "lineRange": [ + 20, + 25 + ], + "summary": "read_txt():定义于 make_notebook_style_split.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/make_notebook_style_split.py::main", + "type": "function", + "name": "main", + "filePath": "code/make_notebook_style_split.py", + "lineRange": [ + 28, + 82 + ], + "summary": "main():定义于 make_notebook_style_split.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/node2vec_deepwalk_ablation.py", + "type": "file", + "name": "node2vec_deepwalk_ablation.py", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 1, + 257 + ], + "summary": "随机游走早期单配置消融(初版 DeepWalk/Node2Vec),验证 F1 0.96212。被 randomwalk_systematic 取代。", + "tags": [ + "ablation", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 19, + 24 + ], + "summary": "load_module():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 27, + 28 + ], + "summary": "read_txt():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 31, + 36 + ], + "summary": "best_f1():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 39, + 43 + ], + "summary": "rank01():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 46, + 47 + ], + "summary": "zscore():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 50, + 68 + ], + "summary": "fit_lgb_oof():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "type": "function", + "name": "score_to_features", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 71, + 84 + ], + "summary": "score_to_features():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::build_graph", + "type": "function", + "name": "build_graph", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 87, + 98 + ], + "summary": "build_graph():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::deepwalk_walks", + "type": "function", + "name": "deepwalk_walks", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 101, + 119 + ], + "summary": "deepwalk_walks():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::train_deepwalk", + "type": "function", + "name": "train_deepwalk", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 122, + 138 + ], + "summary": "train_deepwalk():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::train_node2vec", + "type": "function", + "name": "train_node2vec", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 141, + 147 + ], + "summary": "train_node2vec():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::pair_scores", + "type": "function", + "name": "pair_scores", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 150, + 174 + ], + "summary": "pair_scores():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "type": "function", + "name": "build_current_best_features", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 177, + 204 + ], + "summary": "build_current_best_features():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/node2vec_deepwalk_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/node2vec_deepwalk_ablation.py", + "lineRange": [ + 207, + 253 + ], + "summary": "main():定义于 node2vec_deepwalk_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/post95_ablation.py", + "type": "file", + "name": "post95_ablation.py", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 1, + 321 + ], + "summary": "定义 negative_evidence_features(8 维负证据:候选论文被多少作者读过等),被多个 stacker load_module 加载。Post95 阶段的特征消融脚本。", + "tags": [ + "ablation", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/post95_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_module():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 25, + 30 + ], + "summary": "best_f1():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::prf", + "type": "function", + "name": "prf", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 33, + 40 + ], + "summary": "prf():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 43, + 47 + ], + "summary": "rank01():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 50, + 51 + ], + "summary": "zscore():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 54, + 72 + ], + "summary": "fit_lgb_oof():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::bucket_series", + "type": "function", + "name": "bucket_series", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 75, + 81 + ], + "summary": "bucket_series():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::error_analysis", + "type": "function", + "name": "error_analysis", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 84, + 128 + ], + "summary": "error_analysis():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/post95_ablation.py::group_threshold", + "type": "function", + "name": "group_threshold", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 131, + 142 + ], + "summary": "group_threshold():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::author_quota_tuning", + "type": "function", + "name": "author_quota_tuning", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 145, + 173 + ], + "summary": "author_quota_tuning():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/post95_ablation.py::negative_evidence_features", + "type": "function", + "name": "negative_evidence_features", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 176, + 192 + ], + "summary": "8 维负证据特征:候选论文被读过多少、共同未读等。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::topk_content_similarity", + "type": "function", + "name": "topk_content_similarity", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 195, + 217 + ], + "summary": "topk_content_similarity():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "type": "function", + "name": "load_lgcn_variant_scores", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 220, + 245 + ], + "summary": "load_lgcn_variant_scores():定义于 post95_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/post95_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/post95_ablation.py", + "lineRange": [ + 248, + 317 + ], + "summary": "main():定义于 post95_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/randomwalk_ensemble_ablation.py", + "type": "file", + "name": "randomwalk_ensemble_ablation.py", + "filePath": "code/randomwalk_ensemble_ablation.py", + "lineRange": [ + 1, + 61 + ], + "summary": "RW 集成规模消融(5 vs 7 块)的薄封装。", + "tags": [ + "ablation", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_ensemble_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/randomwalk_ensemble_ablation.py", + "lineRange": [ + 16, + 57 + ], + "summary": "main():定义于 randomwalk_ensemble_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/randomwalk_one_ablation.py", + "type": "file", + "name": "randomwalk_one_ablation.py", + "filePath": "code/randomwalk_one_ablation.py", + "lineRange": [ + 1, + 70 + ], + "summary": "单个 RW 块的 OOF 消融。", + "tags": [ + "ablation", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_one_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/randomwalk_one_ablation.py", + "lineRange": [ + 14, + 66 + ], + "summary": "main():定义于 randomwalk_one_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/randomwalk_systematic_ablation.py", + "type": "file", + "name": "randomwalk_systematic_ablation.py", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 1, + 446 + ], + "summary": "系统化随机游走:7 个 DeepWalk/Node2Vec 配置(d128/d256, l40/l80),每块 pair_feature_block 产 11 维;build_base_features 拼出 84 维 X_base。Word2Vec 模型缓存于 randomwalk_systematic/models/,pair 特征缓存于 pair_features/*.npz。验证 F1 0.96492。", + "tags": [ + "ablation", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 20, + 25 + ], + "summary": "load_module():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 28, + 29 + ], + "summary": "read_txt():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 32, + 37 + ], + "summary": "best_f1():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 40, + 44 + ], + "summary": "rank01():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 47, + 48 + ], + "summary": "zscore():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 51, + 70 + ], + "summary": "fit_lgb_oof():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::small_configs", + "type": "function", + "name": "small_configs", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 87, + 95 + ], + "summary": "small_configs():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::graph_configs", + "type": "function", + "name": "graph_configs", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 98, + 104 + ], + "summary": "graph_configs():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::extra_configs", + "type": "function", + "name": "extra_configs", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 107, + 115 + ], + "summary": "extra_configs():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::build_graph", + "type": "function", + "name": "build_graph", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 118, + 136 + ], + "summary": "build_graph():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::deepwalk_walks", + "type": "function", + "name": "deepwalk_walks", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 139, + 157 + ], + "summary": "deepwalk_walks():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::train_model", + "type": "function", + "name": "train_model", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 160, + 191 + ], + "summary": "train_model():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::embedding_arrays", + "type": "function", + "name": "embedding_arrays", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 194, + 213 + ], + "summary": "embedding_arrays():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "type": "function", + "name": "pair_feature_block", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 216, + 270 + ], + "summary": "对单个 Word2Vec 配置产 11 维 pair 特征(作者/候选嵌入拼接、cos、差、范数等)。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::build_base_features", + "type": "function", + "name": "build_base_features", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 273, + 300 + ], + "summary": "拼出 84 维 X_base(LightGCN rank4 + explicit18 + neg8 + topk3 + variant43 + content_mean4 + bpr4),命中各缓存。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::train_full_predict", + "type": "function", + "name": "train_full_predict", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 303, + 317 + ], + "summary": "train_full_predict():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/randomwalk_systematic_ablation.py::main", + "type": "function", + "name": "main", + "filePath": "code/randomwalk_systematic_ablation.py", + "lineRange": [ + 320, + 442 + ], + "summary": "main():定义于 randomwalk_systematic_ablation.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "class", + "name": "RWConfig", + "filePath": "code/randomwalk_systematic_ablation.py", + "summary": "RWConfig(类):定义于 randomwalk_systematic_ablation.py;方法 —。", + "tags": [ + "class" + ], + "complexity": "simple" + }, + { + "id": "file:code/rich_randomwalk_stack.py", + "type": "file", + "name": "rich_randomwalk_stack.py", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 1, + 189 + ], + "summary": "rich content + RW 联合 stacker,衔接 content_rich 与 randomwalk_systematic。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/rich_randomwalk_stack.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 18, + 24 + ], + "summary": "load_module():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 27, + 32 + ], + "summary": "best_f1():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::fit_lgb_oof", + "type": "function", + "name": "fit_lgb_oof", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 35, + 54 + ], + "summary": "fit_lgb_oof():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::fit_full_predict", + "type": "function", + "name": "fit_full_predict", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 57, + 72 + ], + "summary": "fit_full_predict():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::write_sub", + "type": "function", + "name": "write_sub", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 75, + 80 + ], + "summary": "write_sub():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/rich_randomwalk_stack.py::main", + "type": "function", + "name": "main", + "filePath": "code/rich_randomwalk_stack.py", + "lineRange": [ + 83, + 185 + ], + "summary": "main():定义于 rich_randomwalk_stack.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_baseline.py", + "type": "file", + "name": "run_baseline.py", + "filePath": "code/run_baseline.py", + "lineRange": [ + 1, + 352 + ], + "summary": "【legacy】官方 notebook 基线:HeteroMeanConv + hinge/cosine + 阈值搜索。≈0.8850。硬编码路径。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_baseline.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_baseline.py", + "lineRange": [ + 21, + 26 + ], + "summary": "set_seed():定义于 run_baseline.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_baseline.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_baseline.py", + "lineRange": [ + 41, + 46 + ], + "summary": "read_txt():定义于 run_baseline.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_baseline.py::sample_negative_edges", + "type": "function", + "name": "sample_negative_edges", + "filePath": "code/run_baseline.py", + "lineRange": [ + 249, + 260 + ], + "summary": "sample_negative_edges():定义于 run_baseline.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_baseline.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_baseline.py", + "lineRange": [ + 311, + 312 + ], + "summary": "cos_sim():定义于 run_baseline.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "class:code/run_baseline.py::HeteroMeanConv", + "type": "class", + "name": "HeteroMeanConv", + "filePath": "code/run_baseline.py", + "summary": "HeteroMeanConv(类):定义于 run_baseline.py;方法 __init__, _key, reset_parameters, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_baseline.py::HeteroRecommender", + "type": "class", + "name": "HeteroRecommender", + "filePath": "code/run_baseline.py", + "summary": "HeteroRecommender(类):定义于 run_baseline.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_final.py", + "type": "file", + "name": "run_final.py", + "filePath": "code/run_final.py", + "lineRange": [ + 1, + 494 + ], + "summary": "【legacy】final 阶段实验脚本。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_final.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_final.py", + "lineRange": [ + 30, + 35 + ], + "summary": "set_seed():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_final.py", + "lineRange": [ + 42, + 47 + ], + "summary": "read_txt():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_final.py", + "lineRange": [ + 91, + 93 + ], + "summary": "log_norm():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/run_final.py", + "lineRange": [ + 154, + 177 + ], + "summary": "build_data():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_final.py", + "lineRange": [ + 269, + 306 + ], + "summary": "sample_hard_negatives():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_final.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_final.py", + "lineRange": [ + 310, + 311 + ], + "summary": "cos_sim():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::evaluate", + "type": "function", + "name": "evaluate", + "filePath": "code/run_final.py", + "lineRange": [ + 315, + 331 + ], + "summary": "evaluate():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::predict_cos_batched", + "type": "function", + "name": "predict_cos_batched", + "filePath": "code/run_final.py", + "lineRange": [ + 335, + 348 + ], + "summary": "predict_cos_batched():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_final.py::train_model", + "type": "function", + "name": "train_model", + "filePath": "code/run_final.py", + "lineRange": [ + 352, + 427 + ], + "summary": "train_model():定义于 run_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_final.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/run_final.py", + "summary": "LightGCNLayer(类):定义于 run_final.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_final.py::LightGCNRecommender", + "type": "class", + "name": "LightGCNRecommender", + "filePath": "code/run_final.py", + "summary": "LightGCNRecommender(类):定义于 run_final.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_graph_features.py", + "type": "file", + "name": "run_graph_features.py", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 1, + 315 + ], + "summary": "【legacy】手工图特征实验早期版。", + "tags": [ + "legacy", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_graph_features.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 20, + 22 + ], + "summary": "set_seed():定义于 run_graph_features.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_graph_features.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 31, + 36 + ], + "summary": "read_txt():定义于 run_graph_features.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_graph_features.py::log1p_norm", + "type": "function", + "name": "log1p_norm", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 52, + 54 + ], + "summary": "log1p_norm():定义于 run_graph_features.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_graph_features.py::compute_features", + "type": "function", + "name": "compute_features", + "filePath": "code/run_graph_features.py", + "lineRange": [ + 115, + 178 + ], + "summary": "compute_features():定义于 run_graph_features.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_improved.py", + "type": "file", + "name": "run_improved.py", + "filePath": "code/run_improved.py", + "lineRange": [ + 1, + 596 + ], + "summary": "【legacy】基线改进:SAGEConv+残差/layernorm/MLP 解码器实验。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_improved.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_improved.py", + "lineRange": [ + 32, + 37 + ], + "summary": "set_seed():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_improved.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_improved.py", + "lineRange": [ + 44, + 49 + ], + "summary": "read_txt():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_improved.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_improved.py", + "lineRange": [ + 103, + 105 + ], + "summary": "log_norm():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_improved.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_improved.py", + "lineRange": [ + 322, + 368 + ], + "summary": "sample_hard_negatives():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_improved.py::run_experiment", + "type": "function", + "name": "run_experiment", + "filePath": "code/run_improved.py", + "lineRange": [ + 372, + 474 + ], + "summary": "run_experiment():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_improved.py::evaluate", + "type": "function", + "name": "evaluate", + "filePath": "code/run_improved.py", + "lineRange": [ + 478, + 500 + ], + "summary": "evaluate():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_improved.py::predict_all", + "type": "function", + "name": "predict_all", + "filePath": "code/run_improved.py", + "lineRange": [ + 524, + 539 + ], + "summary": "predict_all():定义于 run_improved.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "class:code/run_improved.py::ResidualHeteroConv", + "type": "class", + "name": "ResidualHeteroConv", + "filePath": "code/run_improved.py", + "summary": "ResidualHeteroConv(类):定义于 run_improved.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_improved.py::MLPDecoder", + "type": "class", + "name": "MLPDecoder", + "filePath": "code/run_improved.py", + "summary": "MLPDecoder(类):定义于 run_improved.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_improved.py::ImprovedHeteroGNN", + "type": "class", + "name": "ImprovedHeteroGNN", + "filePath": "code/run_improved.py", + "summary": "ImprovedHeteroGNN(类):定义于 run_improved.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_lgcn_final.py", + "type": "file", + "name": "run_lgcn_final.py", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 1, + 308 + ], + "summary": "【legacy】LightGCN final 阶段。", + "tags": [ + "legacy", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_lgcn_final.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 19, + 24 + ], + "summary": "set_seed():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 31, + 36 + ], + "summary": "read_txt():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 71, + 73 + ], + "summary": "log_norm():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 109, + 124 + ], + "summary": "build_data():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 127, + 156 + ], + "summary": "sample_hard_negatives():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_lgcn_final.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 212, + 213 + ], + "summary": "cos_sim():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::predict_batched", + "type": "function", + "name": "predict_batched", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 217, + 228 + ], + "summary": "predict_batched():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_final.py::train_lgcn", + "type": "function", + "name": "train_lgcn", + "filePath": "code/run_lgcn_final.py", + "lineRange": [ + 232, + 263 + ], + "summary": "train_lgcn():定义于 run_lgcn_final.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_lgcn_final.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/run_lgcn_final.py", + "summary": "LightGCNLayer(类):定义于 run_lgcn_final.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_lgcn_final.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/run_lgcn_final.py", + "summary": "LightGCN(类):定义于 run_lgcn_final.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_lgcn_v2.py", + "type": "file", + "name": "run_lgcn_v2.py", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 1, + 311 + ], + "summary": "【legacy】LightGCN v2 阶段。", + "tags": [ + "legacy", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_lgcn_v2.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 20, + 25 + ], + "summary": "set_seed():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 32, + 37 + ], + "summary": "read_txt():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 70, + 72 + ], + "summary": "log_norm():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 107, + 121 + ], + "summary": "build_data():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 124, + 153 + ], + "summary": "sample_hard_negatives():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_lgcn_v2.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 213, + 214 + ], + "summary": "cos_sim():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::predict_cos", + "type": "function", + "name": "predict_cos", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 218, + 229 + ], + "summary": "predict_cos():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_lgcn_v2.py::train", + "type": "function", + "name": "train", + "filePath": "code/run_lgcn_v2.py", + "lineRange": [ + 233, + 262 + ], + "summary": "train():定义于 run_lgcn_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_lgcn_v2.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/run_lgcn_v2.py", + "summary": "LightGCNLayer(类):定义于 run_lgcn_v2.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_lgcn_v2.py::LightGCN_Norm", + "type": "class", + "name": "LightGCN_Norm", + "filePath": "code/run_lgcn_v2.py", + "summary": "LightGCN_Norm(类):定义于 run_lgcn_v2.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_ultimate.py", + "type": "file", + "name": "run_ultimate.py", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 1, + 450 + ], + "summary": "【legacy】ultimate 阶段实验脚本。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_ultimate.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 27, + 32 + ], + "summary": "set_seed():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 39, + 44 + ], + "summary": "read_txt():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 85, + 87 + ], + "summary": "log_norm():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 119, + 136 + ], + "summary": "build_data():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 139, + 168 + ], + "summary": "sample_hard_negatives():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_ultimate.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 171, + 172 + ], + "summary": "cos_sim():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::predict_cos_batched", + "type": "function", + "name": "predict_cos_batched", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 302, + 315 + ], + "summary": "predict_cos_batched():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_ultimate.py::train_lightgcn", + "type": "function", + "name": "train_lightgcn", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 319, + 348 + ], + "summary": "train_lightgcn():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_ultimate.py::train_sage", + "type": "function", + "name": "train_sage", + "filePath": "code/run_ultimate.py", + "lineRange": [ + 351, + 380 + ], + "summary": "train_sage():定义于 run_ultimate.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_ultimate.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/run_ultimate.py", + "summary": "LightGCNLayer(类):定义于 run_ultimate.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_ultimate.py::LightGCNRecommender", + "type": "class", + "name": "LightGCNRecommender", + "filePath": "code/run_ultimate.py", + "summary": "LightGCNRecommender(类):定义于 run_ultimate.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_ultimate.py::ResidualHeteroConv", + "type": "class", + "name": "ResidualHeteroConv", + "filePath": "code/run_ultimate.py", + "summary": "ResidualHeteroConv(类):定义于 run_ultimate.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_ultimate.py::SAGERecommender", + "type": "class", + "name": "SAGERecommender", + "filePath": "code/run_ultimate.py", + "summary": "SAGERecommender(类):定义于 run_ultimate.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/run_v2.py", + "type": "file", + "name": "run_v2.py", + "filePath": "code/run_v2.py", + "lineRange": [ + 1, + 520 + ], + "summary": "【legacy】v2 阶段实验脚本。", + "tags": [ + "legacy", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/run_v2.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/run_v2.py", + "lineRange": [ + 36, + 41 + ], + "summary": "set_seed():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/run_v2.py", + "lineRange": [ + 48, + 53 + ], + "summary": "read_txt():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/run_v2.py", + "lineRange": [ + 106, + 108 + ], + "summary": "log_norm():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/run_v2.py", + "lineRange": [ + 274, + 311 + ], + "summary": "sample_hard_negatives():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_v2.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/run_v2.py", + "lineRange": [ + 315, + 316 + ], + "summary": "cos_sim():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::evaluate", + "type": "function", + "name": "evaluate", + "filePath": "code/run_v2.py", + "lineRange": [ + 320, + 338 + ], + "summary": "evaluate():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::predict_cos", + "type": "function", + "name": "predict_cos", + "filePath": "code/run_v2.py", + "lineRange": [ + 342, + 349 + ], + "summary": "predict_cos():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/run_v2.py::run_experiment", + "type": "function", + "name": "run_experiment", + "filePath": "code/run_v2.py", + "lineRange": [ + 353, + 434 + ], + "summary": "run_experiment():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/run_v2.py::predict_batched", + "type": "function", + "name": "predict_batched", + "filePath": "code/run_v2.py", + "lineRange": [ + 458, + 471 + ], + "summary": "predict_batched():定义于 run_v2.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "class:code/run_v2.py::GNNEncoder", + "type": "class", + "name": "GNNEncoder", + "filePath": "code/run_v2.py", + "summary": "GNNEncoder(类):定义于 run_v2.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_v2.py::DotDecoder", + "type": "class", + "name": "DotDecoder", + "filePath": "code/run_v2.py", + "summary": "DotDecoder(类):定义于 run_v2.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/run_v2.py::Recommender", + "type": "class", + "name": "Recommender", + "filePath": "code/run_v2.py", + "summary": "Recommender(类):定义于 run_v2.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/score_level_meta_stack.py", + "type": "file", + "name": "score_level_meta_stack.py", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 1, + 236 + ], + "summary": "分数级 meta-stack:在原始分数层做二级融合实验。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/score_level_meta_stack.py::load_module", + "type": "function", + "name": "load_module", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 21, + 26 + ], + "summary": "load_module():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 29, + 34 + ], + "summary": "best_f1():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::prf", + "type": "function", + "name": "prf", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 37, + 44 + ], + "summary": "prf():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 47, + 51 + ], + "summary": "rank01():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 54, + 55 + ], + "summary": "zscore():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::author_rank01", + "type": "function", + "name": "author_rank01", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 58, + 66 + ], + "summary": "author_rank01():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::add_score_block", + "type": "function", + "name": "add_score_block", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 69, + 70 + ], + "summary": "add_score_block():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 73, + 74 + ], + "summary": "read_txt():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::load_sources", + "type": "function", + "name": "load_sources", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 77, + 105 + ], + "summary": "load_sources():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/score_level_meta_stack.py::fit_oof_predict", + "type": "function", + "name": "fit_oof_predict", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 108, + 133 + ], + "summary": "fit_oof_predict():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/score_level_meta_stack.py::write_sub", + "type": "function", + "name": "write_sub", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 136, + 144 + ], + "summary": "write_sub():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/score_level_meta_stack.py::main", + "type": "function", + "name": "main", + "filePath": "code/score_level_meta_stack.py", + "lineRange": [ + 147, + 232 + ], + "summary": "main():定义于 score_level_meta_stack.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/search_dynamic_fusion.py", + "type": "file", + "name": "search_dynamic_fusion.py", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 1, + 140 + ], + "summary": "动态融合超参/权重搜索。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/search_dynamic_fusion.py::load_train_module", + "type": "function", + "name": "load_train_module", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 16, + 21 + ], + "summary": "load_train_module():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_dynamic_fusion.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 24, + 28 + ], + "summary": "best_f1():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_dynamic_fusion.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 31, + 35 + ], + "summary": "rank01():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_dynamic_fusion.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 38, + 39 + ], + "summary": "zscore():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_dynamic_fusion.py::main", + "type": "function", + "name": "main", + "filePath": "code/search_dynamic_fusion.py", + "lineRange": [ + 42, + 136 + ], + "summary": "main():定义于 search_dynamic_fusion.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/search_val_fusion.py", + "type": "file", + "name": "search_val_fusion.py", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 1, + 127 + ], + "summary": "验证集融合权重搜索。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/search_val_fusion.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 15, + 20 + ], + "summary": "best_f1():定义于 search_val_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_val_fusion.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 23, + 27 + ], + "summary": "rank01():定义于 search_val_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_val_fusion.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 30, + 31 + ], + "summary": "zscore():定义于 search_val_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/search_val_fusion.py::main", + "type": "function", + "name": "main", + "filePath": "code/search_val_fusion.py", + "lineRange": [ + 34, + 123 + ], + "summary": "main():定义于 search_val_fusion.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "file:code/stack_rank_calibration.py", + "type": "file", + "name": "stack_rank_calibration.py", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 1, + 294 + ], + "summary": "两大事实共享库之一。定义 ExplicitGraphFeatures(18 维显式图/meta-path 特征:A-A-P/A-P-P/A-P-A-P 共同邻居、度等)与 add_rank_features(把任意分数转 score/global_rank/author_pct/author_rank 4 列)。被每个 stacker 加载,提供 Stage-2 的手工图特征骨架。", + "tags": [ + "shared-library", + "core", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/stack_rank_calibration.py::load_lgcn_module", + "type": "function", + "name": "load_lgcn_module", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 22, + 27 + ], + "summary": "load_lgcn_module():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 30, + 31 + ], + "summary": "read_txt():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 34, + 39 + ], + "summary": "best_f1():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 42, + 46 + ], + "summary": "rank01():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::zscore", + "type": "function", + "name": "zscore", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 49, + 50 + ], + "summary": "zscore():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::add_rank_features", + "type": "function", + "name": "add_rank_features", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 148, + 160 + ], + "summary": "把任意分数列转成 score/global_rank/author_pct/author_rank 4 维 rank 校准特征,喂 Stage-2 LightGBM。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::fit_oof", + "type": "function", + "name": "fit_oof", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 163, + 184 + ], + "summary": "fit_oof():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::boundary_rerank", + "type": "function", + "name": "boundary_rerank", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 187, + 201 + ], + "summary": "boundary_rerank():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/stack_rank_calibration.py::main", + "type": "function", + "name": "main", + "filePath": "code/stack_rank_calibration.py", + "lineRange": [ + 204, + 290 + ], + "summary": "main():定义于 stack_rank_calibration.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/stack_rank_calibration.py::ExplicitGraphFeatures", + "type": "class", + "name": "ExplicitGraphFeatures", + "filePath": "code/stack_rank_calibration.py", + "summary": "ExplicitGraphFeatures(类):定义于 stack_rank_calibration.py;方法 __init__, transform。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_dynamic_feature_fusion.py", + "type": "file", + "name": "train_dynamic_feature_fusion.py", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 1, + 282 + ], + "summary": "动态特征融合 stacker(融合多源分数),探索性。", + "tags": [ + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::load_train_module", + "type": "function", + "name": "load_train_module", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 21, + 26 + ], + "summary": "load_train_module():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 29, + 30 + ], + "summary": "read_txt():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 33, + 37 + ], + "summary": "best_f1():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::rank01", + "type": "function", + "name": "rank01", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 40, + 44 + ], + "summary": "rank01():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_dynamic_feature_fusion.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_dynamic_feature_fusion.py", + "lineRange": [ + 204, + 278 + ], + "summary": "main():定义于 train_dynamic_feature_fusion.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_dynamic_feature_fusion.py::FeatureBuilder", + "type": "class", + "name": "FeatureBuilder", + "filePath": "code/train_dynamic_feature_fusion.py", + "summary": "FeatureBuilder(类):定义于 train_dynamic_feature_fusion.py;方法 __init__, sample_train_pairs, sample_task_pairs, transform。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_val_hgt_bpr.py", + "type": "file", + "name": "train_val_hgt_bpr.py", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 1, + 188 + ], + "summary": "HGT(异构图 Transformer)+ BPR 训练实验,未进入最终集成(探索性)。", + "tags": [ + "model-training", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_hgt_bpr.py::load_lgcn_module", + "type": "function", + "name": "load_lgcn_module", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_lgcn_module():定义于 train_val_hgt_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_hgt_bpr.py::predict_scores", + "type": "function", + "name": "predict_scores", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 68, + 77 + ], + "summary": "predict_scores():定义于 train_val_hgt_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_hgt_bpr.py::train_one", + "type": "function", + "name": "train_one", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 80, + 130 + ], + "summary": "train_one():定义于 train_val_hgt_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_hgt_bpr.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_val_hgt_bpr.py", + "lineRange": [ + 133, + 184 + ], + "summary": "main():定义于 train_val_hgt_bpr.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_hgt_bpr.py::HGTRecommender", + "type": "class", + "name": "HGTRecommender", + "filePath": "code/train_val_hgt_bpr.py", + "summary": "HGTRecommender(类):定义于 train_val_hgt_bpr.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_val_lgcn_ensemble.py", + "type": "file", + "name": "train_val_lgcn_ensemble.py", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 1, + 506 + ], + "summary": "两大事实共享库之一。定义数据载入(build_parts/build_data 读三类边 + feature.pkl)、确定性验证切分 make_notebook_style_split(seed=202, train_frac=0.9:留出 10% 正边 + 等量随机负边 = 136,484 对 1:1)、LightGCN 异构 CF 集成训练、best_f1()(PR 曲线 argmax 取最优 F1 阈值)。被 ~14 个下游脚本以 load_module 加载,是整个流水线的地基。", + "tags": [ + "shared-library", + "core", + "python" + ], + "complexity": "complex" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::set_seed", + "type": "function", + "name": "set_seed", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 28, + 33 + ], + "summary": "set_seed():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::read_txt", + "type": "function", + "name": "read_txt", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 36, + 41 + ], + "summary": "read_txt():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::log_norm", + "type": "function", + "name": "log_norm", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 44, + 46 + ], + "summary": "log_norm():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::cos_sim", + "type": "function", + "name": "cos_sim", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 128, + 129 + ], + "summary": "cos_sim():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::make_notebook_style_split", + "type": "function", + "name": "make_notebook_style_split", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 132, + 165 + ], + "summary": "【确定性验证切分】seed=202、train_frac=0.9:留出 10% 已知正边(68,242)作验证正例,再等量随机采样非边作负例 → 136,484 对 1:1 人工平衡验证集。pandas.sample(random_state=202)+np.random.default_rng(202)。被全流水线共用。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::build_parts", + "type": "function", + "name": "build_parts", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 168, + 236 + ], + "summary": "读 data_and_docs 三类边 txt + feature.pkl,构造 author/paper 索引、二部/合著/引用邻接与 USE 嵌入矩阵。整个流水线的数据入口。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::build_data", + "type": "function", + "name": "build_data", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 239, + 270 + ], + "summary": "把 build_parts 的张量组装成 PyG/HeteroData 或训练用的边表 + 标签,供 LightGCN 训练。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::sample_hard_negatives", + "type": "function", + "name": "sample_hard_negatives", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 273, + 305 + ], + "summary": "LightGCN 硬负采样:混合 random/popular/coauthor-pool 策略采样难负例,提升 BPR 训练效果。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::predict_scores", + "type": "function", + "name": "predict_scores", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 309, + 337 + ], + "summary": "predict_scores():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 340, + 346 + ], + "summary": "由 precision_recall_curve 求 2PR/(P+R) 的 argmax,返回最优 F1 与对应阈值。leak-free 验证评估的标准函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::train_one", + "type": "function", + "name": "train_one", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 349, + 414 + ], + "summary": "train_one():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_lgcn_ensemble.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_val_lgcn_ensemble.py", + "lineRange": [ + 417, + 502 + ], + "summary": "main():定义于 train_val_lgcn_ensemble.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_lgcn_ensemble.py::LightGCNLayer", + "type": "class", + "name": "LightGCNLayer", + "filePath": "code/train_val_lgcn_ensemble.py", + "summary": "LightGCNLayer(类):定义于 train_val_lgcn_ensemble.py;方法 forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_lgcn_ensemble.py::LightGCN", + "type": "class", + "name": "LightGCN", + "filePath": "code/train_val_lgcn_ensemble.py", + "summary": "LightGCN(类):定义于 train_val_lgcn_ensemble.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_lgcn_ensemble.py::LearnableWeightLightGCN", + "type": "class", + "name": "LearnableWeightLightGCN", + "filePath": "code/train_val_lgcn_ensemble.py", + "summary": "LearnableWeightLightGCN(类):定义于 train_val_lgcn_ensemble.py;方法 __init__, encode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_val_mf_bpr.py", + "type": "file", + "name": "train_val_mf_bpr.py", + "filePath": "code/train_val_mf_bpr.py", + "lineRange": [ + 1, + 110 + ], + "summary": "BPR 矩阵分解训练器(dim 可配),为 extra_score_sources 提供 bpr_mf 分数。", + "tags": [ + "model-training", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_mf_bpr.py::best_f1", + "type": "function", + "name": "best_f1", + "filePath": "code/train_val_mf_bpr.py", + "lineRange": [ + 16, + 20 + ], + "summary": "best_f1():定义于 train_val_mf_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_mf_bpr.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_val_mf_bpr.py", + "lineRange": [ + 41, + 106 + ], + "summary": "main():定义于 train_val_mf_bpr.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_mf_bpr.py::MF", + "type": "class", + "name": "MF", + "filePath": "code/train_val_mf_bpr.py", + "summary": "MF(类):定义于 train_val_mf_bpr.py;方法 __init__, score。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:code/train_val_sage_bpr.py", + "type": "file", + "name": "train_val_sage_bpr.py", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 1, + 188 + ], + "summary": "GraphSAGE + BPR 训练实验,探索性对比。", + "tags": [ + "model-training", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_sage_bpr.py::load_lgcn_module", + "type": "function", + "name": "load_lgcn_module", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 17, + 22 + ], + "summary": "load_lgcn_module():定义于 train_val_sage_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_sage_bpr.py::predict_scores", + "type": "function", + "name": "predict_scores", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 74, + 83 + ], + "summary": "predict_scores():定义于 train_val_sage_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:code/train_val_sage_bpr.py::train_one", + "type": "function", + "name": "train_one", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 86, + 130 + ], + "summary": "train_one():定义于 train_val_sage_bpr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "func:code/train_val_sage_bpr.py::main", + "type": "function", + "name": "main", + "filePath": "code/train_val_sage_bpr.py", + "lineRange": [ + 133, + 184 + ], + "summary": "main():定义于 train_val_sage_bpr.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_sage_bpr.py::ResidualSAGE", + "type": "class", + "name": "ResidualSAGE", + "filePath": "code/train_val_sage_bpr.py", + "summary": "ResidualSAGE(类):定义于 train_val_sage_bpr.py;方法 __init__, forward。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "class:code/train_val_sage_bpr.py::SAGERecommender", + "type": "class", + "name": "SAGERecommender", + "filePath": "code/train_val_sage_bpr.py", + "summary": "SAGERecommender(类):定义于 train_val_sage_bpr.py;方法 __init__, reset_parameters, encode, decode。", + "tags": [ + "class", + "has-methods" + ], + "complexity": "moderate" + }, + { + "id": "file:data_and_docs/advice.md", + "type": "document", + "name": "advice.md", + "filePath": "data_and_docs/advice.md", + "lineRange": [ + 1, + 468 + ], + "summary": "课程建议/任务说明补充。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:data_and_docs/dataset.md", + "type": "document", + "name": "dataset.md", + "filePath": "data_and_docs/dataset.md", + "lineRange": [ + 1, + 26 + ], + "summary": "数据集字段说明(三类边文件 + feature.pkl)。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/project_description.md", + "type": "document", + "name": "project_description.md", + "filePath": "data_and_docs/project_description.md", + "lineRange": [ + 1, + 21 + ], + "summary": "项目任务描述(author-paper 推荐,F1 评测)。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/project_evaluation.md", + "type": "document", + "name": "project_evaluation.md", + "filePath": "data_and_docs/project_evaluation.md", + "lineRange": [ + 1, + 14 + ], + "summary": "评测细则(公开榜 50%、F1 系数、提交列名)。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/project-example-2026-pygver.ipynb", + "type": "file", + "name": "project-example-2026-pygver.ipynb", + "filePath": "data_and_docs/project-example-2026-pygver.ipynb", + "summary": "官方示例 notebook(PyG 版),参考基线来源。", + "tags": [ + "task-spec", + "data-doc" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/proposal.md", + "type": "document", + "name": "proposal.md", + "filePath": "data_and_docs/proposal.md", + "lineRange": [ + 1, + 49 + ], + "summary": "项目提案(早期方案)。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:data_and_docs/references.md", + "type": "document", + "name": "references.md", + "filePath": "data_and_docs/references.md", + "lineRange": [ + 1, + 11 + ], + "summary": "参考文献列表。", + "tags": [ + "task-spec", + "data-doc", + "markdown" + ], + "complexity": "simple" + }, + { + "id": "file:docs_first_principles/_fact_sheet.md", + "type": "document", + "name": "_fact_sheet.md", + "filePath": "docs_first_principles/_fact_sheet.md", + "lineRange": [ + 1, + 287 + ], + "summary": "【权威事实表】全部文档的数字真相源。§2 各阶段 F1、§2.4 高阶消融(108→190→214→259)、§2.5 259 维构成、§5 不一致台账、§6 代码定位。不直接进论文正文。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/00_README.md", + "type": "document", + "name": "00_README.md", + "filePath": "docs_first_principles/00_README.md", + "lineRange": [ + 1, + 152 + ], + "summary": "【第一性原理文档包入口】导航地图 + 全局数字索引。15 篇中文文档的阅读顺序与一句话用途。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/01_problem_and_dataset.md", + "type": "document", + "name": "01_problem_and_dataset.md", + "filePath": "docs_first_principles/01_problem_and_dataset.md", + "lineRange": [ + 1, + 168 + ], + "summary": "任务定义与数据集:异构图三类边、规模、F1 评测、稀疏/长尾难度。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/02_architecture_overview.md", + "type": "document", + "name": "02_architecture_overview.md", + "filePath": "docs_first_principles/02_architecture_overview.md", + "lineRange": [ + 1, + 236 + ], + "summary": "两阶段 stacking 架构总览:Stage-1 多源 + Stage-2 LightGBM + rank-cutoff。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/03_data_flow_and_artifacts.md", + "type": "document", + "name": "03_data_flow_and_artifacts.md", + "filePath": "docs_first_principles/03_data_flow_and_artifacts.md", + "lineRange": [ + 1, + 302 + ], + "summary": "数据流与产物:txt→切分→.npy 分数→OOF→submission,文件名约定与缓存。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/04_lightgcn_from_first_principles.md", + "type": "document", + "name": "04_lightgcn_from_first_principles.md", + "filePath": "docs_first_principles/04_lightgcn_from_first_principles.md", + "lineRange": [ + 1, + 335 + ], + "summary": "LightGCN 第一性原理:为何轻、BPR+硬负采样、点积解码、主分数生产者。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "type": "document", + "name": "05_feature_stacking_and_lightgbm.md", + "filePath": "docs_first_principles/05_feature_stacking_and_lightgbm.md", + "lineRange": [ + 1, + 242 + ], + "summary": "手工图/meta-path 特征 + LightGBM 二阶段融合:为何 stacking 是单阶段最大增益(+0.0174)。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/06_random_walk_features.md", + "type": "document", + "name": "06_random_walk_features.md", + "filePath": "docs_first_principles/06_random_walk_features.md", + "lineRange": [ + 1, + 254 + ], + "summary": "随机游走(DeepWalk/Node2Vec,7 块):补全局接近度信息。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/07_high_order_citation_propagation.md", + "type": "document", + "name": "07_high_order_citation_propagation.md", + "filePath": "docs_first_principles/07_high_order_citation_propagation.md", + "lineRange": [ + 1, + 357 + ], + "summary": "高阶引用传播:H_k=R·C^k / G_k=S·R·C^k,fwd/bwd/undir,最终核心增益。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:docs_first_principles/08_calibration_and_rank_cutoff.md", + "type": "document", + "name": "08_calibration_and_rank_cutoff.md", + "filePath": "docs_first_principles/08_calibration_and_rank_cutoff.md", + "lineRange": [ + 1, + 293 + ], + "summary": "校准与 rank cutoff:验证 1:1→测试分布漂移(阈值 0.4617 vs 漂移 0.5242)。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/09_experiment_timeline.md", + "type": "document", + "name": "09_experiment_timeline.md", + "filePath": "docs_first_principles/09_experiment_timeline.md", + "lineRange": [ + 1, + 141 + ], + "summary": "实验演进时间线:baseline 0.8850→最终 0.9669/0.96626 的结果表与三段跃迁解读。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/10_code_map_and_entrypoints.md", + "type": "document", + "name": "10_code_map_and_entrypoints.md", + "filePath": "docs_first_principles/10_code_map_and_entrypoints.md", + "lineRange": [ + 1, + 185 + ], + "summary": "代码地图与入口:30+ 脚本分类、两大共享库、legacy、三条核心命令。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/11_figures_and_paper_mapping.md", + "type": "document", + "name": "11_figures_and_paper_mapping.md", + "filePath": "docs_first_principles/11_figures_and_paper_mapping.md", + "lineRange": [ + 1, + 367 + ], + "summary": "图表与论文章节映射:11 张图 caption + 与正文小节对应。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:docs_first_principles/12_reproduction_guide.md", + "type": "document", + "name": "12_reproduction_guide.md", + "filePath": "docs_first_principles/12_reproduction_guide.md", + "lineRange": [ + 1, + 324 + ], + "summary": "复现指南:环境、最短/从零路径、快速验证、常见坑。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:docs_first_principles/13_common_questions_for_the_author.md", + "type": "document", + "name": "13_common_questions_for_the_author.md", + "filePath": "docs_first_principles/13_common_questions_for_the_author.md", + "lineRange": [ + 1, + 212 + ], + "summary": "答辩/审稿常见问题与回答。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:docs_first_principles/SUMMARY_FOR_PAPER.md", + "type": "document", + "name": "SUMMARY_FOR_PAPER.md", + "filePath": "docs_first_principles/SUMMARY_FOR_PAPER.md", + "lineRange": [ + 1, + 310 + ], + "summary": "论文级总览:可直接进 TeX 的正式表述 + 图表素材清单。", + "tags": [ + "docs-first-principles", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:env/conda-list-cs3319.txt", + "type": "document", + "name": "conda-list-cs3319.txt", + "filePath": "env/conda-list-cs3319.txt", + "lineRange": [ + 1, + 100 + ], + "summary": "conda list 导出(完整版本快照)。", + "tags": [ + "docs" + ], + "complexity": "simple" + }, + { + "id": "file:env/environment-cs3319.yml", + "type": "config", + "name": "environment-cs3319.yml", + "filePath": "env/environment-cs3319.yml", + "lineRange": [ + 1, + 106 + ], + "summary": "Conda 完整环境定义(numpy/pandas/scipy/sklearn/lightgbm/torch/torch-geometric/gensim/networkx/node2vec)。", + "tags": [ + "config" + ], + "complexity": "simple" + }, + { + "id": "file:env/requirements-minimal.txt", + "type": "document", + "name": "requirements-minimal.txt", + "filePath": "env/requirements-minimal.txt", + "lineRange": [ + 1, + 10 + ], + "summary": "最小 pinned 依赖(Python 3.10)。", + "tags": [ + "docs" + ], + "complexity": "simple" + }, + { + "id": "file:figures_paper/README_figures.md", + "type": "document", + "name": "README_figures.md", + "filePath": "figures_paper/README_figures.md", + "lineRange": [ + 1, + 115 + ], + "summary": "figures_paper 图集说明。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig1_graph_overview.py", + "type": "file", + "name": "fig1_graph_overview.py", + "filePath": "figures_paper/scripts/fig1_graph_overview.py", + "lineRange": [ + 1, + 96 + ], + "summary": "figures_paper 图1 异构图结构概览。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig1_graph_overview.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig1_graph_overview.py", + "lineRange": [ + 16, + 90 + ], + "summary": "make():定义于 fig1_graph_overview.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig2_sparsity.py", + "type": "file", + "name": "fig2_sparsity.py", + "filePath": "figures_paper/scripts/fig2_sparsity.py", + "lineRange": [ + 1, + 91 + ], + "summary": "figures_paper 图2 稀疏度/长尾分布。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig2_sparsity.py::_ccdf", + "type": "function", + "name": "_ccdf", + "filePath": "figures_paper/scripts/fig2_sparsity.py", + "lineRange": [ + 17, + 24 + ], + "summary": "_ccdf():定义于 fig2_sparsity.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig2_sparsity.py::_panel_ccdf", + "type": "function", + "name": "_panel_ccdf", + "filePath": "figures_paper/scripts/fig2_sparsity.py", + "lineRange": [ + 27, + 35 + ], + "summary": "_panel_ccdf():定义于 fig2_sparsity.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig2_sparsity.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig2_sparsity.py", + "lineRange": [ + 38, + 85 + ], + "summary": "make():定义于 fig2_sparsity.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig3_roadmap.py", + "type": "file", + "name": "fig3_roadmap.py", + "filePath": "figures_paper/scripts/fig3_roadmap.py", + "lineRange": [ + 1, + 90 + ], + "summary": "figures_paper 图3 方法路线图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig3_roadmap.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig3_roadmap.py", + "lineRange": [ + 27, + 84 + ], + "summary": "make():定义于 fig3_roadmap.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig4_architecture.py", + "type": "file", + "name": "fig4_architecture.py", + "filePath": "figures_paper/scripts/fig4_architecture.py", + "lineRange": [ + 1, + 87 + ], + "summary": "figures_paper 图4 架构图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig4_architecture.py::_box", + "type": "function", + "name": "_box", + "filePath": "figures_paper/scripts/fig4_architecture.py", + "lineRange": [ + 16, + 20 + ], + "summary": "_box():定义于 fig4_architecture.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig4_architecture.py::_arrow", + "type": "function", + "name": "_arrow", + "filePath": "figures_paper/scripts/fig4_architecture.py", + "lineRange": [ + 23, + 24 + ], + "summary": "_arrow():定义于 fig4_architecture.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig4_architecture.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig4_architecture.py", + "lineRange": [ + 27, + 81 + ], + "summary": "make():定义于 fig4_architecture.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig5_ablation_highorder.py", + "type": "file", + "name": "fig5_ablation_highorder.py", + "filePath": "figures_paper/scripts/fig5_ablation_highorder.py", + "lineRange": [ + 1, + 96 + ], + "summary": "figures_paper 图5 高阶消融。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig5_ablation_highorder.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig5_ablation_highorder.py", + "lineRange": [ + 31, + 90 + ], + "summary": "make():定义于 fig5_ablation_highorder.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig6_rank_vs_threshold.py", + "type": "file", + "name": "fig6_rank_vs_threshold.py", + "filePath": "figures_paper/scripts/fig6_rank_vs_threshold.py", + "lineRange": [ + 1, + 88 + ], + "summary": "figures_paper 图6 rank vs threshold 决策对比。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig6_rank_vs_threshold.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig6_rank_vs_threshold.py", + "lineRange": [ + 21, + 82 + ], + "summary": "make():定义于 fig6_rank_vs_threshold.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/fig7_error_heatmap.py", + "type": "file", + "name": "fig7_error_heatmap.py", + "filePath": "figures_paper/scripts/fig7_error_heatmap.py", + "lineRange": [ + 1, + 92 + ], + "summary": "figures_paper 图7 误差热图。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig7_error_heatmap.py::_bucket_order_key", + "type": "function", + "name": "_bucket_order_key", + "filePath": "figures_paper/scripts/fig7_error_heatmap.py", + "lineRange": [ + 27, + 37 + ], + "summary": "_bucket_order_key():定义于 fig7_error_heatmap.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/fig7_error_heatmap.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/fig7_error_heatmap.py", + "lineRange": [ + 40, + 86 + ], + "summary": "make():定义于 fig7_error_heatmap.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/figA1_hyperparam.py", + "type": "file", + "name": "figA1_hyperparam.py", + "filePath": "figures_paper/scripts/figA1_hyperparam.py", + "lineRange": [ + 1, + 51 + ], + "summary": "figures_paper 附录图A1 超参。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/figA1_hyperparam.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/figA1_hyperparam.py", + "lineRange": [ + 14, + 45 + ], + "summary": "make():定义于 figA1_hyperparam.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/figA2_rw_ablation.py", + "type": "file", + "name": "figA2_rw_ablation.py", + "filePath": "figures_paper/scripts/figA2_rw_ablation.py", + "lineRange": [ + 1, + 44 + ], + "summary": "figures_paper 附录图A2 RW 消融。", + "tags": [ + "ablation", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/figA2_rw_ablation.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/figA2_rw_ablation.py", + "lineRange": [ + 11, + 38 + ], + "summary": "make():定义于 figA2_rw_ablation.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/figA3_feature_importance.py", + "type": "file", + "name": "figA3_feature_importance.py", + "filePath": "figures_paper/scripts/figA3_feature_importance.py", + "lineRange": [ + 1, + 50 + ], + "summary": "figures_paper 附录图A3 特征重要性。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/figA3_feature_importance.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/figA3_feature_importance.py", + "lineRange": [ + 25, + 44 + ], + "summary": "make():定义于 figA3_feature_importance.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:figures_paper/scripts/figA4_oof_pr.py", + "type": "file", + "name": "figA4_oof_pr.py", + "filePath": "figures_paper/scripts/figA4_oof_pr.py", + "lineRange": [ + 1, + 61 + ], + "summary": "figures_paper 附录图A4 OOF PR 曲线。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/figA4_oof_pr.py::make", + "type": "function", + "name": "make", + "filePath": "figures_paper/scripts/figA4_oof_pr.py", + "lineRange": [ + 19, + 55 + ], + "summary": "make():定义于 figA4_oof_pr.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/make_all_figures.py", + "type": "file", + "name": "make_all_figures.py", + "filePath": "figures_paper/scripts/make_all_figures.py", + "lineRange": [ + 1, + 119 + ], + "summary": "figures_paper 11 图集一键生成入口。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "moderate" + }, + { + "id": "func:figures_paper/scripts/make_all_figures.py::_load", + "type": "function", + "name": "_load", + "filePath": "figures_paper/scripts/make_all_figures.py", + "lineRange": [ + 38, + 42 + ], + "summary": "_load():定义于 make_all_figures.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/make_all_figures.py::main", + "type": "function", + "name": "main", + "filePath": "figures_paper/scripts/make_all_figures.py", + "lineRange": [ + 45, + 69 + ], + "summary": "main():定义于 make_all_figures.py 的函数。", + "tags": [ + "function" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/make_all_figures.py::_write_readme", + "type": "function", + "name": "_write_readme", + "filePath": "figures_paper/scripts/make_all_figures.py", + "lineRange": [ + 72, + 113 + ], + "summary": "_write_readme():定义于 make_all_figures.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "moderate" + }, + { + "id": "file:figures_paper/scripts/style.py", + "type": "file", + "name": "style.py", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 1, + 67 + ], + "summary": "figures_paper 图集共享 matplotlib 样式。", + "tags": [ + "figure", + "visualization", + "python" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/style.py::apply", + "type": "function", + "name": "apply", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 20, + 45 + ], + "summary": "apply():定义于 style.py 的函数。", + "tags": [ + "function" + ], + "complexity": "moderate" + }, + { + "id": "func:figures_paper/scripts/style.py::ensure_dirs", + "type": "function", + "name": "ensure_dirs", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 48, + 55 + ], + "summary": "ensure_dirs():定义于 style.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/style.py::save", + "type": "function", + "name": "save", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 58, + 63 + ], + "summary": "save():定义于 style.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "func:figures_paper/scripts/style.py::stat_box", + "type": "function", + "name": "stat_box", + "filePath": "figures_paper/scripts/style.py", + "lineRange": [ + 66, + 67 + ], + "summary": "stat_box():定义于 style.py 的函数。", + "tags": [ + "function", + "takes-args" + ], + "complexity": "simple" + }, + { + "id": "file:notes/experiment_history.md", + "type": "document", + "name": "experiment_history.md", + "filePath": "notes/experiment_history.md", + "lineRange": [ + 1, + 319 + ], + "summary": "实验历史笔记:早期 GNN 实验(§1-3)、各阶段试错记录。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:README.md", + "type": "document", + "name": "README.md", + "filePath": "README.md", + "lineRange": [ + 1, + 253 + ], + "summary": "项目主 README:结果表(公开 F1 链)+ 精确复现命令 + 核心脚本表。读这份拿结果数据。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:reports/exploration_summary.md", + "type": "document", + "name": "exploration_summary.md", + "filePath": "reports/exploration_summary.md", + "lineRange": [ + 1, + 861 + ], + "summary": "探索总结:各阶段验证 F1 表、跨 seed 稳定性、RW 公开分偏乐观的教训(§16)。", + "tags": [ + "report", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:reports/final_report.md", + "type": "document", + "name": "final_report.md", + "filePath": "reports/final_report.md", + "lineRange": [ + 1, + 202 + ], + "summary": "最终报告:方法与结果叙事版。", + "tags": [ + "report", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:reports/paper_writing_guide.md", + "type": "document", + "name": "paper_writing_guide.md", + "filePath": "reports/paper_writing_guide.md", + "lineRange": [ + 1, + 321 + ], + "summary": "论文写作指南:章节结构与表述建议。", + "tags": [ + "report", + "markdown" + ], + "complexity": "complex" + }, + { + "id": "file:reports/preliminary_report.md", + "type": "document", + "name": "preliminary_report.md", + "filePath": "reports/preliminary_report.md", + "lineRange": [ + 1, + 175 + ], + "summary": "初步报告(早期阶段叙事)。", + "tags": [ + "report", + "markdown" + ], + "complexity": "moderate" + }, + { + "id": "file:WORKSPACE_STATUS.md", + "type": "document", + "name": "WORKSPACE_STATUS.md", + "filePath": "WORKSPACE_STATUS.md", + "lineRange": [ + 1, + 262 + ], + "summary": "工作区状态备忘(2026-06-17),含目录存在性记录。", + "tags": [ + "markdown" + ], + "complexity": "moderate" + } + ], + "edges": [ + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/figures/fig1_dataset_overview.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig10_rw_ensemble_size.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig2_framework.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig3_progression.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig4_highorder_ablation.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig5_pr_roc.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig6_feature_contribution.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig7_error_analysis.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig8_lgcn_ensemble_correlation.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig9_lgcn_hyperparam.py", + "target": "file:code/figures/plot_style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "file:code/content_rich_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "file:code/node2vec_deepwalk_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/post95_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/post95_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_ensemble_ablation.py", + "target": "file:code/generate_randomwalk_ensemble_submission.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/randomwalk_ensemble_ablation.py", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/randomwalk_one_ablation.py", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/stack_rank_calibration.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/post95_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/generate_post95_submission.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "file:code/extra_score_sources_ablation.py", + "type": "imports", + "direction": "forward", + "description": "运行时 load_module() 加载(无 utils.py,脚本互相当库)", + "weight": 0.85 + }, + { + "source": "file:figures_paper/scripts/fig1_graph_overview.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig2_sparsity.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig3_roadmap.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig4_architecture.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig5_ablation_highorder.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig6_rank_vs_threshold.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig7_error_heatmap.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/figA1_hyperparam.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/figA2_rw_ablation.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/figA3_feature_importance.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/figA4_oof_pr.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/make_all_figures.py", + "target": "file:figures_paper/scripts/style.py", + "type": "imports", + "direction": "forward", + "description": "项目内部 import", + "weight": 0.7 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::sample_hard_neg", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::evaluate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_vanilla_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_learnw_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_gat_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_sage_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_deep_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::make_wide_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "func:code/compare_gnn.py::run_trial", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/compare_gnn.py", + "target": "class:code/compare_gnn.py::MeanAggLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/compare_gnn.py", + "target": "class:code/compare_gnn.py::GATAggLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/compare_gnn.py", + "target": "class:code/compare_gnn.py::SAGEAggLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::content_rich_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/content_rich_ablation.py", + "target": "func:code/content_rich_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::prf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::score_at_threshold", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::author_rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::author_rank_position", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::score_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::fit_full_lgb", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::average_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::bucket_cut", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::bucket_quantile", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::load_submission_pred", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::write_submission", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::write_group_submission", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::group_threshold", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::summarize_pred", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::build_feature_names", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::build_val_test_context", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::error_analysis", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::add_agreement_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::boundary_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/error_group_calibration.py", + "target": "func:code/error_group_calibration.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::load_train_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::infer_layers", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::score_model", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/evaluate_val_checkpoints.py", + "target": "func:code/evaluate_val_checkpoints.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::score_to_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::content_mean_score", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::train_ranker_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "func:code/extra_score_sources_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/extra_score_sources_ablation.py", + "target": "class:code/extra_score_sources_ablation.py::MF", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/figures/fig1_dataset_overview.py", + "target": "func:code/figures/fig1_dataset_overview.py::plot_ccdf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/fig2_framework.py", + "target": "func:code/figures/fig2_framework.py::box", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/fig2_framework.py", + "target": "func:code/figures/fig2_framework.py::arrow", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/fig7_error_analysis.py", + "target": "func:code/figures/fig7_error_analysis.py::plot_buckets", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/fig9_lgcn_hyperparam.py", + "target": "func:code/figures/fig9_lgcn_hyperparam.py::parse", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/gen_val_labels.py", + "target": "func:code/figures/gen_val_labels.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/gen_val_labels.py", + "target": "func:code/figures/gen_val_labels.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/plot_style.py", + "target": "func:code/figures/plot_style.py::apply", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/figures/plot_style.py", + "target": "func:code/figures/plot_style.py::save", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_conservative_rw_blends.py", + "target": "func:code/generate_conservative_rw_blends.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_conservative_rw_blends.py", + "target": "func:code/generate_conservative_rw_blends.py::write_ratio_submission", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_conservative_rw_blends.py", + "target": "func:code/generate_conservative_rw_blends.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "func:code/generate_content_rich_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "func:code/generate_content_rich_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_content_rich_submission.py", + "target": "func:code/generate_content_rich_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::build", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::predict_dot", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::write", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "func:code/generate_dot_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "class:code/generate_dot_submission.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_dot_submission.py", + "target": "class:code/generate_dot_submission.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::build_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "func:code/generate_ens6_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "class:code/generate_ens6_submission.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_ens6_submission.py", + "target": "class:code/generate_ens6_submission.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "func:code/generate_extra_bprmf_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "func:code/generate_extra_bprmf_submission.py::train_mf_test_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "func:code/generate_extra_bprmf_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_extra_bprmf_submission.py", + "target": "func:code/generate_extra_bprmf_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::build_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::checkpoint_weight", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::percent_rank", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::write_threshold_submissions", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::write_top_ratio_submissions", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "func:code/generate_large_ensemble_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "class:code/generate_large_ensemble_submission.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_large_ensemble_submission.py", + "target": "class:code/generate_large_ensemble_submission.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "func:code/generate_node2vec_deepwalk_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "func:code/generate_node2vec_deepwalk_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_node2vec_deepwalk_submission.py", + "target": "func:code/generate_node2vec_deepwalk_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::infer_layers", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::infer_mode", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::score_cache_path", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::checkpoint_for_score", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::ensemble_member_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::score_val_path_on_test", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::select_variant_val_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::variant_feature_matrix", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::topk_content_similarity_fast", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::make_submissions", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_post95_submission.py", + "target": "func:code/generate_post95_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "func:code/generate_randomwalk_ensemble_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "func:code/generate_randomwalk_ensemble_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "func:code/generate_randomwalk_ensemble_submission.py::aggregate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_ensemble_submission.py", + "target": "func:code/generate_randomwalk_ensemble_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "func:code/generate_randomwalk_single_submission.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "func:code/generate_randomwalk_single_submission.py::make_subs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/generate_randomwalk_single_submission.py", + "target": "func:code/generate_randomwalk_single_submission.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::row_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::topk_prune_rows", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::extract_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::build_high_order", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::build_high_order_directed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::fit_full_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::write_ratio_submission", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_graph_stack.py", + "target": "func:code/high_order_graph_stack.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_model_compare.py", + "target": "func:code/high_order_model_compare.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_model_compare.py", + "target": "func:code/high_order_model_compare.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_model_compare.py", + "target": "func:code/high_order_model_compare.py::fit_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/high_order_model_compare.py", + "target": "func:code/high_order_model_compare.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/make_notebook_style_split.py", + "target": "func:code/make_notebook_style_split.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/make_notebook_style_split.py", + "target": "func:code/make_notebook_style_split.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::build_graph", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::deepwalk_walks", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::train_deepwalk", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::train_node2vec", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::pair_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/node2vec_deepwalk_ablation.py", + "target": "func:code/node2vec_deepwalk_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::prf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::bucket_series", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::error_analysis", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::group_threshold", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::author_quota_tuning", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::negative_evidence_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::topk_content_similarity", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/post95_ablation.py", + "target": "func:code/post95_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_ensemble_ablation.py", + "target": "func:code/randomwalk_ensemble_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_one_ablation.py", + "target": "func:code/randomwalk_one_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::small_configs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::graph_configs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::extra_configs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::build_graph", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::deepwalk_walks", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::train_model", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::embedding_arrays", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::build_base_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::train_full_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "func:code/randomwalk_systematic_ablation.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/randomwalk_systematic_ablation.py", + "target": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::fit_lgb_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::fit_full_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::write_sub", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/rich_randomwalk_stack.py", + "target": "func:code/rich_randomwalk_stack.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "func:code/run_baseline.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "func:code/run_baseline.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "func:code/run_baseline.py::sample_negative_edges", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "func:code/run_baseline.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_baseline.py", + "target": "class:code/run_baseline.py::HeteroMeanConv", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_baseline.py", + "target": "class:code/run_baseline.py::HeteroRecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::evaluate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::predict_cos_batched", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "func:code/run_final.py::train_model", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_final.py", + "target": "class:code/run_final.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_final.py", + "target": "class:code/run_final.py::LightGCNRecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_graph_features.py", + "target": "func:code/run_graph_features.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_graph_features.py", + "target": "func:code/run_graph_features.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_graph_features.py", + "target": "func:code/run_graph_features.py::log1p_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_graph_features.py", + "target": "func:code/run_graph_features.py::compute_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::run_experiment", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::evaluate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "func:code/run_improved.py::predict_all", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_improved.py", + "target": "class:code/run_improved.py::ResidualHeteroConv", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_improved.py", + "target": "class:code/run_improved.py::MLPDecoder", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_improved.py", + "target": "class:code/run_improved.py::ImprovedHeteroGNN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::predict_batched", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "func:code/run_lgcn_final.py::train_lgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "class:code/run_lgcn_final.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_lgcn_final.py", + "target": "class:code/run_lgcn_final.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::predict_cos", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "func:code/run_lgcn_v2.py::train", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "class:code/run_lgcn_v2.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_lgcn_v2.py", + "target": "class:code/run_lgcn_v2.py::LightGCN_Norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::predict_cos_batched", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::train_lightgcn", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "func:code/run_ultimate.py::train_sage", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_ultimate.py", + "target": "class:code/run_ultimate.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_ultimate.py", + "target": "class:code/run_ultimate.py::LightGCNRecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_ultimate.py", + "target": "class:code/run_ultimate.py::ResidualHeteroConv", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_ultimate.py", + "target": "class:code/run_ultimate.py::SAGERecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::evaluate", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::predict_cos", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::run_experiment", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "func:code/run_v2.py::predict_batched", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/run_v2.py", + "target": "class:code/run_v2.py::GNNEncoder", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_v2.py", + "target": "class:code/run_v2.py::DotDecoder", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/run_v2.py", + "target": "class:code/run_v2.py::Recommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::load_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::prf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::author_rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::add_score_block", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::load_sources", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::fit_oof_predict", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::write_sub", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/score_level_meta_stack.py", + "target": "func:code/score_level_meta_stack.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::load_train_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_dynamic_fusion.py", + "target": "func:code/search_dynamic_fusion.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_val_fusion.py", + "target": "func:code/search_val_fusion.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_val_fusion.py", + "target": "func:code/search_val_fusion.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_val_fusion.py", + "target": "func:code/search_val_fusion.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/search_val_fusion.py", + "target": "func:code/search_val_fusion.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::load_lgcn_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::zscore", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::add_rank_features", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::fit_oof", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::boundary_rerank", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "func:code/stack_rank_calibration.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/stack_rank_calibration.py", + "target": "class:code/stack_rank_calibration.py::ExplicitGraphFeatures", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::load_train_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::rank01", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "func:code/train_dynamic_feature_fusion.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_dynamic_feature_fusion.py", + "target": "class:code/train_dynamic_feature_fusion.py::FeatureBuilder", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "func:code/train_val_hgt_bpr.py::load_lgcn_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "func:code/train_val_hgt_bpr.py::predict_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "func:code/train_val_hgt_bpr.py::train_one", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "func:code/train_val_hgt_bpr.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_hgt_bpr.py", + "target": "class:code/train_val_hgt_bpr.py::HGTRecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::set_seed", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::read_txt", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::log_norm", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::cos_sim", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::make_notebook_style_split", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::build_parts", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::build_data", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::sample_hard_negatives", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::predict_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::train_one", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "func:code/train_val_lgcn_ensemble.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "class:code/train_val_lgcn_ensemble.py::LightGCNLayer", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "class:code/train_val_lgcn_ensemble.py::LightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_lgcn_ensemble.py", + "target": "class:code/train_val_lgcn_ensemble.py::LearnableWeightLightGCN", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_mf_bpr.py", + "target": "func:code/train_val_mf_bpr.py::best_f1", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_mf_bpr.py", + "target": "func:code/train_val_mf_bpr.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_mf_bpr.py", + "target": "class:code/train_val_mf_bpr.py::MF", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "func:code/train_val_sage_bpr.py::load_lgcn_module", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "func:code/train_val_sage_bpr.py::predict_scores", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "func:code/train_val_sage_bpr.py::train_one", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "func:code/train_val_sage_bpr.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "class:code/train_val_sage_bpr.py::ResidualSAGE", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:code/train_val_sage_bpr.py", + "target": "class:code/train_val_sage_bpr.py::SAGERecommender", + "type": "contains", + "direction": "forward", + "description": "文件定义的类", + "weight": 0.7 + }, + { + "source": "file:figures_paper/scripts/fig1_graph_overview.py", + "target": "func:figures_paper/scripts/fig1_graph_overview.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig2_sparsity.py", + "target": "func:figures_paper/scripts/fig2_sparsity.py::_ccdf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig2_sparsity.py", + "target": "func:figures_paper/scripts/fig2_sparsity.py::_panel_ccdf", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig2_sparsity.py", + "target": "func:figures_paper/scripts/fig2_sparsity.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig3_roadmap.py", + "target": "func:figures_paper/scripts/fig3_roadmap.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig4_architecture.py", + "target": "func:figures_paper/scripts/fig4_architecture.py::_box", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig4_architecture.py", + "target": "func:figures_paper/scripts/fig4_architecture.py::_arrow", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig4_architecture.py", + "target": "func:figures_paper/scripts/fig4_architecture.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig5_ablation_highorder.py", + "target": "func:figures_paper/scripts/fig5_ablation_highorder.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig6_rank_vs_threshold.py", + "target": "func:figures_paper/scripts/fig6_rank_vs_threshold.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig7_error_heatmap.py", + "target": "func:figures_paper/scripts/fig7_error_heatmap.py::_bucket_order_key", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/fig7_error_heatmap.py", + "target": "func:figures_paper/scripts/fig7_error_heatmap.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/figA1_hyperparam.py", + "target": "func:figures_paper/scripts/figA1_hyperparam.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/figA2_rw_ablation.py", + "target": "func:figures_paper/scripts/figA2_rw_ablation.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/figA3_feature_importance.py", + "target": "func:figures_paper/scripts/figA3_feature_importance.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/figA4_oof_pr.py", + "target": "func:figures_paper/scripts/figA4_oof_pr.py::make", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/make_all_figures.py", + "target": "func:figures_paper/scripts/make_all_figures.py::_load", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/make_all_figures.py", + "target": "func:figures_paper/scripts/make_all_figures.py::main", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/make_all_figures.py", + "target": "func:figures_paper/scripts/make_all_figures.py::_write_readme", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/style.py", + "target": "func:figures_paper/scripts/style.py::apply", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/style.py", + "target": "func:figures_paper/scripts/style.py::ensure_dirs", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/style.py", + "target": "func:figures_paper/scripts/style.py::save", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "file:figures_paper/scripts/style.py", + "target": "func:figures_paper/scripts/style.py::stat_box", + "type": "contains", + "direction": "forward", + "description": "文件定义的函数", + "weight": 0.6 + }, + { + "source": "func:code/compare_gnn.py::evaluate", + "target": "func:code/compare_gnn.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_vanilla_lgcn", + "target": "class:code/compare_gnn.py::MeanAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_learnw_lgcn", + "target": "class:code/compare_gnn.py::MeanAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_gat_lgcn", + "target": "class:code/compare_gnn.py::GATAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_sage_lgcn", + "target": "class:code/compare_gnn.py::SAGEAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_deep_lgcn", + "target": "class:code/compare_gnn.py::MeanAggLayer", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::make_wide_lgcn", + "target": "func:code/compare_gnn.py::make_vanilla_lgcn", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::run_trial", + "target": "func:code/compare_gnn.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::run_trial", + "target": "func:code/compare_gnn.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::run_trial", + "target": "func:code/compare_gnn.py::sample_hard_neg", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/compare_gnn.py::run_trial", + "target": "func:code/compare_gnn.py::evaluate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/content_rich_ablation.py::main", + "target": "func:code/content_rich_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/content_rich_ablation.py::main", + "target": "func:code/content_rich_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/content_rich_ablation.py::main", + "target": "func:code/content_rich_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/content_rich_ablation.py::main", + "target": "func:code/content_rich_ablation.py::content_rich_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::score_at_threshold", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::score_features", + "target": "func:code/error_group_calibration.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::score_features", + "target": "func:code/error_group_calibration.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::score_features", + "target": "func:code/error_group_calibration.py::author_rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::group_threshold", + "target": "func:code/error_group_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::group_threshold", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::summarize_pred", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::summarize_pred", + "target": "func:code/error_group_calibration.py::load_submission_pred", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::build_val_test_context", + "target": "func:code/error_group_calibration.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::build_val_test_context", + "target": "func:code/error_group_calibration.py::score_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::build_val_test_context", + "target": "func:code/error_group_calibration.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::build_val_test_context", + "target": "func:code/error_group_calibration.py::build_feature_names", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::error_analysis", + "target": "func:code/error_group_calibration.py::bucket_cut", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::error_analysis", + "target": "func:code/error_group_calibration.py::bucket_quantile", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::error_analysis", + "target": "func:code/error_group_calibration.py::author_rank_position", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::error_analysis", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::add_agreement_features", + "target": "func:code/error_group_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::add_agreement_features", + "target": "func:code/error_group_calibration.py::author_rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::boundary_features", + "target": "func:code/error_group_calibration.py::author_rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::boundary_features", + "target": "func:code/error_group_calibration.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::build_val_test_context", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::load_submission_pred", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::score_at_threshold", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::error_analysis", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::summarize_pred", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::write_submission", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::bucket_cut", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::group_threshold", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::write_group_submission", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::add_agreement_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::boundary_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::average_predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/error_group_calibration.py::main", + "target": "func:code/error_group_calibration.py::fit_full_lgb", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/evaluate_val_checkpoints.py::main", + "target": "func:code/evaluate_val_checkpoints.py::load_train_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/evaluate_val_checkpoints.py::main", + "target": "func:code/evaluate_val_checkpoints.py::infer_layers", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/evaluate_val_checkpoints.py::main", + "target": "func:code/evaluate_val_checkpoints.py::score_model", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/evaluate_val_checkpoints.py::main", + "target": "func:code/evaluate_val_checkpoints.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::score_to_features", + "target": "func:code/extra_score_sources_ablation.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::score_to_features", + "target": "func:code/extra_score_sources_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "target": "class:code/extra_score_sources_ablation.py::MF", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "target": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::train_ranker_oof", + "target": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::content_mean_score", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::score_to_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::train_mf_bpr_score", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/extra_score_sources_ablation.py::main", + "target": "func:code/extra_score_sources_ablation.py::train_ranker_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/figures/gen_val_labels.py::main", + "target": "func:code/figures/gen_val_labels.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_conservative_rw_blends.py::main", + "target": "func:code/generate_conservative_rw_blends.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_conservative_rw_blends.py::main", + "target": "func:code/generate_conservative_rw_blends.py::write_ratio_submission", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_content_rich_submission.py::main", + "target": "func:code/generate_content_rich_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_content_rich_submission.py::main", + "target": "func:code/generate_content_rich_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::build", + "target": "func:code/generate_dot_submission.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::build", + "target": "func:code/generate_dot_submission.py::log_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "func:code/generate_dot_submission.py::build", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "class:code/generate_dot_submission.py::LightGCN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "func:code/generate_dot_submission.py::predict_dot", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "func:code/generate_dot_submission.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_dot_submission.py::main", + "target": "func:code/generate_dot_submission.py::write", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::build_features", + "target": "func:code/generate_ens6_submission.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::build_features", + "target": "func:code/generate_ens6_submission.py::log_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::predict", + "target": "func:code/generate_ens6_submission.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::main", + "target": "func:code/generate_ens6_submission.py::build_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::main", + "target": "func:code/generate_ens6_submission.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::main", + "target": "class:code/generate_ens6_submission.py::LightGCN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_ens6_submission.py::main", + "target": "func:code/generate_ens6_submission.py::predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_extra_bprmf_submission.py::main", + "target": "func:code/generate_extra_bprmf_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_extra_bprmf_submission.py::main", + "target": "func:code/generate_extra_bprmf_submission.py::train_mf_test_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_extra_bprmf_submission.py::main", + "target": "func:code/generate_extra_bprmf_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::build_features", + "target": "func:code/generate_large_ensemble_submission.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::build_features", + "target": "func:code/generate_large_ensemble_submission.py::log_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::predict", + "target": "func:code/generate_large_ensemble_submission.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::build_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "class:code/generate_large_ensemble_submission.py::LightGCN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::checkpoint_weight", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::write_threshold_submissions", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::percent_rank", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_large_ensemble_submission.py::main", + "target": "func:code/generate_large_ensemble_submission.py::write_top_ratio_submissions", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_node2vec_deepwalk_submission.py::main", + "target": "func:code/generate_node2vec_deepwalk_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_node2vec_deepwalk_submission.py::main", + "target": "func:code/generate_node2vec_deepwalk_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "target": "func:code/generate_post95_submission.py::score_cache_path", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "target": "func:code/generate_post95_submission.py::checkpoint_for_score", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "target": "func:code/generate_post95_submission.py::infer_layers", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "target": "func:code/generate_post95_submission.py::infer_mode", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_val_path_on_test", + "target": "func:code/generate_post95_submission.py::score_cache_path", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_val_path_on_test", + "target": "func:code/generate_post95_submission.py::ensemble_member_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::score_val_path_on_test", + "target": "func:code/generate_post95_submission.py::score_checkpoint_on_test", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::topk_content_similarity_fast", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::select_variant_val_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::variant_feature_matrix", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::score_val_path_on_test", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_post95_submission.py::main", + "target": "func:code/generate_post95_submission.py::make_submissions", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_ensemble_submission.py::main", + "target": "func:code/generate_randomwalk_ensemble_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_ensemble_submission.py::main", + "target": "func:code/generate_randomwalk_ensemble_submission.py::aggregate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_ensemble_submission.py::main", + "target": "func:code/generate_randomwalk_ensemble_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_single_submission.py::main", + "target": "func:code/generate_randomwalk_single_submission.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/generate_randomwalk_single_submission.py::main", + "target": "func:code/generate_randomwalk_single_submission.py::make_subs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order", + "target": "func:code/high_order_graph_stack.py::row_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order", + "target": "func:code/high_order_graph_stack.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order", + "target": "func:code/high_order_graph_stack.py::topk_prune_rows", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order", + "target": "func:code/high_order_graph_stack.py::extract_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order_directed", + "target": "func:code/high_order_graph_stack.py::row_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order_directed", + "target": "func:code/high_order_graph_stack.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order_directed", + "target": "func:code/high_order_graph_stack.py::topk_prune_rows", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::build_high_order_directed", + "target": "func:code/high_order_graph_stack.py::extract_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::build_high_order", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::build_high_order_directed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::fit_full_predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_graph_stack.py::main", + "target": "func:code/high_order_graph_stack.py::write_ratio_submission", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_model_compare.py::main", + "target": "func:code/high_order_model_compare.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_model_compare.py::main", + "target": "func:code/high_order_model_compare.py::fit_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/high_order_model_compare.py::main", + "target": "func:code/high_order_model_compare.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/make_notebook_style_split.py::main", + "target": "func:code/make_notebook_style_split.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "target": "func:code/node2vec_deepwalk_ablation.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "target": "func:code/node2vec_deepwalk_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::build_graph", + "target": "func:code/node2vec_deepwalk_ablation.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::train_deepwalk", + "target": "func:code/node2vec_deepwalk_ablation.py::deepwalk_walks", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "target": "func:code/node2vec_deepwalk_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "target": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::build_current_best_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::build_graph", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::train_deepwalk", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::train_node2vec", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::pair_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/node2vec_deepwalk_ablation.py::main", + "target": "func:code/node2vec_deepwalk_ablation.py::score_to_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::error_analysis", + "target": "func:code/post95_ablation.py::bucket_series", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::error_analysis", + "target": "func:code/post95_ablation.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::group_threshold", + "target": "func:code/post95_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::group_threshold", + "target": "func:code/post95_ablation.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::author_quota_tuning", + "target": "func:code/post95_ablation.py::bucket_series", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::author_quota_tuning", + "target": "func:code/post95_ablation.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::negative_evidence_features", + "target": "func:code/post95_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "target": "func:code/post95_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "target": "func:code/post95_ablation.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "target": "func:code/post95_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::error_analysis", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::bucket_series", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::group_threshold", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::author_quota_tuning", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::negative_evidence_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::topk_content_similarity", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/post95_ablation.py::main", + "target": "func:code/post95_ablation.py::load_lgcn_variant_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::small_configs", + "target": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::graph_configs", + "target": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::extra_configs", + "target": "class:code/randomwalk_systematic_ablation.py::RWConfig", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::build_graph", + "target": "func:code/randomwalk_systematic_ablation.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::train_model", + "target": "func:code/randomwalk_systematic_ablation.py::deepwalk_walks", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "target": "func:code/randomwalk_systematic_ablation.py::embedding_arrays", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "target": "func:code/randomwalk_systematic_ablation.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::build_base_features", + "target": "func:code/randomwalk_systematic_ablation.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::build_base_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::small_configs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::graph_configs", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::build_graph", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::train_model", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::pair_feature_block", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/randomwalk_systematic_ablation.py::main", + "target": "func:code/randomwalk_systematic_ablation.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::fit_lgb_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::fit_full_predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/rich_randomwalk_stack.py::main", + "target": "func:code/rich_randomwalk_stack.py::write_sub", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::evaluate", + "target": "func:code/run_final.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::predict_cos_batched", + "target": "func:code/run_final.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "func:code/run_final.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "func:code/run_final.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "class:code/run_final.py::LightGCNRecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "func:code/run_final.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_final.py::train_model", + "target": "func:code/run_final.py::evaluate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_improved.py::run_experiment", + "target": "func:code/run_improved.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_improved.py::run_experiment", + "target": "class:code/run_improved.py::ImprovedHeteroGNN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_improved.py::run_experiment", + "target": "func:code/run_improved.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_improved.py::run_experiment", + "target": "func:code/run_improved.py::evaluate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::predict_batched", + "target": "func:code/run_lgcn_final.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::train_lgcn", + "target": "func:code/run_lgcn_final.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::train_lgcn", + "target": "func:code/run_lgcn_final.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::train_lgcn", + "target": "class:code/run_lgcn_final.py::LightGCN", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_final.py::train_lgcn", + "target": "func:code/run_lgcn_final.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::predict_cos", + "target": "func:code/run_lgcn_v2.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::train", + "target": "func:code/run_lgcn_v2.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::train", + "target": "func:code/run_lgcn_v2.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::train", + "target": "class:code/run_lgcn_v2.py::LightGCN_Norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_lgcn_v2.py::train", + "target": "func:code/run_lgcn_v2.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::predict_cos_batched", + "target": "func:code/run_ultimate.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_lightgcn", + "target": "func:code/run_ultimate.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_lightgcn", + "target": "func:code/run_ultimate.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_lightgcn", + "target": "class:code/run_ultimate.py::LightGCNRecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_lightgcn", + "target": "func:code/run_ultimate.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_sage", + "target": "func:code/run_ultimate.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_sage", + "target": "func:code/run_ultimate.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_sage", + "target": "class:code/run_ultimate.py::SAGERecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_ultimate.py::train_sage", + "target": "func:code/run_ultimate.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::evaluate", + "target": "func:code/run_v2.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::predict_cos", + "target": "func:code/run_v2.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::run_experiment", + "target": "func:code/run_v2.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::run_experiment", + "target": "class:code/run_v2.py::Recommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::run_experiment", + "target": "func:code/run_v2.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::run_experiment", + "target": "func:code/run_v2.py::evaluate", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/run_v2.py::predict_batched", + "target": "func:code/run_v2.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::add_score_block", + "target": "func:code/score_level_meta_stack.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::add_score_block", + "target": "func:code/score_level_meta_stack.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::add_score_block", + "target": "func:code/score_level_meta_stack.py::author_rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::load_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::load_sources", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::add_score_block", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::fit_oof_predict", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::prf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/score_level_meta_stack.py::main", + "target": "func:code/score_level_meta_stack.py::write_sub", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_dynamic_fusion.py::main", + "target": "func:code/search_dynamic_fusion.py::load_train_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_dynamic_fusion.py::main", + "target": "func:code/search_dynamic_fusion.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_dynamic_fusion.py::main", + "target": "func:code/search_dynamic_fusion.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_val_fusion.py::main", + "target": "func:code/search_val_fusion.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/search_val_fusion.py::main", + "target": "func:code/search_val_fusion.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::add_rank_features", + "target": "func:code/stack_rank_calibration.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::boundary_rerank", + "target": "func:code/stack_rank_calibration.py::zscore", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::boundary_rerank", + "target": "func:code/stack_rank_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::load_lgcn_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "class:code/stack_rank_calibration.py::ExplicitGraphFeatures", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::add_rank_features", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::fit_oof", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::boundary_rerank", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/stack_rank_calibration.py::main", + "target": "func:code/stack_rank_calibration.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_dynamic_feature_fusion.py::main", + "target": "func:code/train_dynamic_feature_fusion.py::load_train_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_dynamic_feature_fusion.py::main", + "target": "class:code/train_dynamic_feature_fusion.py::FeatureBuilder", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_dynamic_feature_fusion.py::main", + "target": "func:code/train_dynamic_feature_fusion.py::rank01", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_dynamic_feature_fusion.py::main", + "target": "func:code/train_dynamic_feature_fusion.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_hgt_bpr.py::train_one", + "target": "class:code/train_val_hgt_bpr.py::HGTRecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_hgt_bpr.py::train_one", + "target": "func:code/train_val_hgt_bpr.py::predict_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_hgt_bpr.py::main", + "target": "func:code/train_val_hgt_bpr.py::load_lgcn_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_hgt_bpr.py::main", + "target": "func:code/train_val_hgt_bpr.py::train_one", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::make_notebook_style_split", + "target": "func:code/train_val_lgcn_ensemble.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::build_parts", + "target": "func:code/train_val_lgcn_ensemble.py::make_notebook_style_split", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::build_parts", + "target": "func:code/train_val_lgcn_ensemble.py::read_txt", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::build_parts", + "target": "func:code/train_val_lgcn_ensemble.py::log_norm", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::predict_scores", + "target": "func:code/train_val_lgcn_ensemble.py::cos_sim", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::train_one", + "target": "func:code/train_val_lgcn_ensemble.py::set_seed", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::train_one", + "target": "func:code/train_val_lgcn_ensemble.py::sample_hard_negatives", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::train_one", + "target": "func:code/train_val_lgcn_ensemble.py::predict_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::train_one", + "target": "func:code/train_val_lgcn_ensemble.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::main", + "target": "func:code/train_val_lgcn_ensemble.py::build_parts", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::main", + "target": "func:code/train_val_lgcn_ensemble.py::build_data", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::main", + "target": "func:code/train_val_lgcn_ensemble.py::train_one", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_lgcn_ensemble.py::main", + "target": "func:code/train_val_lgcn_ensemble.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_mf_bpr.py::main", + "target": "class:code/train_val_mf_bpr.py::MF", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_mf_bpr.py::main", + "target": "func:code/train_val_mf_bpr.py::best_f1", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_sage_bpr.py::train_one", + "target": "class:code/train_val_sage_bpr.py::SAGERecommender", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_sage_bpr.py::train_one", + "target": "func:code/train_val_sage_bpr.py::predict_scores", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_sage_bpr.py::main", + "target": "func:code/train_val_sage_bpr.py::load_lgcn_module", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:code/train_val_sage_bpr.py::main", + "target": "func:code/train_val_sage_bpr.py::train_one", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/fig2_sparsity.py::_panel_ccdf", + "target": "func:figures_paper/scripts/fig2_sparsity.py::_ccdf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/fig2_sparsity.py::make", + "target": "func:figures_paper/scripts/fig2_sparsity.py::_panel_ccdf", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/fig4_architecture.py::make", + "target": "func:figures_paper/scripts/fig4_architecture.py::_box", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/fig4_architecture.py::make", + "target": "func:figures_paper/scripts/fig4_architecture.py::_arrow", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/make_all_figures.py::main", + "target": "func:figures_paper/scripts/make_all_figures.py::_load", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "func:figures_paper/scripts/make_all_figures.py::main", + "target": "func:figures_paper/scripts/make_all_figures.py::_write_readme", + "type": "calls", + "direction": "forward", + "description": "同文件内调用", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/04_lightgcn_from_first_principles.md", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "target": "file:code/stack_rank_calibration.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "target": "file:code/high_order_graph_stack.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/07_high_order_citation_propagation.md", + "target": "file:code/high_order_graph_stack.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/06_random_walk_features.md", + "target": "file:code/randomwalk_systematic_ablation.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/06_random_walk_features.md", + "target": "file:code/generate_randomwalk_ensemble_submission.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/03_data_flow_and_artifacts.md", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/03_data_flow_and_artifacts.md", + "target": "file:code/high_order_graph_stack.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/10_code_map_and_entrypoints.md", + "target": "file:code/high_order_graph_stack.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/10_code_map_and_entrypoints.md", + "target": "file:code/train_val_lgcn_ensemble.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + }, + { + "source": "file:docs_first_principles/10_code_map_and_entrypoints.md", + "target": "file:code/stack_rank_calibration.py", + "type": "documents", + "direction": "forward", + "description": "文档解释该脚本", + "weight": 0.5 + } + ], + "layers": [ + { + "id": "L1", + "name": "数据与共享地基 (Data & Shared Foundation)", + "description": "读三类边 + feature.pkl、确定性 1:1 验证切分(seed=202)、best_f1 评估。两大事实共享库被全流水线 load_module 加载。", + "nodeIds": [ + "file:code/make_notebook_style_split.py", + "file:code/stack_rank_calibration.py", + "file:code/train_val_lgcn_ensemble.py" + ] + }, + { + "id": "L2", + "name": "LightGCN 集成主分数 (Primary Score)", + "description": "无权重/无非线性的异构协同过滤 + BPR + 硬负采样,多 seed/维集成,产 val_vanilla_ensemble_mean.npy 主分数(验证 0.9386)。", + "nodeIds": [ + "file:code/train_val_lgcn_ensemble.py" + ] + }, + { + "id": "L3", + "name": "分数变体聚合 (Variant Aggregation)", + "description": "20 个 LightGCN 变体分数做 zscore+rank01 聚合、top-k 内容相似度、负证据。Post95→BPR-MF。验证 0.9571→0.9593。", + "nodeIds": [ + "file:code/extra_score_sources_ablation.py", + "file:code/generate_extra_bprmf_submission.py", + "file:code/generate_post95_submission.py", + "file:code/post95_ablation.py" + ] + }, + { + "id": "L4", + "name": "内容语义特征 (Content)", + "description": "从 512-d USE 论文嵌入抽作者/候选内容画像(18 维),CF 之外的语义互补视角。验证 ≈0.9599。", + "nodeIds": [ + "file:code/content_rich_ablation.py", + "file:code/generate_content_rich_submission.py" + ] + }, + { + "id": "L5", + "name": "随机游走特征 (Random Walk)", + "description": "7 个 DeepWalk/Node2Vec 配置产全局接近度嵌入(每块 11 维)+ 一致性聚合,补 LightGCN 局部 CF 看不到的全局尺度。验证 0.9621→0.9649。", + "nodeIds": [ + "file:code/generate_conservative_rw_blends.py", + "file:code/generate_node2vec_deepwalk_submission.py", + "file:code/generate_randomwalk_ensemble_submission.py", + "file:code/generate_randomwalk_single_submission.py", + "file:code/node2vec_deepwalk_ablation.py", + "file:code/randomwalk_ensemble_ablation.py", + "file:code/randomwalk_one_ablation.py", + "file:code/randomwalk_systematic_ablation.py", + "file:code/rich_randomwalk_stack.py" + ] + }, + { + "id": "L6", + "name": "最终堆叠与高阶传播 (Final Stack & High-order)", + "description": "【最终方法】259 维特征上的 LightGBM meta-learner;高阶有向引用传播 H_k=R·C^k / G_k=S·R·C^k(fwd/bwd/undir)是核心增益。验证 0.9669 / 公开 0.96626。", + "nodeIds": [ + "file:code/high_order_graph_stack.py", + "file:code/high_order_model_compare.py" + ] + }, + { + "id": "L7", + "name": "校准/误差/搜索 (Calibration, Error, Search)", + "description": "误差分桶、校准曲线、ratio/threshold 搜索,论证 rank-cutoff 决策并选最优提交。", + "nodeIds": [ + "file:code/error_group_calibration.py", + "file:code/evaluate_val_checkpoints.py", + "file:code/score_level_meta_stack.py", + "file:code/search_dynamic_fusion.py", + "file:code/search_val_fusion.py" + ] + }, + { + "id": "L8", + "name": "提交生成 (Submission Generation)", + "description": "各阶段从 checkpoint/分数生成 Kaggle 提交 CSV(Index,Predicted)。", + "nodeIds": [ + "file:code/generate_conservative_rw_blends.py", + "file:code/generate_content_rich_submission.py", + "file:code/generate_dot_submission.py", + "file:code/generate_ens6_submission.py", + "file:code/generate_extra_bprmf_submission.py", + "file:code/generate_large_ensemble_submission.py", + "file:code/generate_node2vec_deepwalk_submission.py", + "file:code/generate_post95_submission.py", + "file:code/generate_randomwalk_ensemble_submission.py", + "file:code/generate_randomwalk_single_submission.py" + ] + }, + { + "id": "L9", + "name": "可视化 (Visualization)", + "description": "两套论文图脚本:code/figures/(主图 + 补齐 y/特征重要性)与 figures_paper/scripts/(11 图集)。", + "nodeIds": [ + "file:code/figures/fig1_dataset_overview.py", + "file:code/figures/fig10_rw_ensemble_size.py", + "file:code/figures/fig2_framework.py", + "file:code/figures/fig3_progression.py", + "file:code/figures/fig4_highorder_ablation.py", + "file:code/figures/fig5_pr_roc.py", + "file:code/figures/fig6_feature_contribution.py", + "file:code/figures/fig7_error_analysis.py", + "file:code/figures/fig8_lgcn_ensemble_correlation.py", + "file:code/figures/fig9_lgcn_hyperparam.py", + "file:code/figures/gen_val_labels.py", + "file:code/figures/plot_style.py", + "file:figures_paper/README_figures.md", + "file:figures_paper/scripts/fig1_graph_overview.py", + "file:figures_paper/scripts/fig2_sparsity.py", + "file:figures_paper/scripts/fig3_roadmap.py", + "file:figures_paper/scripts/fig4_architecture.py", + "file:figures_paper/scripts/fig5_ablation_highorder.py", + "file:figures_paper/scripts/fig6_rank_vs_threshold.py", + "file:figures_paper/scripts/fig7_error_heatmap.py", + "file:figures_paper/scripts/figA1_hyperparam.py", + "file:figures_paper/scripts/figA2_rw_ablation.py", + "file:figures_paper/scripts/figA3_feature_importance.py", + "file:figures_paper/scripts/figA4_oof_pr.py", + "file:figures_paper/scripts/make_all_figures.py", + "file:figures_paper/scripts/style.py" + ] + }, + { + "id": "L10", + "name": "文档与报告 (Docs & Reports)", + "description": "第一性原理文档包(权威事实表 _fact_sheet)+ reports 叙事 + 任务规格。", + "nodeIds": [ + "file:CLAUDE_zh.md", + "file:CLAUDE.md", + "file:data_and_docs/advice.md", + "file:data_and_docs/dataset.md", + "file:data_and_docs/project_description.md", + "file:data_and_docs/project_evaluation.md", + "file:data_and_docs/project-example-2026-pygver.ipynb", + "file:data_and_docs/proposal.md", + "file:data_and_docs/references.md", + "file:docs_first_principles/_fact_sheet.md", + "file:docs_first_principles/00_README.md", + "file:docs_first_principles/01_problem_and_dataset.md", + "file:docs_first_principles/02_architecture_overview.md", + "file:docs_first_principles/03_data_flow_and_artifacts.md", + "file:docs_first_principles/04_lightgcn_from_first_principles.md", + "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "file:docs_first_principles/06_random_walk_features.md", + "file:docs_first_principles/07_high_order_citation_propagation.md", + "file:docs_first_principles/08_calibration_and_rank_cutoff.md", + "file:docs_first_principles/09_experiment_timeline.md", + "file:docs_first_principles/10_code_map_and_entrypoints.md", + "file:docs_first_principles/11_figures_and_paper_mapping.md", + "file:docs_first_principles/12_reproduction_guide.md", + "file:docs_first_principles/13_common_questions_for_the_author.md", + "file:docs_first_principles/SUMMARY_FOR_PAPER.md", + "file:notes/experiment_history.md", + "file:README.md", + "file:reports/exploration_summary.md", + "file:reports/final_report.md", + "file:reports/paper_writing_guide.md", + "file:reports/preliminary_report.md", + "file:WORKSPACE_STATUS.md" + ] + }, + { + "id": "L11", + "name": "配置与环境 (Config & Environment)", + "description": "Conda/最小依赖/pinned 版本快照。", + "nodeIds": [ + "file:env/conda-list-cs3319.txt", + "file:env/environment-cs3319.yml", + "file:env/requirements-minimal.txt" + ] + }, + { + "id": "L12", + "name": "遗留原型 (Legacy Prototypes)", + "description": "早期 run_*/compare_gnn,硬编码 /home/lzc 路径、无 argparse,仅供溯源不可直接运行。", + "nodeIds": [ + "file:code/compare_gnn.py", + "file:code/run_baseline.py", + "file:code/run_final.py", + "file:code/run_graph_features.py", + "file:code/run_improved.py", + "file:code/run_lgcn_final.py", + "file:code/run_lgcn_v2.py", + "file:code/run_ultimate.py", + "file:code/run_v2.py" + ] + } + ], + "tour": [ + { + "order": 1, + "title": "任务与数据集", + "description": "先读任务定义:异构学术网络(6611 作者/79937 论文)上的 author-paper 二部图链路预测,对 2.05M 测试对输出 0/1,公开榜评 50%,指标 F1。理解稀疏(密度 1.29e-3)与长尾(56% 作者度=1)难度。", + "nodeIds": [ + "file:docs_first_principles/01_problem_and_dataset.md", + "file:data_and_docs/project_description.md", + "file:data_and_docs/dataset.md" + ], + "languageLesson": "F1 为指标;公开榜只评测 50% 测试集,这与最终选择 rank-cutoff 而非概率阈值直接相关。" + }, + { + "order": 2, + "title": "整体两阶段架构", + "description": "Stage-1 多源生产 raw 分数/嵌入(LightGCN/BPR-MF/RW/content/高阶)→ Stage-2 用 259 维 LightGBM meta-learner 融合 → rank-cutoff top 50% 决策。先建立全局图再钻细节。", + "nodeIds": [ + "file:docs_first_principles/02_architecture_overview.md", + "file:docs_first_principles/SUMMARY_FOR_PAPER.md" + ], + "languageLesson": "stacking 的本质:把多个互补视角交给一个 calibrator 联合裁决。" + }, + { + "order": 3, + "title": "数据流与产物", + "description": "txt → make_notebook_style_split(seed=202)→ 136484 对 1:1 验证集 → val_*/test_*_oof.npy 分数 → submission。掌握 .npy 文件名约定与 feature_cache 缓存,这是读懂后续脚本的钥匙。", + "nodeIds": [ + "file:docs_first_principles/03_data_flow_and_artifacts.md", + "file:code/train_val_lgcn_ensemble.py" + ], + "languageLesson": "--split-seed 是 load-bearing:种子 baked 进每个分数文件,换 seed 必须端到端重跑。" + }, + { + "order": 4, + "title": "共享地基:两大事实库", + "description": "无 utils.py,脚本用 importlib load_module 互相当库加载。train_val_lgcn_ensemble.py(数据/切分/best_f1)与 stack_rank_calibration.py(显式图特征/rank)是两大共享库,各被 ~14 个脚本加载——改动它们会波及全流水线。", + "nodeIds": [ + "file:code/train_val_lgcn_ensemble.py", + "file:code/stack_rank_calibration.py" + ], + "languageLesson": "load_module(importlib.util)是本仓库代码复用的核心机制,也是图上 imports 边的骨干。" + }, + { + "order": 5, + "title": "LightGCN 主分数", + "description": "为何'轻'?删掉所有权重矩阵与非线性,只做入度归一邻居聚合 + 点积解码 + BPR + 硬负采样。在极稀疏图上比过参数化 GNN 更稳更强。验证 0.9386,是后续堆叠的主分数源。", + "nodeIds": [ + "file:docs_first_principles/04_lightgcn_from_first_principles.md", + "file:code/train_val_lgcn_ensemble.py" + ], + "languageLesson": "推荐任务里:CF 前端越简洁越不易过拟合稀疏图噪声,特征交互交给后端 LightGBM。" + }, + { + "order": 6, + "title": "meta-path 堆叠 = 单阶段最大增益", + "description": "LightGCN 学的是局部隐式 CF,看不见'合著者读过哪些论文''我读的论文引用了哪些候选'这类显式多跳结构。把它们做成 ~76 维手工特征喂 LightGBM,验证 0.939→0.956(+0.0174,全程最大跃迁)。", + "nodeIds": [ + "file:docs_first_principles/05_feature_stacking_and_lightgbm.md", + "file:code/stack_rank_calibration.py" + ], + "languageLesson": "'模型不确定的'+'图结构明确告诉你的'两条信息源交给 calibrator 联合裁决 = stacking 的价值。" + }, + { + "order": 7, + "title": "随机游走补全局接近度", + "description": "DeepWalk/Node2Vec 在二部/合著/引用图上随机游走 + Word2Vec,捕获 LightGCN 局部 CF 看不到的全局接近度。系统化 7 块配置 + 一致性聚合,验证 →0.9649。但注意:验证对'堆更多同源模型'系统性偏乐观(公开分反略降)。", + "nodeIds": [ + "file:docs_first_principles/06_random_walk_features.md", + "file:code/randomwalk_systematic_ablation.py", + "file:code/generate_randomwalk_ensemble_submission.py" + ], + "languageLesson": "1:1 人工平衡验证集会高估同源模型堆叠——这是放弃验证最优阈值的直接原因。" + }, + { + "order": 8, + "title": "高阶有向引用传播 = 核心贡献", + "description": "最终增益来源:H_k=R·C^k(作者历史论文 k 步引用扩散)、G_k=S·R·C^k(合著者历史论文扩散),fwd/bwd/undir 三向。消融 108→190→214→259 维,验证 0.9643→0.9669、公开 0.96252→0.96626。方向性抓住了 LightGCN/无向聚合无法区分的引用因果结构。", + "nodeIds": [ + "file:docs_first_principles/07_high_order_citation_propagation.md", + "file:code/high_order_graph_stack.py" + ], + "languageLesson": "把'我读过的论文→它引用/被引用的论文→候选'这条有向语义链路显式建模成稀疏矩阵幂,可解释且有效。" + }, + { + "order": 9, + "title": "决策:rank-cutoff 而非概率阈值", + "description": "验证最优概率阈值 0.4617 迁移到 test 后正例率漂移到 0.5242(多 2.4pt)。改用 rank top 50% + 强制 test_known_mask(524,083 条训练-测试重叠正边)为 1,正例率精确锁 0.5。这就是最终 0.96626 的来源。", + "nodeIds": [ + "file:docs_first_principles/08_calibration_and_rank_cutoff.md", + "file:code/error_group_calibration.py" + ], + "languageLesson": "分布漂移下,rank-cutoff 比 probability threshold 更稳健——校准问题的工程化解法。" + }, + { + "order": 10, + "title": "复现与核验", + "description": "最短路径:已有 submission 直接核验;或从缓存重生成 high_order_graph_stack。所有中间产物已缓存于包内,通常只需重跑改动的那一阶段。", + "nodeIds": [ + "file:docs_first_principles/12_reproduction_guide.md", + "file:README.md", + "file:docs_first_principles/_fact_sheet.md" + ], + "languageLesson": "权威数字一律以 _fact_sheet.md(状态日期 2026-06-18)为准,叙述与事实表冲突时以事实表为准。" + } + ] +} \ No newline at end of file diff --git a/.understand-anything/meta.json b/.understand-anything/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..893ca39ff82e953752f3d70d770c3316db60fe3d --- /dev/null +++ b/.understand-anything/meta.json @@ -0,0 +1,6 @@ +{ + "lastAnalyzedAt": "2026-06-18T00:00:00Z", + "gitCommitHash": "non-git-local", + "version": "2.8.0", + "analyzedFiles": 102 +} \ No newline at end of file diff --git a/.understand-anything/tmp/build_graph.py b/.understand-anything/tmp/build_graph.py new file mode 100644 index 0000000000000000000000000000000000000000..d8ccf1bebdfaf034090f82c2441c74d6472f7d45 --- /dev/null +++ b/.understand-anything/tmp/build_graph.py @@ -0,0 +1,471 @@ +# -*- coding: utf-8 -*- +"""Build knowledge-graph.json for the CS3319 repo from deterministic structure +(extract-structure.mjs output) + curated Chinese summaries/layers/tour grounded +in docs_first_principles/. Run: python build_graph.py""" +import json, re, os +from pathlib import Path + +ROOT = Path("D:/reps/26H1_cs3319_final_deliverable") +UA = ROOT / ".understand-anything" +INT = UA / "intermediate" +TMP = UA / "tmp" + +scan = json.load(open(INT / "scan-result.json")) +imap = json.load(open(INT / "import-map.json"))["importMap"] +struct = {r["path"]: r for r in json.load(open(TMP / "struct-output.json"))["results"]} + +# ---- detect load_module edges per source (for edge descriptions) ---- +loadmod_targets = {} # src -> set(targets) +lm_re = re.compile(r'load_module\(\s*["\'][^"\']*["\']\s*,\s*[^)]*?["\']([A-Za-z0-9_\-]+\.py)["\']') +for f in scan["files"]: + p = ROOT / f["path"] + if p.suffix != ".py" or not p.exists(): + continue + try: + txt = p.read_text(encoding="utf-8", errors="ignore") + except Exception: + continue + tgts = set() + for m in lm_re.finditer(txt): + name = m.group(1) + cand = f"code/{name}" + if cand in struct: + tgts.add(cand) + if tgts: + loadmod_targets[f["path"]] = tgts + +# ---- complexity heuristic ---- +def complexity(total_lines, fn, cl): + if total_lines >= 320 or (fn + cl) >= 14: + return "complex" + if total_lines >= 110 or (fn + cl) >= 6: + return "moderate" + return "simple" + +# ---- node type from fileCategory ---- +def node_type(fcat, lang): + if fcat in ("config",) or lang in ("yaml",): + return "config" + if fcat in ("docs",) or lang in ("markdown", "txt"): + return "document" + return "file" + +# ==================== CURATED FILE SUMMARIES (Chinese) ==================== +FILE_SUM = { + # ---- data loading / split / shared lib ---- + "code/train_val_lgcn_ensemble.py": "两大事实共享库之一。定义数据载入(build_parts/build_data 读三类边 + feature.pkl)、确定性验证切分 make_notebook_style_split(seed=202, train_frac=0.9:留出 10% 正边 + 等量随机负边 = 136,484 对 1:1)、LightGCN 异构 CF 集成训练、best_f1()(PR 曲线 argmax 取最优 F1 阈值)。被 ~14 个下游脚本以 load_module 加载,是整个流水线的地基。", + "code/stack_rank_calibration.py": "两大事实共享库之一。定义 ExplicitGraphFeatures(18 维显式图/meta-path 特征:A-A-P/A-P-P/A-P-A-P 共同邻居、度等)与 add_rank_features(把任意分数转 score/global_rank/author_pct/author_rank 4 列)。被每个 stacker 加载,提供 Stage-2 的手工图特征骨架。", + "code/make_notebook_style_split.py": "切分脚本的独立早期版本(只写 splits/),非堆叠链使用。真正被流水线调用的是 train_val_lgcn_ensemble.py 内的同名函数。遗留参考。", + # ---- final method / high-order ---- + "code/high_order_graph_stack.py": "【最终方法入口】Stage-2 LightGBM meta-learner。core:build_high_order(H_k=R·C^k 作者历史论文 k 步引用扩散,无向 24 维)、build_high_order_directed(G_k=S·R·C^k 合著者历史论文扩散,fwd/bwd/undir 三向 45 维);拼出 259 维特征 X_best;fit_lgb_oof(5-fold)→fit_full_predict;write_ratio_submission rank-cutoff top 50% + test_known_mask 强制 1。验证 F1 0.966874 / 公开 0.96626。硬编码稀疏矩阵形状 6611×79937。", + "code/high_order_model_compare.py": "高阶传播变体对比实验:无向 vs 有向 vs 不同 k 值的 OOF F1/AUC 对照,支撑 high_order_graph_stack 的消融结论。", + # ---- score variant aggregation ---- + "code/generate_post95_submission.py": "Post95 阶段:对 20 个 LightGCN 变体分数做 zscore+rank01 聚合(variant_feature_matrix 43 维),含 topk_content_similarity_fast(top-k 内容相似度 3 维)。选 top-N GNN 分数变体并生成 test 对应分数。验证 F1 0.95711。", + "code/post95_ablation.py": "定义 negative_evidence_features(8 维负证据:候选论文被多少作者读过等),被多个 stacker load_module 加载。Post95 阶段的特征消融脚本。", + "code/extra_score_sources_ablation.py": "额外分数源:content_mean_score(作者历史论文 embedding 均值 · 候选向量,content_mean 4 维)、score_to_features(BPR-MF 分数 4 维)、BPR-MF(dim=256)。验证 F1 0.95763(content mean)→0.95931(BPR-MF)。", + # ---- content rich ---- + "code/content_rich_ablation.py": "从 512-d USE 论文嵌入(feature.pkl)直接抽 18 维作者/候选内容画像(content_rich_features)。命中 feature_cache 缓存。验证 F1 ≈0.95990。", + "code/generate_content_rich_submission.py": "基于 content_rich 特征生成提交 CSV 的脚本。", + # ---- random walk ---- + "code/randomwalk_systematic_ablation.py": "系统化随机游走:7 个 DeepWalk/Node2Vec 配置(d128/d256, l40/l80),每块 pair_feature_block 产 11 维;build_base_features 拼出 84 维 X_base。Word2Vec 模型缓存于 randomwalk_systematic/models/,pair 特征缓存于 pair_features/*.npz。验证 F1 0.96492。", + "code/node2vec_deepwalk_ablation.py": "随机游走早期单配置消融(初版 DeepWalk/Node2Vec),验证 F1 0.96212。被 randomwalk_systematic 取代。", + "code/generate_randomwalk_ensemble_submission.py": "aggregate():把 7 个 RW 块做一致性聚合(11 维);生成 RW 集成提交。", + "code/generate_randomwalk_single_submission.py": "单个 RW 配置的提交生成(对照用)。", + "code/randomwalk_ensemble_ablation.py": "RW 集成规模消融(5 vs 7 块)的薄封装。", + "code/randomwalk_one_ablation.py": "单个 RW 块的 OOF 消融。", + "code/rich_randomwalk_stack.py": "rich content + RW 联合 stacker,衔接 content_rich 与 randomwalk_systematic。", + # ---- training models ---- + "code/train_val_mf_bpr.py": "BPR 矩阵分解训练器(dim 可配),为 extra_score_sources 提供 bpr_mf 分数。", + "code/train_val_hgt_bpr.py": "HGT(异构图 Transformer)+ BPR 训练实验,未进入最终集成(探索性)。", + "code/train_val_sage_bpr.py": "GraphSAGE + BPR 训练实验,探索性对比。", + "code/train_dynamic_feature_fusion.py": "动态特征融合 stacker(融合多源分数),探索性。", + # ---- calibration / error / search ---- + "code/error_group_calibration.py": "误差分桶分析:按作者度/论文度分桶算 F1(冷启动低度节点性能下降)、校准曲线、ratio-F1。论证 rank-cutoff 决策。", + "code/score_level_meta_stack.py": "分数级 meta-stack:在原始分数层做二级融合实验。", + "code/search_dynamic_fusion.py": "动态融合超参/权重搜索。", + "code/search_val_fusion.py": "验证集融合权重搜索。", + "code/evaluate_val_checkpoints.py": "评估验证集上多个 checkpoint 的分数,选最佳。", + # ---- submission generators ---- + "code/generate_ens6_submission.py": "从 checkpoint 重生成 6-model LightGCN 集成提交(sub_ens6_t0.36.csv,公开 0.93044)。", + "code/generate_large_ensemble_submission.py": "大集成(多 LightGCN 变体)提交生成。", + "code/generate_dot_submission.py": "点积解码变体提交生成。", + "code/generate_extra_bprmf_submission.py": "BPR-MF 额外分数提交生成。", + "code/generate_node2vec_deepwalk_submission.py": "Node2Vec/DeepWalk 分数提交生成。", + "code/generate_conservative_rw_blends.py": "保守 RW 混合权重实验。", + "code/compare_gnn.py": "【legacy】多 GNN(LightGCN/GAT/SAGE/MeanAgg)对比实验,硬编码 /home/lzc 路径、无 argparse。仅供溯源。", + # ---- legacy run_*.py ---- + "code/run_baseline.py": "【legacy】官方 notebook 基线:HeteroMeanConv + hinge/cosine + 阈值搜索。≈0.8850。硬编码路径。", + "code/run_improved.py": "【legacy】基线改进:SAGEConv+残差/layernorm/MLP 解码器实验。", + "code/run_v2.py": "【legacy】v2 阶段实验脚本。", + "code/run_final.py": "【legacy】final 阶段实验脚本。", + "code/run_ultimate.py": "【legacy】ultimate 阶段实验脚本。", + "code/run_graph_features.py": "【legacy】手工图特征实验早期版。", + "code/run_lgcn_final.py": "【legacy】LightGCN final 阶段。", + "code/run_lgcn_v2.py": "【legacy】LightGCN v2 阶段。", + # ---- figures (code/figures) ---- + "code/figures/plot_style.py": "论文图表共享 seaborn 样式(whitegrid + deep/muted 调色板, pdf.fonttype=42 嵌 TrueType)。", + "code/figures/gen_val_labels.py": "补齐脚本:用 train_val_lgcn_ensemble.make_notebook_style_split(seed=202) 生成验证集标签 y(136484),并断言复算 best F1≈0.966874 证明行序对齐。", + "code/figures/fig1_dataset_overview.py": "图1 数据集概览:异构图统计 + 度分布 log-log + 幂律拟合。", + "code/figures/fig2_framework.py": "图2 两阶段堆叠框架示意图(Stage1 分数源→特征工程→Stage2 LightGBM→rank-cutoff)。", + "code/figures/fig3_progression.py": "图3【主角】方法演进三级跳:验证 F1(实线)+ 公开 LB(稀疏点线),标注三段突破。", + "code/figures/fig4_highorder_ablation.py": "图4 高阶传播消融:108/190/214/259 维四阶段 F1+AUC 柱状图。", + "code/figures/fig5_pr_roc.py": "图5 多模型 PR/ROC 曲线(需 gen_val_labels 的 y)。", + "code/figures/fig6_feature_contribution.py": "图6 特征贡献:按组聚合 importance + top-20 单特征。", + "code/figures/fig7_error_analysis.py": "图7 误差分析与决策稳健性:度分桶 F1 + 校准曲线 + ratio-F1 + 阈值漂移。", + "code/figures/fig8_lgcn_ensemble_correlation.py": "图8(附录)LightGCN 模型分数相关性热图。", + "code/figures/fig9_lgcn_hyperparam.py": "图9(附录)LightGCN 超参(dim×layers)热图。", + "code/figures/fig10_rw_ensemble_size.py": "图10(附录)RW 集成规模 vs F1。", + # ---- figures_paper/scripts ---- + "figures_paper/scripts/style.py": "figures_paper 图集共享 matplotlib 样式。", + "figures_paper/scripts/make_all_figures.py": "figures_paper 11 图集一键生成入口。", + "figures_paper/scripts/fig1_graph_overview.py": "figures_paper 图1 异构图结构概览。", + "figures_paper/scripts/fig2_sparsity.py": "figures_paper 图2 稀疏度/长尾分布。", + "figures_paper/scripts/fig3_roadmap.py": "figures_paper 图3 方法路线图。", + "figures_paper/scripts/fig4_architecture.py": "figures_paper 图4 架构图。", + "figures_paper/scripts/fig5_ablation_highorder.py": "figures_paper 图5 高阶消融。", + "figures_paper/scripts/fig6_rank_vs_threshold.py": "figures_paper 图6 rank vs threshold 决策对比。", + "figures_paper/scripts/fig7_error_heatmap.py": "figures_paper 图7 误差热图。", + "figures_paper/scripts/figA1_hyperparam.py": "figures_paper 附录图A1 超参。", + "figures_paper/scripts/figA2_rw_ablation.py": "figures_paper 附录图A2 RW 消融。", + "figures_paper/scripts/figA3_feature_importance.py": "figures_paper 附录图A3 特征重要性。", + "figures_paper/scripts/figA4_oof_pr.py": "figures_paper 附录图A4 OOF PR 曲线。", + # ---- docs ---- + "README.md": "项目主 README:结果表(公开 F1 链)+ 精确复现命令 + 核心脚本表。读这份拿结果数据。", + "CLAUDE.md": "Claude Code 工作指引:架构总览、CLI 约定、验证框架 dynamic_seed202、提交决策规则、关键约定与坑。", + "CLAUDE_zh.md": "CLAUDE.md 的中文版工作指引。", + "WORKSPACE_STATUS.md": "工作区状态备忘(2026-06-17),含目录存在性记录。", + "data_and_docs/advice.md": "课程建议/任务说明补充。", + "data_and_docs/dataset.md": "数据集字段说明(三类边文件 + feature.pkl)。", + "data_and_docs/project_description.md": "项目任务描述(author-paper 推荐,F1 评测)。", + "data_and_docs/project_evaluation.md": "评测细则(公开榜 50%、F1 系数、提交列名)。", + "data_and_docs/proposal.md": "项目提案(早期方案)。", + "data_and_docs/references.md": "参考文献列表。", + "data_and_docs/project-example-2026-pygver.ipynb": "官方示例 notebook(PyG 版),参考基线来源。", + "docs_first_principles/00_README.md": "【第一性原理文档包入口】导航地图 + 全局数字索引。15 篇中文文档的阅读顺序与一句话用途。", + "docs_first_principles/_fact_sheet.md": "【权威事实表】全部文档的数字真相源。§2 各阶段 F1、§2.4 高阶消融(108→190→214→259)、§2.5 259 维构成、§5 不一致台账、§6 代码定位。不直接进论文正文。", + "docs_first_principles/01_problem_and_dataset.md": "任务定义与数据集:异构图三类边、规模、F1 评测、稀疏/长尾难度。", + "docs_first_principles/02_architecture_overview.md": "两阶段 stacking 架构总览:Stage-1 多源 + Stage-2 LightGBM + rank-cutoff。", + "docs_first_principles/03_data_flow_and_artifacts.md": "数据流与产物:txt→切分→.npy 分数→OOF→submission,文件名约定与缓存。", + "docs_first_principles/04_lightgcn_from_first_principles.md": "LightGCN 第一性原理:为何轻、BPR+硬负采样、点积解码、主分数生产者。", + "docs_first_principles/05_feature_stacking_and_lightgbm.md": "手工图/meta-path 特征 + LightGBM 二阶段融合:为何 stacking 是单阶段最大增益(+0.0174)。", + "docs_first_principles/06_random_walk_features.md": "随机游走(DeepWalk/Node2Vec,7 块):补全局接近度信息。", + "docs_first_principles/07_high_order_citation_propagation.md": "高阶引用传播:H_k=R·C^k / G_k=S·R·C^k,fwd/bwd/undir,最终核心增益。", + "docs_first_principles/08_calibration_and_rank_cutoff.md": "校准与 rank cutoff:验证 1:1→测试分布漂移(阈值 0.4617 vs 漂移 0.5242)。", + "docs_first_principles/09_experiment_timeline.md": "实验演进时间线:baseline 0.8850→最终 0.9669/0.96626 的结果表与三段跃迁解读。", + "docs_first_principles/10_code_map_and_entrypoints.md": "代码地图与入口:30+ 脚本分类、两大共享库、legacy、三条核心命令。", + "docs_first_principles/11_figures_and_paper_mapping.md": "图表与论文章节映射:11 张图 caption + 与正文小节对应。", + "docs_first_principles/12_reproduction_guide.md": "复现指南:环境、最短/从零路径、快速验证、常见坑。", + "docs_first_principles/13_common_questions_for_the_author.md": "答辩/审稿常见问题与回答。", + "docs_first_principles/SUMMARY_FOR_PAPER.md": "论文级总览:可直接进 TeX 的正式表述 + 图表素材清单。", + "notes/experiment_history.md": "实验历史笔记:早期 GNN 实验(§1-3)、各阶段试错记录。", + "reports/preliminary_report.md": "初步报告(早期阶段叙事)。", + "reports/exploration_summary.md": "探索总结:各阶段验证 F1 表、跨 seed 稳定性、RW 公开分偏乐观的教训(§16)。", + "reports/final_report.md": "最终报告:方法与结果叙事版。", + "reports/paper_writing_guide.md": "论文写作指南:章节结构与表述建议。", + "figures_paper/README_figures.md": "figures_paper 图集说明。", + # ---- env / config ---- + "env/environment-cs3319.yml": "Conda 完整环境定义(numpy/pandas/scipy/sklearn/lightgbm/torch/torch-geometric/gensim/networkx/node2vec)。", + "env/requirements-minimal.txt": "最小 pinned 依赖(Python 3.10)。", + "env/conda-list-cs3319.txt": "conda list 导出(完整版本快照)。", +} + +def file_summary(path, fcat, lang, lines, fn, cl): + if path in FILE_SUM: + return FILE_SUM[path] + base = Path(path).name + if lang == "markdown": + return f"Markdown 文档 {base}({lines} 行)。" + if lang == "python": + tag = "【legacy 早期原型】" if path.startswith("code/run_") or path == "code/compare_gnn.py" else "" + return f"{tag}Python 脚本 {base}({lines} 行,{fn} 函数/{cl} 类)。" + if lang == "yaml": + return f"YAML 配置 {base}。" + if lang == "txt": + return f"文本清单 {base}。" + if lang == "ipynb": + return f"Jupyter notebook {base}。" + return f"{base}({fcat})。" + +# ---- file tags (lightweight, by category/role) ---- +def file_tags(path, fcat, lang): + t = [] + name = Path(path).name + if path == "code/high_order_graph_stack.py": + t += ["final-method", "lightgbm", "high-order", "entry-point"] + elif path in ("code/train_val_lgcn_ensemble.py", "code/stack_rank_calibration.py"): + t += ["shared-library", "core"] + elif path.startswith("code/run_") or path == "code/compare_gnn.py": + t += ["legacy"] + elif path.startswith("code/generate_") and "submission" in path: + t += ["submission-generator"] + elif path.endswith("_ablation.py"): + t += ["ablation"] + elif path.startswith("code/train_val_"): + t += ["model-training"] + elif path.startswith("code/figures/") or path.startswith("figures_paper/scripts/"): + t += ["figure", "visualization"] + if path.startswith("docs_first_principles/"): + t += ["docs-first-principles"] + if path.startswith("reports/"): + t += ["report"] + if path.startswith("data_and_docs/"): + t += ["task-spec", "data-doc"] + if lang == "python": + t += ["python"] + if lang == "markdown": + t += ["markdown"] + if lang == "yaml": + t += ["config"] + return list(dict.fromkeys(t)) or [fcat] + +# ==================== CURATED KEY-FUNCTION SUMMARIES ==================== +FUNC_SUM = { + ("code/train_val_lgcn_ensemble.py","build_parts"): "读 data_and_docs 三类边 txt + feature.pkl,构造 author/paper 索引、二部/合著/引用邻接与 USE 嵌入矩阵。整个流水线的数据入口。", + ("code/train_val_lgcn_ensemble.py","build_data"): "把 build_parts 的张量组装成 PyG/HeteroData 或训练用的边表 + 标签,供 LightGCN 训练。", + ("code/train_val_lgcn_ensemble.py","make_notebook_style_split"): "【确定性验证切分】seed=202、train_frac=0.9:留出 10% 已知正边(68,242)作验证正例,再等量随机采样非边作负例 → 136,484 对 1:1 人工平衡验证集。pandas.sample(random_state=202)+np.random.default_rng(202)。被全流水线共用。", + ("code/train_val_lgcn_ensemble.py","best_f1"): "由 precision_recall_curve 求 2PR/(P+R) 的 argmax,返回最优 F1 与对应阈值。leak-free 验证评估的标准函数。", + ("code/train_val_lgcn_ensemble.py","sample_hard_negatives"): "LightGCN 硬负采样:混合 random/popular/coauthor-pool 策略采样难负例,提升 BPR 训练效果。", + ("code/stack_rank_calibration.py","ExplicitGraphFeatures"): "类。transform 产 18 维显式图/meta-path 特征:A-A-P/A-P-P/A-P-A-P 共同邻居、各类度、co_read_count 等(注:out[i,12]与out[i,3]重复,有效 17 维独立)。", + ("code/stack_rank_calibration.py","add_rank_features"): "把任意分数列转成 score/global_rank/author_pct/author_rank 4 维 rank 校准特征,喂 Stage-2 LightGBM。", + ("code/high_order_graph_stack.py","build_high_order"): "无向高阶传播:H_k=R·C^k,作者历史论文经 k 步引用扩散到候选,产 24 维(读 *_names.txt)。", + ("code/high_order_graph_stack.py","build_high_order_directed"): "有向高阶传播:G_k=S·R·C^k,合著者历史论文扩散,fwd/bwd/undir 三向,产 45 维。最终核心增益来源。", + ("code/high_order_graph_stack.py","fit_lgb_oof"): "5-fold StratifiedKFold OOF LightGBM,返回 leak-free OOF 概率(存 *_oof.npy)。", + ("code/high_order_graph_stack.py","fit_full_predict"): "用最终超参(num_leaves=15, reg_lambda=8, n_estimators=1400, lr=0.022)在全验证集 fit 并预测 test,代表最终模型。", + ("code/high_order_graph_stack.py","write_ratio_submission"): "rank-cutoff 提交生成:按最终分数排序取 top ratio(0.5)为 1,并 force test_known_mask 中训练已知正边为 1。", + ("code/randomwalk_systematic_ablation.py","build_base_features"): "拼出 84 维 X_base(LightGCN rank4 + explicit18 + neg8 + topk3 + variant43 + content_mean4 + bpr4),命中各缓存。", + ("code/randomwalk_systematic_ablation.py","pair_feature_block"): "对单个 Word2Vec 配置产 11 维 pair 特征(作者/候选嵌入拼接、cos、差、范数等)。", + ("code/content_rich_ablation.py","content_rich_features"): "从 feature.pkl 的 512-d USE 嵌入直接抽 18 维作者/候选内容画像(命中 feature_cache)。", + ("code/generate_randomwalk_ensemble_submission.py","aggregate"): "把 7 个 RW pair 特征块做一致性聚合,产 11 维 aggregate 块。", + ("code/extra_score_sources_ablation.py","content_mean_score"): "作者历史论文 embedding 均值 · 候选论文向量,作第 4 个 CF 分数源。", + ("code/extra_score_sources_ablation.py","score_to_features"): "把单分数转 zscore/rank 等 4 维特征(BPR/content_mean 复用)。", + ("code/post95_ablation.py","negative_evidence_features"): "8 维负证据特征:候选论文被读过多少、共同未读等。", + ("code/generate_post95_submission.py","topk_content_similarity_fast"): "top-k 内容相似度 3 维(快速版)。", + ("code/generate_post95_submission.py","variant_feature_matrix"): "20 个 LightGCN 变体分数做 zscore+rank01 → 43 维。", +} + +def func_summary(path, name, fn): + key = (path, name) + if key in FUNC_SUM: + return FUNC_SUM[key] + return f"{name}():定义于 {Path(path).name} 的函数。" + +# ==================== BUILD NODES ==================== +nodes = [] +file_node_ids = set() +func_node_ids = {} # (path,name) -> id + +for f in scan["files"]: + p = f["path"] + r = struct.get(p, {}) + fns = r.get("functions") or [] + cls = r.get("classes") or [] + lines = f.get("sizeLines", 0) + fcat = f.get("fileCategory", "code") + lang = f.get("language", "") + ntype = node_type(fcat, lang) + cx = complexity(lines, len(fns), len(cls)) + fid = f"file:{p}" + file_node_ids.add(fid) + nodes.append({ + "id": fid, "type": ntype, "name": Path(p).name, + "filePath": p, "lineRange": [1, lines] if lines else None, + "summary": file_summary(p, fcat, lang, lines, len(fns), len(cls)), + "tags": file_tags(p, fcat, lang), "complexity": cx, + }) + # function nodes + seen = set() + for fn in fns: + nm = fn.get("name") + if not nm or nm in seen: + continue + seen.add(nm) + nid = f"func:{p}::{nm}" + func_node_ids[(p, nm)] = nid + lr = [fn.get("startLine") or fn.get("lineRange",[0,0])[0], + fn.get("endLine") or fn.get("lineRange",[0,0])[1]] + params = fn.get("params") or [] + nodes.append({ + "id": nid, "type": "function", "name": nm, "filePath": p, + "lineRange": lr if lr[0] else None, + "summary": func_summary(p, nm, fn), + "tags": (["function"] + (["takes-args"] if params else [])), + "complexity": "simple" if (lr[1]-lr[0]) < 25 else "moderate", + }) + # class nodes + for cl in cls: + nm = cl.get("name") + if not nm: + continue + nid = f"class:{p}::{nm}" + lr = cl.get("lineRange") or [cl.get("line", 0), 0] + methods = cl.get("methods") or [] + nodes.append({ + "id": nid, "type": "class", "name": nm, "filePath": p, + "lineRange": lr if lr[0] else None, + "summary": f"{nm}(类):定义于 {Path(p).name};方法 {', '.join(methods[:6]) or '—'}。", + "tags": ["class"] + (["has-methods"] if methods else []), + "complexity": "moderate" if methods else "simple", + }) + +print(f"Built {len(nodes)} nodes ({sum(1 for n in nodes if n['type']=='file')} file, " + f"{sum(1 for n in nodes if n['type']=='function')} func, " + f"{sum(1 for n in nodes if n['type']=='class')} class)") + +# ==================== BUILD EDGES ==================== +edges = [] +edge_seen = set() +def add_edge(s, t, typ, weight, direction="forward", desc=None): + if not s or not t or s == t: + return + k = (s, t, typ) + if k in edge_seen: + return + edge_seen.add(k) + e = {"source": s, "target": t, "type": typ, "direction": direction, "weight": weight} + if desc: + e["description"] = desc + edges.append(e) + +# imports (file -> file) +for src, tgts in imap.items(): + s = f"file:{src}" + if s not in file_node_ids: + continue + lm_set = loadmod_targets.get(src, set()) + for t in tgts: + tid = f"file:{t}" + if tid not in file_node_ids: + continue + desc = "运行时 load_module() 加载(无 utils.py,脚本互相当库)" if t in lm_set else "项目内部 import" + add_edge(s, tid, "imports", 0.85 if t in lm_set else 0.7, "forward", desc) + +# contains (file -> func/class) +for f in scan["files"]: + p = f["path"] + fid = f"file:{p}" + r = struct.get(p, {}) + for fn in (r.get("functions") or []): + nid = func_node_ids.get((p, fn.get("name"))) + if nid: + add_edge(fid, nid, "contains", 0.6, "forward", "文件定义的函数") + for cl in (r.get("classes") or []): + nid = f"class:{p}::{cl.get('name')}" + add_edge(fid, nid, "contains", 0.7, "forward", "文件定义的类") + +# calls (intra-file func -> func, deterministic from callGraph) +for p, r in struct.items(): + cg = r.get("callGraph") or [] + local_names = {fn.get("name") for fn in (r.get("functions") or [])} + local_names |= {cl.get("name") for cl in (r.get("classes") or [])} + for e in cg: + caller = e.get("caller") + callee = e.get("callee") + if not caller or not callee: + continue + # only simple intra-file callees defined locally + if "." in callee or callee in ("self", "cls"): + base_c = callee.split(".")[-1] + else: + base_c = callee + if base_c not in local_names: + continue + src = func_node_ids.get((p, caller)) + tgt = func_node_ids.get((p, base_c)) or (f"class:{p}::{base_c}" if (p,base_c) in [(p,c.get('name')) for c in (r.get('classes') or [])] else None) + if not tgt and base_c in local_names: + tgt = f"class:{p}::{base_c}" if any(c.get('name')==base_c for c in (r.get('classes') or [])) else func_node_ids.get((p, base_c)) + if src and tgt: + add_edge(src, tgt, "calls", 0.5, "forward", "同文件内调用") + +# documents edges: docs_first_principles -> code they describe (semantic, authored) +DOC_LINKS = { + "docs_first_principles/04_lightgcn_from_first_principles.md": ["code/train_val_lgcn_ensemble.py"], + "docs_first_principles/05_feature_stacking_and_lightgbm.md": ["code/stack_rank_calibration.py", "code/high_order_graph_stack.py"], + "docs_first_principles/07_high_order_citation_propagation.md": ["code/high_order_graph_stack.py"], + "docs_first_principles/06_random_walk_features.md": ["code/randomwalk_systematic_ablation.py", "code/generate_randomwalk_ensemble_submission.py"], + "docs_first_principles/03_data_flow_and_artifacts.md": ["code/train_val_lgcn_ensemble.py", "code/high_order_graph_stack.py"], + "docs_first_principles/10_code_map_and_entrypoints.md": ["code/high_order_graph_stack.py", "code/train_val_lgcn_ensemble.py", "code/stack_rank_calibration.py"], +} +for doc, codes in DOC_LINKS.items(): + s = f"file:{doc}" + if s not in file_node_ids: + continue + for c in codes: + t = f"file:{c}" + if t in file_node_ids: + add_edge(s, t, "documents", 0.5, "forward", "文档解释该脚本") + +print(f"Built {len(edges)} edges " + f"({sum(1 for e in edges if e['type']=='imports')} imports, " + f"{sum(1 for e in edges if e['type']=='contains')} contains, " + f"{sum(1 for e in edges if e['type']=='calls')} calls, " + f"{sum(1 for e in edges if e['type']=='documents')} documents)") + +# ==================== LAYERS (authored architecture) ==================== +def files_in(prefixes): + return [f"file:{p}" for f in scan["files"] for p in [f["path"]] if any(p.startswith(pre) or p == pre for pre in prefixes) and f"file:{p}" in file_node_ids] + +layers = [ + {"id":"L1","name":"数据与共享地基 (Data & Shared Foundation)","description":"读三类边 + feature.pkl、确定性 1:1 验证切分(seed=202)、best_f1 评估。两大事实共享库被全流水线 load_module 加载。","nodeIds":files_in(["code/train_val_lgcn_ensemble.py","code/stack_rank_calibration.py","code/make_notebook_style_split.py"])}, + {"id":"L2","name":"LightGCN 集成主分数 (Primary Score)","description":"无权重/无非线性的异构协同过滤 + BPR + 硬负采样,多 seed/维集成,产 val_vanilla_ensemble_mean.npy 主分数(验证 0.9386)。","nodeIds":files_in(["code/train_val_lgcn_ensemble.py"])}, + {"id":"L3","name":"分数变体聚合 (Variant Aggregation)","description":"20 个 LightGCN 变体分数做 zscore+rank01 聚合、top-k 内容相似度、负证据。Post95→BPR-MF。验证 0.9571→0.9593。","nodeIds":files_in(["code/generate_post95_submission.py","code/post95_ablation.py","code/extra_score_sources_ablation.py","code/generate_extra_bprmf_submission.py"])}, + {"id":"L4","name":"内容语义特征 (Content)","description":"从 512-d USE 论文嵌入抽作者/候选内容画像(18 维),CF 之外的语义互补视角。验证 ≈0.9599。","nodeIds":files_in(["code/content_rich_ablation.py","code/generate_content_rich_submission.py"])}, + {"id":"L5","name":"随机游走特征 (Random Walk)","description":"7 个 DeepWalk/Node2Vec 配置产全局接近度嵌入(每块 11 维)+ 一致性聚合,补 LightGCN 局部 CF 看不到的全局尺度。验证 0.9621→0.9649。","nodeIds":files_in(["code/randomwalk_systematic_ablation.py","code/node2vec_deepwalk_ablation.py","code/generate_randomwalk_ensemble_submission.py","code/generate_randomwalk_single_submission.py","code/randomwalk_ensemble_ablation.py","code/randomwalk_one_ablation.py","code/rich_randomwalk_stack.py","code/generate_node2vec_deepwalk_submission.py","code/generate_conservative_rw_blends.py"])}, + {"id":"L6","name":"最终堆叠与高阶传播 (Final Stack & High-order)","description":"【最终方法】259 维特征上的 LightGBM meta-learner;高阶有向引用传播 H_k=R·C^k / G_k=S·R·C^k(fwd/bwd/undir)是核心增益。验证 0.9669 / 公开 0.96626。","nodeIds":files_in(["code/high_order_graph_stack.py","code/high_order_model_compare.py"])}, + {"id":"L7","name":"校准/误差/搜索 (Calibration, Error, Search)","description":"误差分桶、校准曲线、ratio/threshold 搜索,论证 rank-cutoff 决策并选最优提交。","nodeIds":files_in(["code/error_group_calibration.py","code/score_level_meta_stack.py","code/search_dynamic_fusion.py","code/search_val_fusion.py","code/evaluate_val_checkpoints.py"])}, + {"id":"L8","name":"提交生成 (Submission Generation)","description":"各阶段从 checkpoint/分数生成 Kaggle 提交 CSV(Index,Predicted)。","nodeIds":files_in(["code/generate_ens6_submission.py","code/generate_large_ensemble_submission.py","code/generate_dot_submission.py","code/generate_post95_submission.py","code/generate_content_rich_submission.py","code/generate_randomwalk_ensemble_submission.py","code/generate_randomwalk_single_submission.py","code/generate_extra_bprmf_submission.py","code/generate_node2vec_deepwalk_submission.py","code/generate_conservative_rw_blends.py"])}, + {"id":"L9","name":"可视化 (Visualization)","description":"两套论文图脚本:code/figures/(主图 + 补齐 y/特征重要性)与 figures_paper/scripts/(11 图集)。","nodeIds":files_in(["code/figures/","figures_paper/scripts/","figures_paper/README_figures.md"])}, + {"id":"L10","name":"文档与报告 (Docs & Reports)","description":"第一性原理文档包(权威事实表 _fact_sheet)+ reports 叙事 + 任务规格。","nodeIds":files_in(["docs_first_principles/","reports/","notes/","README.md","CLAUDE.md","CLAUDE_zh.md","WORKSPACE_STATUS.md","data_and_docs/"])}, + {"id":"L11","name":"配置与环境 (Config & Environment)","description":"Conda/最小依赖/pinned 版本快照。","nodeIds":files_in(["env/"])}, + {"id":"L12","name":"遗留原型 (Legacy Prototypes)","description":"早期 run_*/compare_gnn,硬编码 /home/lzc 路径、无 argparse,仅供溯源不可直接运行。","nodeIds":files_in(["code/run_","code/compare_gnn.py"])}, +] + +# ==================== TOUR (authored walkthrough) ==================== +def fid(p): return f"file:{p}" +tour = [ + {"order":1,"title":"任务与数据集","description":"先读任务定义:异构学术网络(6611 作者/79937 论文)上的 author-paper 二部图链路预测,对 2.05M 测试对输出 0/1,公开榜评 50%,指标 F1。理解稀疏(密度 1.29e-3)与长尾(56% 作者度=1)难度。","nodeIds":[fid("docs_first_principles/01_problem_and_dataset.md"),fid("data_and_docs/project_description.md"),fid("data_and_docs/dataset.md")],"languageLesson":"F1 为指标;公开榜只评测 50% 测试集,这与最终选择 rank-cutoff 而非概率阈值直接相关。"}, + {"order":2,"title":"整体两阶段架构","description":"Stage-1 多源生产 raw 分数/嵌入(LightGCN/BPR-MF/RW/content/高阶)→ Stage-2 用 259 维 LightGBM meta-learner 融合 → rank-cutoff top 50% 决策。先建立全局图再钻细节。","nodeIds":[fid("docs_first_principles/02_architecture_overview.md"),fid("docs_first_principles/SUMMARY_FOR_PAPER.md")],"languageLesson":"stacking 的本质:把多个互补视角交给一个 calibrator 联合裁决。"}, + {"order":3,"title":"数据流与产物","description":"txt → make_notebook_style_split(seed=202)→ 136484 对 1:1 验证集 → val_*/test_*_oof.npy 分数 → submission。掌握 .npy 文件名约定与 feature_cache 缓存,这是读懂后续脚本的钥匙。","nodeIds":[fid("docs_first_principles/03_data_flow_and_artifacts.md"),fid("code/train_val_lgcn_ensemble.py")],"languageLesson":"--split-seed 是 load-bearing:种子 baked 进每个分数文件,换 seed 必须端到端重跑。"}, + {"order":4,"title":"共享地基:两大事实库","description":"无 utils.py,脚本用 importlib load_module 互相当库加载。train_val_lgcn_ensemble.py(数据/切分/best_f1)与 stack_rank_calibration.py(显式图特征/rank)是两大共享库,各被 ~14 个脚本加载——改动它们会波及全流水线。","nodeIds":[fid("code/train_val_lgcn_ensemble.py"),fid("code/stack_rank_calibration.py")],"languageLesson":"load_module(importlib.util)是本仓库代码复用的核心机制,也是图上 imports 边的骨干。"}, + {"order":5,"title":"LightGCN 主分数","description":"为何'轻'?删掉所有权重矩阵与非线性,只做入度归一邻居聚合 + 点积解码 + BPR + 硬负采样。在极稀疏图上比过参数化 GNN 更稳更强。验证 0.9386,是后续堆叠的主分数源。","nodeIds":[fid("docs_first_principles/04_lightgcn_from_first_principles.md"),fid("code/train_val_lgcn_ensemble.py")],"languageLesson":"推荐任务里:CF 前端越简洁越不易过拟合稀疏图噪声,特征交互交给后端 LightGBM。"}, + {"order":6,"title":"meta-path 堆叠 = 单阶段最大增益","description":"LightGCN 学的是局部隐式 CF,看不见'合著者读过哪些论文''我读的论文引用了哪些候选'这类显式多跳结构。把它们做成 ~76 维手工特征喂 LightGBM,验证 0.939→0.956(+0.0174,全程最大跃迁)。","nodeIds":[fid("docs_first_principles/05_feature_stacking_and_lightgbm.md"),fid("code/stack_rank_calibration.py")],"languageLesson":"'模型不确定的'+'图结构明确告诉你的'两条信息源交给 calibrator 联合裁决 = stacking 的价值。"}, + {"order":7,"title":"随机游走补全局接近度","description":"DeepWalk/Node2Vec 在二部/合著/引用图上随机游走 + Word2Vec,捕获 LightGCN 局部 CF 看不到的全局接近度。系统化 7 块配置 + 一致性聚合,验证 →0.9649。但注意:验证对'堆更多同源模型'系统性偏乐观(公开分反略降)。","nodeIds":[fid("docs_first_principles/06_random_walk_features.md"),fid("code/randomwalk_systematic_ablation.py"),fid("code/generate_randomwalk_ensemble_submission.py")],"languageLesson":"1:1 人工平衡验证集会高估同源模型堆叠——这是放弃验证最优阈值的直接原因。"}, + {"order":8,"title":"高阶有向引用传播 = 核心贡献","description":"最终增益来源:H_k=R·C^k(作者历史论文 k 步引用扩散)、G_k=S·R·C^k(合著者历史论文扩散),fwd/bwd/undir 三向。消融 108→190→214→259 维,验证 0.9643→0.9669、公开 0.96252→0.96626。方向性抓住了 LightGCN/无向聚合无法区分的引用因果结构。","nodeIds":[fid("docs_first_principles/07_high_order_citation_propagation.md"),fid("code/high_order_graph_stack.py")],"languageLesson":"把'我读过的论文→它引用/被引用的论文→候选'这条有向语义链路显式建模成稀疏矩阵幂,可解释且有效。"}, + {"order":9,"title":"决策:rank-cutoff 而非概率阈值","description":"验证最优概率阈值 0.4617 迁移到 test 后正例率漂移到 0.5242(多 2.4pt)。改用 rank top 50% + 强制 test_known_mask(524,083 条训练-测试重叠正边)为 1,正例率精确锁 0.5。这就是最终 0.96626 的来源。","nodeIds":[fid("docs_first_principles/08_calibration_and_rank_cutoff.md"),fid("code/error_group_calibration.py")],"languageLesson":"分布漂移下,rank-cutoff 比 probability threshold 更稳健——校准问题的工程化解法。"}, + {"order":10,"title":"复现与核验","description":"最短路径:已有 submission 直接核验;或从缓存重生成 high_order_graph_stack。所有中间产物已缓存于包内,通常只需重跑改动的那一阶段。","nodeIds":[fid("docs_first_principles/12_reproduction_guide.md"),fid("README.md"),fid("docs_first_principles/_fact_sheet.md")],"languageLesson":"权威数字一律以 _fact_sheet.md(状态日期 2026-06-18)为准,叙述与事实表冲突时以事实表为准。"}, +] + +# ==================== PROJECT META ==================== +project = { + "name": scan.get("name","CS3319 Project 2 Final Deliverable"), + "languages": scan.get("languages",["python","markdown"]), + "frameworks": scan.get("frameworks",[]), + "description": scan.get("description",""), + "analyzedAt": "2026-06-18T00:00:00Z", + "gitCommitHash": "non-git-local", +} + +graph = { + "version": "2.8.0", + "kind": "codebase", + "project": project, + "nodes": nodes, + "edges": edges, + "layers": layers, + "tour": tour, +} + +# ===== dedupe nodes by id (keep first) ===== +seen_ids = set(); dedup_nodes = [] +for n in nodes: + if n["id"] in seen_ids: continue + seen_ids.add(n["id"]); dedup_nodes.append(n) +graph["nodes"] = dedup_nodes +# drop edges referencing non-existent node ids +idset = seen_ids +graph["edges"] = [e for e in edges if e["source"] in idset and e["target"] in idset] + +# write assembled-graph.json (intermediate) + knowledge-graph.json (final) +json.dump(graph, open(INT/"assembled-graph.json","w"), ensure_ascii=False, indent=1) +json.dump(graph, open(UA/"knowledge-graph.json","w"), ensure_ascii=False, indent=1) +print(f"\nWROTE knowledge-graph.json: {len(graph['nodes'])} nodes, {len(graph['edges'])} edges, " + f"{len(graph['layers'])} layers, {len(graph['tour'])} tour steps") diff --git a/.understand-anything/tmp/fingerprint-input.json b/.understand-anything/tmp/fingerprint-input.json new file mode 100644 index 0000000000000000000000000000000000000000..694cde42049d6e9ce3b1d8e37f1c5215e6114dd7 --- /dev/null +++ b/.understand-anything/tmp/fingerprint-input.json @@ -0,0 +1,108 @@ +{ + "projectRoot": "D:/reps/26H1_cs3319_final_deliverable", + "sourceFilePaths": [ + "CLAUDE_zh.md", + "CLAUDE.md", + "code/compare_gnn.py", + "code/content_rich_ablation.py", + "code/error_group_calibration.py", + "code/evaluate_val_checkpoints.py", + "code/extra_score_sources_ablation.py", + "code/figures/fig1_dataset_overview.py", + "code/figures/fig10_rw_ensemble_size.py", + "code/figures/fig2_framework.py", + "code/figures/fig3_progression.py", + "code/figures/fig4_highorder_ablation.py", + "code/figures/fig5_pr_roc.py", + "code/figures/fig6_feature_contribution.py", + "code/figures/fig7_error_analysis.py", + "code/figures/fig8_lgcn_ensemble_correlation.py", + "code/figures/fig9_lgcn_hyperparam.py", + "code/figures/gen_val_labels.py", + "code/figures/plot_style.py", + "code/generate_conservative_rw_blends.py", + "code/generate_content_rich_submission.py", + "code/generate_dot_submission.py", + "code/generate_ens6_submission.py", + "code/generate_extra_bprmf_submission.py", + "code/generate_large_ensemble_submission.py", + "code/generate_node2vec_deepwalk_submission.py", + "code/generate_post95_submission.py", + "code/generate_randomwalk_ensemble_submission.py", + "code/generate_randomwalk_single_submission.py", + "code/high_order_graph_stack.py", + "code/high_order_model_compare.py", + "code/make_notebook_style_split.py", + "code/node2vec_deepwalk_ablation.py", + "code/post95_ablation.py", + "code/randomwalk_ensemble_ablation.py", + "code/randomwalk_one_ablation.py", + "code/randomwalk_systematic_ablation.py", + "code/rich_randomwalk_stack.py", + "code/run_baseline.py", + "code/run_final.py", + "code/run_graph_features.py", + "code/run_improved.py", + "code/run_lgcn_final.py", + "code/run_lgcn_v2.py", + "code/run_ultimate.py", + "code/run_v2.py", + "code/score_level_meta_stack.py", + "code/search_dynamic_fusion.py", + "code/search_val_fusion.py", + "code/stack_rank_calibration.py", + "code/train_dynamic_feature_fusion.py", + "code/train_val_hgt_bpr.py", + "code/train_val_lgcn_ensemble.py", + "code/train_val_mf_bpr.py", + "code/train_val_sage_bpr.py", + "data_and_docs/advice.md", + "data_and_docs/dataset.md", + "data_and_docs/project_description.md", + "data_and_docs/project_evaluation.md", + "data_and_docs/project-example-2026-pygver.ipynb", + "data_and_docs/proposal.md", + "data_and_docs/references.md", + "docs_first_principles/_fact_sheet.md", + "docs_first_principles/00_README.md", + "docs_first_principles/01_problem_and_dataset.md", + "docs_first_principles/02_architecture_overview.md", + "docs_first_principles/03_data_flow_and_artifacts.md", + "docs_first_principles/04_lightgcn_from_first_principles.md", + "docs_first_principles/05_feature_stacking_and_lightgbm.md", + "docs_first_principles/06_random_walk_features.md", + "docs_first_principles/07_high_order_citation_propagation.md", + "docs_first_principles/08_calibration_and_rank_cutoff.md", + "docs_first_principles/09_experiment_timeline.md", + "docs_first_principles/10_code_map_and_entrypoints.md", + "docs_first_principles/11_figures_and_paper_mapping.md", + "docs_first_principles/12_reproduction_guide.md", + "docs_first_principles/13_common_questions_for_the_author.md", + "docs_first_principles/SUMMARY_FOR_PAPER.md", + "env/conda-list-cs3319.txt", + "env/environment-cs3319.yml", + "env/requirements-minimal.txt", + "figures_paper/README_figures.md", + "figures_paper/scripts/fig1_graph_overview.py", + "figures_paper/scripts/fig2_sparsity.py", + "figures_paper/scripts/fig3_roadmap.py", + "figures_paper/scripts/fig4_architecture.py", + "figures_paper/scripts/fig5_ablation_highorder.py", + "figures_paper/scripts/fig6_rank_vs_threshold.py", + "figures_paper/scripts/fig7_error_heatmap.py", + "figures_paper/scripts/figA1_hyperparam.py", + "figures_paper/scripts/figA2_rw_ablation.py", + "figures_paper/scripts/figA3_feature_importance.py", + "figures_paper/scripts/figA4_oof_pr.py", + "figures_paper/scripts/make_all_figures.py", + "figures_paper/scripts/style.py", + "notes/experiment_history.md", + "README.md", + "reports/exploration_summary.md", + "reports/final_report.md", + "reports/paper_writing_guide.md", + "reports/preliminary_report.md", + "WORKSPACE_STATUS.md" + ], + "gitCommitHash": "non-git-local" +} \ No newline at end of file diff --git a/.understand-anything/tmp/save_phase7.cjs b/.understand-anything/tmp/save_phase7.cjs new file mode 100644 index 0000000000000000000000000000000000000000..b29ec5f49d31c26f0c84b591c2df8dd4113006f9 --- /dev/null +++ b/.understand-anything/tmp/save_phase7.cjs @@ -0,0 +1,38 @@ +// Phase 7 SAVE: canonical saveGraph + saveMeta, then prepare fingerprint input +const { createRequire } = require('module'); +const { resolve, join } = require('path'); +const { pathToFileURL } = require('url'); +const { readFileSync, writeFileSync } = require('fs'); + +const PLUGIN_ROOT = "C:/Users/c5gal/.claude/plugins/cache/understand-anything/understand-anything/2.8.0"; +const require2 = createRequire(resolve(PLUGIN_ROOT, 'package.json')); +const root = "D:/reps/26H1_cs3319_final_deliverable"; + +(async () => { + let core; + try { core = await import(pathToFileURL(require2.resolve('@understand-anything/core')).href); } + catch { core = await import(pathToFileURL(resolve(PLUGIN_ROOT,'packages/core/dist/index.js')).href); } + const { saveGraph, saveMeta } = core; + + const kg = JSON.parse(readFileSync(join(root,'.understand-anything/knowledge-graph.json'),'utf-8')); + // canonical save (re-sanitizes) + saveGraph(root, kg); + console.log("saveGraph: wrote knowledge-graph.json (canonical)"); + + // meta.json + const meta = { + lastAnalyzedAt: kg.project.analyzedAt, + gitCommitHash: kg.project.gitCommitHash, + version: kg.version, + analyzedFiles: kg.nodes.filter(n => n.type === 'file' || n.type === 'document' || n.type === 'config').length, + }; + saveMeta(root, meta); + console.log("saveMeta: wrote meta.json ->", JSON.stringify(meta)); + + // fingerprint input: the 102 source file paths + const scan = JSON.parse(readFileSync(join(root,'.understand-anything/intermediate/scan-result.json'),'utf-8')); + const sourceFilePaths = scan.files.map(f => f.path); + const fpInput = { projectRoot: root, sourceFilePaths, gitCommitHash: kg.project.gitCommitHash }; + writeFileSync(join(root,'.understand-anything/tmp/fingerprint-input.json'), JSON.stringify(fpInput,null,1),'utf-8'); + console.log(`Prepared fingerprint input: ${sourceFilePaths.length} source paths`); +})(); diff --git a/.understand-anything/tmp/struct-input.json b/.understand-anything/tmp/struct-input.json new file mode 100644 index 0000000000000000000000000000000000000000..c52fc7924705d5a7acae959276198d246e489665 --- /dev/null +++ b/.understand-anything/tmp/struct-input.json @@ -0,0 +1 @@ +{"projectRoot": "D:/reps/26H1_cs3319_final_deliverable", "batchFiles": [{"path": "CLAUDE_zh.md", "language": "markdown", "sizeLines": 206, "fileCategory": "docs"}, {"path": "CLAUDE.md", "language": "markdown", "sizeLines": 218, "fileCategory": "docs"}, {"path": "code/compare_gnn.py", "language": "python", "sizeLines": 414, "fileCategory": "code"}, {"path": "code/content_rich_ablation.py", "language": "python", "sizeLines": 208, "fileCategory": "code"}, {"path": "code/error_group_calibration.py", "language": "python", "sizeLines": 800, "fileCategory": "code"}, {"path": "code/evaluate_val_checkpoints.py", "language": "python", "sizeLines": 147, "fileCategory": "code"}, {"path": "code/extra_score_sources_ablation.py", "language": "python", "sizeLines": 286, "fileCategory": "code"}, {"path": "code/figures/fig1_dataset_overview.py", "language": "python", "sizeLines": 62, "fileCategory": "code"}, {"path": "code/figures/fig10_rw_ensemble_size.py", "language": "python", "sizeLines": 39, "fileCategory": "code"}, {"path": "code/figures/fig2_framework.py", "language": "python", "sizeLines": 55, "fileCategory": "code"}, {"path": "code/figures/fig3_progression.py", "language": "python", "sizeLines": 59, "fileCategory": "code"}, {"path": "code/figures/fig4_highorder_ablation.py", "language": "python", "sizeLines": 48, "fileCategory": "code"}, {"path": "code/figures/fig5_pr_roc.py", "language": "python", "sizeLines": 61, "fileCategory": "code"}, {"path": "code/figures/fig6_feature_contribution.py", "language": "python", "sizeLines": 48, "fileCategory": "code"}, {"path": "code/figures/fig7_error_analysis.py", "language": "python", "sizeLines": 71, "fileCategory": "code"}, {"path": "code/figures/fig8_lgcn_ensemble_correlation.py", "language": "python", "sizeLines": 34, "fileCategory": "code"}, {"path": "code/figures/fig9_lgcn_hyperparam.py", "language": "python", "sizeLines": 50, "fileCategory": "code"}, {"path": "code/figures/gen_val_labels.py", "language": "python", "sizeLines": 65, "fileCategory": "code"}, {"path": "code/figures/plot_style.py", "language": "python", "sizeLines": 53, "fileCategory": "code"}, {"path": "code/generate_conservative_rw_blends.py", "language": "python", "sizeLines": 71, "fileCategory": "code"}, {"path": "code/generate_content_rich_submission.py", "language": "python", "sizeLines": 127, "fileCategory": "code"}, {"path": "code/generate_dot_submission.py", "language": "python", "sizeLines": 187, "fileCategory": "code"}, {"path": "code/generate_ens6_submission.py", "language": "python", "sizeLines": 263, "fileCategory": "code"}, {"path": "code/generate_extra_bprmf_submission.py", "language": "python", "sizeLines": 174, "fileCategory": "code"}, {"path": "code/generate_large_ensemble_submission.py", "language": "python", "sizeLines": 342, "fileCategory": "code"}, {"path": "code/generate_node2vec_deepwalk_submission.py", "language": "python", "sizeLines": 146, "fileCategory": "code"}, {"path": "code/generate_post95_submission.py", "language": "python", "sizeLines": 331, "fileCategory": "code"}, {"path": "code/generate_randomwalk_ensemble_submission.py", "language": "python", "sizeLines": 159, "fileCategory": "code"}, {"path": "code/generate_randomwalk_single_submission.py", "language": "python", "sizeLines": 147, "fileCategory": "code"}, {"path": "code/high_order_graph_stack.py", "language": "python", "sizeLines": 351, "fileCategory": "code"}, {"path": "code/high_order_model_compare.py", "language": "python", "sizeLines": 166, "fileCategory": "code"}, {"path": "code/make_notebook_style_split.py", "language": "python", "sizeLines": 86, "fileCategory": "code"}, {"path": "code/node2vec_deepwalk_ablation.py", "language": "python", "sizeLines": 257, "fileCategory": "code"}, {"path": "code/post95_ablation.py", "language": "python", "sizeLines": 321, "fileCategory": "code"}, {"path": "code/randomwalk_ensemble_ablation.py", "language": "python", "sizeLines": 61, "fileCategory": "code"}, {"path": "code/randomwalk_one_ablation.py", "language": "python", "sizeLines": 70, "fileCategory": "code"}, {"path": "code/randomwalk_systematic_ablation.py", "language": "python", "sizeLines": 446, "fileCategory": "code"}, {"path": "code/rich_randomwalk_stack.py", "language": "python", "sizeLines": 189, "fileCategory": "code"}, {"path": "code/run_baseline.py", "language": "python", "sizeLines": 352, "fileCategory": "code"}, {"path": "code/run_final.py", "language": "python", "sizeLines": 494, "fileCategory": "code"}, {"path": "code/run_graph_features.py", "language": "python", "sizeLines": 315, "fileCategory": "code"}, {"path": "code/run_improved.py", "language": "python", "sizeLines": 596, "fileCategory": "code"}, {"path": "code/run_lgcn_final.py", "language": "python", "sizeLines": 308, "fileCategory": "code"}, {"path": "code/run_lgcn_v2.py", "language": "python", "sizeLines": 311, "fileCategory": "code"}, {"path": "code/run_ultimate.py", "language": "python", "sizeLines": 450, "fileCategory": "code"}, {"path": "code/run_v2.py", "language": "python", "sizeLines": 520, "fileCategory": "code"}, {"path": "code/score_level_meta_stack.py", "language": "python", "sizeLines": 236, "fileCategory": "code"}, {"path": "code/search_dynamic_fusion.py", "language": "python", "sizeLines": 140, "fileCategory": "code"}, {"path": "code/search_val_fusion.py", "language": "python", "sizeLines": 127, "fileCategory": "code"}, {"path": "code/stack_rank_calibration.py", "language": "python", "sizeLines": 294, "fileCategory": "code"}, {"path": "code/train_dynamic_feature_fusion.py", "language": "python", "sizeLines": 282, "fileCategory": "code"}, {"path": "code/train_val_hgt_bpr.py", "language": "python", "sizeLines": 188, "fileCategory": "code"}, {"path": "code/train_val_lgcn_ensemble.py", "language": "python", "sizeLines": 506, "fileCategory": "code"}, {"path": "code/train_val_mf_bpr.py", "language": "python", "sizeLines": 110, "fileCategory": "code"}, {"path": "code/train_val_sage_bpr.py", "language": "python", "sizeLines": 188, "fileCategory": "code"}, {"path": "data_and_docs/advice.md", "language": "markdown", "sizeLines": 468, "fileCategory": "docs"}, {"path": "data_and_docs/dataset.md", "language": "markdown", "sizeLines": 26, "fileCategory": "docs"}, {"path": "data_and_docs/project_description.md", "language": "markdown", "sizeLines": 21, "fileCategory": "docs"}, {"path": "data_and_docs/project_evaluation.md", "language": "markdown", "sizeLines": 14, "fileCategory": "docs"}, {"path": "data_and_docs/project-example-2026-pygver.ipynb", "language": "ipynb", "sizeLines": 0, "fileCategory": "code"}, {"path": "data_and_docs/proposal.md", "language": "markdown", "sizeLines": 49, "fileCategory": "docs"}, {"path": "data_and_docs/references.md", "language": "markdown", "sizeLines": 11, "fileCategory": "docs"}, {"path": "docs_first_principles/_fact_sheet.md", "language": "markdown", "sizeLines": 287, "fileCategory": "docs"}, {"path": "docs_first_principles/00_README.md", "language": "markdown", "sizeLines": 152, "fileCategory": "docs"}, {"path": "docs_first_principles/01_problem_and_dataset.md", "language": "markdown", "sizeLines": 168, "fileCategory": "docs"}, {"path": "docs_first_principles/02_architecture_overview.md", "language": "markdown", "sizeLines": 236, "fileCategory": "docs"}, {"path": "docs_first_principles/03_data_flow_and_artifacts.md", "language": "markdown", "sizeLines": 302, "fileCategory": "docs"}, {"path": "docs_first_principles/04_lightgcn_from_first_principles.md", "language": "markdown", "sizeLines": 335, "fileCategory": "docs"}, {"path": "docs_first_principles/05_feature_stacking_and_lightgbm.md", "language": "markdown", "sizeLines": 242, "fileCategory": "docs"}, {"path": "docs_first_principles/06_random_walk_features.md", "language": "markdown", "sizeLines": 254, "fileCategory": "docs"}, {"path": "docs_first_principles/07_high_order_citation_propagation.md", "language": "markdown", "sizeLines": 357, "fileCategory": "docs"}, {"path": "docs_first_principles/08_calibration_and_rank_cutoff.md", "language": "markdown", "sizeLines": 293, "fileCategory": "docs"}, {"path": "docs_first_principles/09_experiment_timeline.md", "language": "markdown", "sizeLines": 141, "fileCategory": "docs"}, {"path": "docs_first_principles/10_code_map_and_entrypoints.md", "language": "markdown", "sizeLines": 185, "fileCategory": "docs"}, {"path": "docs_first_principles/11_figures_and_paper_mapping.md", "language": "markdown", "sizeLines": 367, "fileCategory": "docs"}, {"path": "docs_first_principles/12_reproduction_guide.md", "language": "markdown", "sizeLines": 324, "fileCategory": "docs"}, {"path": "docs_first_principles/13_common_questions_for_the_author.md", "language": "markdown", "sizeLines": 212, "fileCategory": "docs"}, {"path": "docs_first_principles/SUMMARY_FOR_PAPER.md", "language": "markdown", "sizeLines": 310, "fileCategory": "docs"}, {"path": "env/conda-list-cs3319.txt", "language": "txt", "sizeLines": 100, "fileCategory": "docs"}, {"path": "env/environment-cs3319.yml", "language": "yaml", "sizeLines": 106, "fileCategory": "config"}, {"path": "env/requirements-minimal.txt", "language": "txt", "sizeLines": 10, "fileCategory": "docs"}, {"path": "figures_paper/README_figures.md", "language": "markdown", "sizeLines": 115, "fileCategory": "docs"}, {"path": "figures_paper/scripts/fig1_graph_overview.py", "language": "python", "sizeLines": 96, "fileCategory": "code"}, {"path": "figures_paper/scripts/fig2_sparsity.py", "language": "python", "sizeLines": 91, "fileCategory": "code"}, {"path": "figures_paper/scripts/fig3_roadmap.py", "language": "python", "sizeLines": 90, "fileCategory": "code"}, {"path": "figures_paper/scripts/fig4_architecture.py", "language": "python", "sizeLines": 87, "fileCategory": "code"}, {"path": "figures_paper/scripts/fig5_ablation_highorder.py", "language": "python", "sizeLines": 96, "fileCategory": "code"}, {"path": "figures_paper/scripts/fig6_rank_vs_threshold.py", "language": "python", "sizeLines": 88, "fileCategory": "code"}, {"path": "figures_paper/scripts/fig7_error_heatmap.py", "language": "python", "sizeLines": 92, "fileCategory": "code"}, {"path": "figures_paper/scripts/figA1_hyperparam.py", "language": "python", "sizeLines": 51, "fileCategory": "code"}, {"path": "figures_paper/scripts/figA2_rw_ablation.py", "language": "python", "sizeLines": 44, "fileCategory": "code"}, {"path": "figures_paper/scripts/figA3_feature_importance.py", "language": "python", "sizeLines": 50, "fileCategory": "code"}, {"path": "figures_paper/scripts/figA4_oof_pr.py", "language": "python", "sizeLines": 61, "fileCategory": "code"}, {"path": "figures_paper/scripts/make_all_figures.py", "language": "python", "sizeLines": 119, "fileCategory": "code"}, {"path": "figures_paper/scripts/style.py", "language": "python", "sizeLines": 67, "fileCategory": "code"}, {"path": "notes/experiment_history.md", "language": "markdown", "sizeLines": 319, "fileCategory": "docs"}, {"path": "README.md", "language": "markdown", "sizeLines": 253, "fileCategory": "docs"}, {"path": "reports/exploration_summary.md", "language": "markdown", "sizeLines": 861, "fileCategory": "docs"}, {"path": "reports/final_report.md", "language": "markdown", "sizeLines": 202, "fileCategory": "docs"}, {"path": "reports/paper_writing_guide.md", "language": "markdown", "sizeLines": 321, "fileCategory": "docs"}, {"path": "reports/preliminary_report.md", "language": "markdown", "sizeLines": 175, "fileCategory": "docs"}, {"path": "WORKSPACE_STATUS.md", "language": "markdown", "sizeLines": 262, "fileCategory": "docs"}], "batchImportData": {"CLAUDE_zh.md": [], "CLAUDE.md": [], "code/compare_gnn.py": [], "code/content_rich_ablation.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py", "code/extra_score_sources_ablation.py"], "code/error_group_calibration.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py", "code/extra_score_sources_ablation.py"], "code/evaluate_val_checkpoints.py": [], "code/extra_score_sources_ablation.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py"], "code/figures/fig1_dataset_overview.py": ["code/figures/plot_style.py"], "code/figures/fig10_rw_ensemble_size.py": ["code/figures/plot_style.py"], "code/figures/fig2_framework.py": ["code/figures/plot_style.py"], "code/figures/fig3_progression.py": ["code/figures/plot_style.py"], "code/figures/fig4_highorder_ablation.py": ["code/figures/plot_style.py"], "code/figures/fig5_pr_roc.py": ["code/figures/plot_style.py"], "code/figures/fig6_feature_contribution.py": ["code/figures/plot_style.py"], "code/figures/fig7_error_analysis.py": ["code/figures/plot_style.py"], "code/figures/fig8_lgcn_ensemble_correlation.py": ["code/figures/plot_style.py"], "code/figures/fig9_lgcn_hyperparam.py": ["code/figures/plot_style.py"], "code/figures/gen_val_labels.py": [], "code/figures/plot_style.py": [], "code/generate_conservative_rw_blends.py": [], "code/generate_content_rich_submission.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py", "code/extra_score_sources_ablation.py", "code/content_rich_ablation.py"], "code/generate_dot_submission.py": [], "code/generate_ens6_submission.py": [], "code/generate_extra_bprmf_submission.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py", "code/extra_score_sources_ablation.py"], "code/generate_large_ensemble_submission.py": [], "code/generate_node2vec_deepwalk_submission.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py", "code/extra_score_sources_ablation.py", "code/node2vec_deepwalk_ablation.py"], "code/generate_post95_submission.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py"], "code/generate_randomwalk_ensemble_submission.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py", "code/extra_score_sources_ablation.py", "code/randomwalk_systematic_ablation.py"], "code/generate_randomwalk_single_submission.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py", "code/extra_score_sources_ablation.py", "code/randomwalk_systematic_ablation.py"], "code/high_order_graph_stack.py": [], "code/high_order_model_compare.py": [], "code/make_notebook_style_split.py": [], "code/node2vec_deepwalk_ablation.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py", "code/extra_score_sources_ablation.py"], "code/post95_ablation.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py"], "code/randomwalk_ensemble_ablation.py": ["code/generate_randomwalk_ensemble_submission.py", "code/randomwalk_systematic_ablation.py"], "code/randomwalk_one_ablation.py": ["code/randomwalk_systematic_ablation.py"], "code/randomwalk_systematic_ablation.py": ["code/stack_rank_calibration.py", "code/train_val_lgcn_ensemble.py", "code/post95_ablation.py", "code/generate_post95_submission.py", "code/extra_score_sources_ablation.py"], "code/rich_randomwalk_stack.py": [], "code/run_baseline.py": [], "code/run_final.py": [], "code/run_graph_features.py": [], "code/run_improved.py": [], "code/run_lgcn_final.py": [], "code/run_lgcn_v2.py": [], "code/run_ultimate.py": [], "code/run_v2.py": [], "code/score_level_meta_stack.py": [], "code/search_dynamic_fusion.py": [], "code/search_val_fusion.py": [], "code/stack_rank_calibration.py": [], "code/train_dynamic_feature_fusion.py": [], "code/train_val_hgt_bpr.py": [], "code/train_val_lgcn_ensemble.py": [], "code/train_val_mf_bpr.py": [], "code/train_val_sage_bpr.py": [], "data_and_docs/advice.md": [], "data_and_docs/dataset.md": [], "data_and_docs/project_description.md": [], "data_and_docs/project_evaluation.md": [], "data_and_docs/project-example-2026-pygver.ipynb": [], "data_and_docs/proposal.md": [], "data_and_docs/references.md": [], "docs_first_principles/_fact_sheet.md": [], "docs_first_principles/00_README.md": [], "docs_first_principles/01_problem_and_dataset.md": [], "docs_first_principles/02_architecture_overview.md": [], "docs_first_principles/03_data_flow_and_artifacts.md": [], "docs_first_principles/04_lightgcn_from_first_principles.md": [], "docs_first_principles/05_feature_stacking_and_lightgbm.md": [], "docs_first_principles/06_random_walk_features.md": [], "docs_first_principles/07_high_order_citation_propagation.md": [], "docs_first_principles/08_calibration_and_rank_cutoff.md": [], "docs_first_principles/09_experiment_timeline.md": [], "docs_first_principles/10_code_map_and_entrypoints.md": [], "docs_first_principles/11_figures_and_paper_mapping.md": [], "docs_first_principles/12_reproduction_guide.md": [], "docs_first_principles/13_common_questions_for_the_author.md": [], "docs_first_principles/SUMMARY_FOR_PAPER.md": [], "env/conda-list-cs3319.txt": [], "env/environment-cs3319.yml": [], "env/requirements-minimal.txt": [], "figures_paper/README_figures.md": [], "figures_paper/scripts/fig1_graph_overview.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/fig2_sparsity.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/fig3_roadmap.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/fig4_architecture.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/fig5_ablation_highorder.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/fig6_rank_vs_threshold.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/fig7_error_heatmap.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/figA1_hyperparam.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/figA2_rw_ablation.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/figA3_feature_importance.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/figA4_oof_pr.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/make_all_figures.py": ["figures_paper/scripts/style.py"], "figures_paper/scripts/style.py": [], "notes/experiment_history.md": [], "README.md": [], "reports/exploration_summary.md": [], "reports/final_report.md": [], "reports/paper_writing_guide.md": [], "reports/preliminary_report.md": [], "WORKSPACE_STATUS.md": []}} \ No newline at end of file diff --git a/.understand-anything/tmp/struct-output.json b/.understand-anything/tmp/struct-output.json new file mode 100644 index 0000000000000000000000000000000000000000..abcdc4d6ff366b155bbd387784ba94e4bde7de30 --- /dev/null +++ b/.understand-anything/tmp/struct-output.json @@ -0,0 +1,45175 @@ +{ + "scriptCompleted": true, + "filesAnalyzed": 102, + "filesSkipped": [], + "results": [ + { + "path": "CLAUDE_zh.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 207, + "nonEmptyLines": 157, + "sections": [ + { + "heading": "CLAUDE.md(中文版)", + "level": 1, + "line": 1 + }, + { + "heading": "本仓库是什么", + "level": 2, + "line": 5 + }, + { + "heading": "环境", + "level": 2, + "line": 19 + }, + { + "heading": "脚本运行方式(CLI 约定)", + "level": 2, + "line": 32 + }, + { + "heading": "复现最终结果", + "level": 3, + "line": 55 + }, + { + "heading": "运行单个实验", + "level": 3, + "line": 70 + }, + { + "heading": "端到端阶段顺序(如果从零开始重新生成,而非从缓存)", + "level": 3, + "line": 81 + }, + { + "heading": "架构:全局概览", + "level": 2, + "line": 91 + }, + { + "heading": "两阶段堆叠(Two-stage stacking)", + "level": 3, + "line": 93 + }, + { + "heading": "没有共享 utils 模块 —— 脚本在运行时互相加载", + "level": 3, + "line": 111 + }, + { + "heading": "验证框架:`dynamic_seed202`", + "level": 3, + "line": 139 + }, + { + "heading": "分数与特征文件约定", + "level": 3, + "line": 149 + }, + { + "heading": "提交决策规则(重要)", + "level": 3, + "line": 164 + }, + { + "heading": "关键约定与陷阱(gotchas)", + "level": 2, + "line": 178 + }, + { + "heading": "关键入口", + "level": 2, + "line": 193 + }, + { + "heading": "报告与文档", + "level": 2, + "line": 203 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 16 + } + }, + { + "path": "CLAUDE.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 218, + "nonEmptyLines": 168, + "sections": [ + { + "heading": "CLAUDE.md", + "level": 1, + "line": 1 + }, + { + "heading": "What this repository is", + "level": 2, + "line": 5 + }, + { + "heading": "Environment", + "level": 2, + "line": 21 + }, + { + "heading": "How scripts are run (CLI conventions)", + "level": 2, + "line": 34 + }, + { + "heading": "Reproduce the final result", + "level": 3, + "line": 58 + }, + { + "heading": "Running a single experiment", + "level": 3, + "line": 74 + }, + { + "heading": "End-to-end stage order (if regenerating from scratch, not from cache)", + "level": 3, + "line": 85 + }, + { + "heading": "Architecture: the big picture", + "level": 2, + "line": 96 + }, + { + "heading": "Two-stage stacking", + "level": 3, + "line": 98 + }, + { + "heading": "No shared utils module — scripts load each other at runtime", + "level": 3, + "line": 117 + }, + { + "heading": "Validation framework: `dynamic_seed202`", + "level": 3, + "line": 145 + }, + { + "heading": "Score & feature file conventions", + "level": 3, + "line": 156 + }, + { + "heading": "Submission decision rule (important)", + "level": 3, + "line": 172 + }, + { + "heading": "Critical conventions & gotchas", + "level": 2, + "line": 187 + }, + { + "heading": "Key entry points", + "level": 2, + "line": 204 + }, + { + "heading": "Reports & docs", + "level": 2, + "line": 214 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 16 + } + }, + { + "path": "code/compare_gnn.py", + "language": "python", + "fileCategory": "code", + "totalLines": 414, + "nonEmptyLines": 338, + "functions": [ + { + "name": "set_seed", + "startLine": 16, + "endLine": 19, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 24, + "endLine": 28, + "params": [ + "f" + ] + }, + { + "name": "log_norm", + "startLine": 58, + "endLine": 59, + "params": [ + "x" + ] + }, + { + "name": "build_data", + "startLine": 99, + "endLine": 111, + "params": [ + "edges_df" + ] + }, + { + "name": "sample_hard_neg", + "startLine": 114, + "endLine": 134, + "params": [ + "n" + ] + }, + { + "name": "cos_sim", + "startLine": 137, + "endLine": 138, + "params": [ + "a", + "b", + "eps" + ] + }, + { + "name": "evaluate", + "startLine": 142, + "endLine": 152, + "params": [ + "model", + "data" + ] + }, + { + "name": "make_vanilla_lgcn", + "startLine": 205, + "endLine": 230, + "params": [ + "edim", + "nlayers" + ] + }, + { + "name": "make_learnw_lgcn", + "startLine": 233, + "endLine": 259, + "params": [ + "edim", + "nlayers" + ] + }, + { + "name": "make_gat_lgcn", + "startLine": 262, + "endLine": 287, + "params": [ + "edim", + "nlayers", + "heads" + ] + }, + { + "name": "make_sage_lgcn", + "startLine": 290, + "endLine": 315, + "params": [ + "edim", + "nlayers" + ] + }, + { + "name": "make_deep_lgcn", + "startLine": 318, + "endLine": 343, + "params": [ + "edim", + "nlayers" + ] + }, + { + "name": "make_wide_lgcn", + "startLine": 346, + "endLine": 348, + "params": [ + "edim", + "nlayers" + ] + }, + { + "name": "run_trial", + "startLine": 354, + "endLine": 387, + "params": [ + "name", + "make_fn", + "epochs" + ] + } + ], + "classes": [ + { + "name": "MeanAggLayer", + "startLine": 159, + "endLine": 171, + "methods": [ + "forward" + ], + "properties": [] + }, + { + "name": "GATAggLayer", + "startLine": 174, + "endLine": 186, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "SAGEAggLayer", + "startLine": 189, + "endLine": 198, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 16, + "isDefault": false + }, + { + "name": "read_txt", + "line": 24, + "isDefault": false + }, + { + "name": "log_norm", + "line": 58, + "isDefault": false + }, + { + "name": "build_data", + "line": 99, + "isDefault": false + }, + { + "name": "sample_hard_neg", + "line": 114, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 137, + "isDefault": false + }, + { + "name": "evaluate", + "line": 141, + "isDefault": false + }, + { + "name": "MeanAggLayer", + "line": 159, + "isDefault": false + }, + { + "name": "GATAggLayer", + "line": 174, + "isDefault": false + }, + { + "name": "SAGEAggLayer", + "line": 189, + "isDefault": false + }, + { + "name": "make_vanilla_lgcn", + "line": 205, + "isDefault": false + }, + { + "name": "make_learnw_lgcn", + "line": 233, + "isDefault": false + }, + { + "name": "make_gat_lgcn", + "line": 262, + "isDefault": false + }, + { + "name": "make_sage_lgcn", + "line": 290, + "isDefault": false + }, + { + "name": "make_deep_lgcn", + "line": 318, + "isDefault": false + }, + { + "name": "make_wide_lgcn", + "line": 346, + "isDefault": false + }, + { + "name": "run_trial", + "line": 354, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 17 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 17 + }, + { + "caller": "set_seed", + "callee": "torch.manual_seed", + "lineNumber": 18 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.is_available", + "lineNumber": 19 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.manual_seed_all", + "lineNumber": 19 + }, + { + "caller": "read_txt", + "callee": "open", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "res.append", + "lineNumber": 27 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 27 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 27 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 27 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 27 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 59 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 59 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 59 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 100 + }, + { + "caller": "build_data", + "callee": "edges_df[['source','target']].to_numpy", + "lineNumber": 100 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 101 + }, + { + "caller": "build_data", + "callee": "df_cite[['source','target']].to_numpy", + "lineNumber": 101 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 102 + }, + { + "caller": "build_data", + "callee": "df_coa[['source','target']].to_numpy", + "lineNumber": 102 + }, + { + "caller": "build_data", + "callee": "HeteroData", + "lineNumber": 103 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 106 + }, + { + "caller": "build_data", + "callee": "rt.t().contiguous", + "lineNumber": 107 + }, + { + "caller": "build_data", + "callee": "rt.t", + "lineNumber": 107 + }, + { + "caller": "build_data", + "callee": "rt[:, [1,0]].t().contiguous", + "lineNumber": 108 + }, + { + "caller": "build_data", + "callee": "rt[:, [1,0]].t", + "lineNumber": 108 + }, + { + "caller": "build_data", + "callee": "torch.cat([ct, ct[:, [1,0]]], 0).t().contiguous", + "lineNumber": 109 + }, + { + "caller": "build_data", + "callee": "torch.cat([ct, ct[:, [1,0]]], 0).t", + "lineNumber": 109 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 109 + }, + { + "caller": "build_data", + "callee": "torch.cat([cot, cot[:, [1,0]]], 0).t().contiguous", + "lineNumber": 110 + }, + { + "caller": "build_data", + "callee": "torch.cat([cot, cot[:, [1,0]]], 0).t", + "lineNumber": 110 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 110 + }, + { + "caller": "build_data", + "callee": "d.to", + "lineNumber": 111 + }, + { + "caller": "add_rand", + "callee": "len", + "lineNumber": 118 + }, + { + "caller": "add_rand", + "callee": "np.random.randint", + "lineNumber": 119 + }, + { + "caller": "add_rand", + "callee": "np.random.randint", + "lineNumber": 119 + }, + { + "caller": "add_rand", + "callee": "nl.append", + "lineNumber": 120 + }, + { + "caller": "sample_hard_neg", + "callee": "add_rand", + "lineNumber": 121 + }, + { + "caller": "sample_hard_neg", + "callee": "int", + "lineNumber": 121 + }, + { + "caller": "sample_hard_neg", + "callee": "len", + "lineNumber": 123 + }, + { + "caller": "sample_hard_neg", + "callee": "int", + "lineNumber": 123 + }, + { + "caller": "sample_hard_neg", + "callee": "np.random.randint", + "lineNumber": 124 + }, + { + "caller": "sample_hard_neg", + "callee": "np.random.randint", + "lineNumber": 125 + }, + { + "caller": "sample_hard_neg", + "callee": "len", + "lineNumber": 125 + }, + { + "caller": "sample_hard_neg", + "callee": "nl.append", + "lineNumber": 126 + }, + { + "caller": "sample_hard_neg", + "callee": "len", + "lineNumber": 128 + }, + { + "caller": "sample_hard_neg", + "callee": "np.random.randint", + "lineNumber": 129 + }, + { + "caller": "sample_hard_neg", + "callee": "coauthor_pool.get", + "lineNumber": 130 + }, + { + "caller": "sample_hard_neg", + "callee": "np.random.randint", + "lineNumber": 131 + }, + { + "caller": "sample_hard_neg", + "callee": "len", + "lineNumber": 131 + }, + { + "caller": "sample_hard_neg", + "callee": "np.random.randint", + "lineNumber": 131 + }, + { + "caller": "sample_hard_neg", + "callee": "nl.append", + "lineNumber": 132 + }, + { + "caller": "sample_hard_neg", + "callee": "add_rand", + "lineNumber": 133 + }, + { + "caller": "sample_hard_neg", + "callee": "torch.tensor(nl[:n], dtype=torch.long, device=device).t().contiguous", + "lineNumber": 134 + }, + { + "caller": "sample_hard_neg", + "callee": "torch.tensor(nl[:n], dtype=torch.long, device=device).t", + "lineNumber": 134 + }, + { + "caller": "sample_hard_neg", + "callee": "torch.tensor", + "lineNumber": 134 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 138 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 138 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 138 + }, + { + "caller": "evaluate", + "callee": "model.eval", + "lineNumber": 143 + }, + { + "caller": "evaluate", + "callee": "model.encode", + "lineNumber": 144 + }, + { + "caller": "evaluate", + "callee": "v.cpu", + "lineNumber": 145 + }, + { + "caller": "evaluate", + "callee": "z.items", + "lineNumber": 145 + }, + { + "caller": "evaluate", + "callee": "VAL_DF[['source','target']].to_numpy", + "lineNumber": 146 + }, + { + "caller": "evaluate", + "callee": "cos_sim", + "lineNumber": 147 + }, + { + "caller": "evaluate", + "callee": "zc['author'][va[:,0]].numpy", + "lineNumber": 147 + }, + { + "caller": "evaluate", + "callee": "zc['paper'][va[:,1]].numpy", + "lineNumber": 147 + }, + { + "caller": "evaluate", + "callee": "VAL_DF['label'].to_numpy", + "lineNumber": 148 + }, + { + "caller": "evaluate", + "callee": "precision_recall_curve", + "lineNumber": 149 + }, + { + "caller": "evaluate", + "callee": "np.argmax", + "lineNumber": 151 + }, + { + "caller": "evaluate", + "callee": "roc_auc_score", + "lineNumber": 152 + }, + { + "caller": "evaluate", + "callee": "len", + "lineNumber": 152 + }, + { + "caller": "forward", + "callee": "sx.new_zeros", + "lineNumber": 166 + }, + { + "caller": "forward", + "callee": "xd[dt].size", + "lineNumber": 166 + }, + { + "caller": "forward", + "callee": "sx.size", + "lineNumber": 166 + }, + { + "caller": "forward", + "callee": "sx.new_zeros", + "lineNumber": 167 + }, + { + "caller": "forward", + "callee": "xd[dt].size", + "lineNumber": 167 + }, + { + "caller": "forward", + "callee": "a.index_add_", + "lineNumber": 168 + }, + { + "caller": "forward", + "callee": "d.index_add_", + "lineNumber": 169 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 169 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 169 + }, + { + "caller": "forward", + "callee": "ad[dt].append", + "lineNumber": 170 + }, + { + "caller": "forward", + "callee": "d.clamp", + "lineNumber": 170 + }, + { + "caller": "forward", + "callee": "sum", + "lineNumber": 171 + }, + { + "caller": "forward", + "callee": "len", + "lineNumber": 171 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 177 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 177 + }, + { + "caller": "__init__", + "callee": "HeteroConv", + "lineNumber": 178 + }, + { + "caller": "__init__", + "callee": "GATv2Conv", + "lineNumber": 179 + }, + { + "caller": "forward", + "callee": "self.conv", + "lineNumber": 185 + }, + { + "caller": "forward", + "callee": "h.get", + "lineNumber": 186 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 192 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 192 + }, + { + "caller": "__init__", + "callee": "HeteroConv", + "lineNumber": 193 + }, + { + "caller": "__init__", + "callee": "SAGEConv", + "lineNumber": 194 + }, + { + "caller": "forward", + "callee": "self.conv", + "lineNumber": 198 + }, + { + "caller": "make_vanilla_lgcn", + "callee": "nn.Module", + "lineNumber": 207 + }, + { + "caller": "make_vanilla_lgcn", + "callee": "nn.Embedding", + "lineNumber": 208 + }, + { + "caller": "make_vanilla_lgcn", + "callee": "nn.Linear", + "lineNumber": 209 + }, + { + "caller": "make_vanilla_lgcn", + "callee": "nn.ModuleList", + "lineNumber": 210 + }, + { + "caller": "make_vanilla_lgcn", + "callee": "MeanAggLayer", + "lineNumber": 210 + }, + { + "caller": "make_vanilla_lgcn", + "callee": "range", + "lineNumber": 210 + }, + { + "caller": "encode", + "callee": "m.pp", + "lineNumber": 215 + }, + { + "caller": "encode", + "callee": "l", + "lineNumber": 217 + }, + { + "caller": "encode", + "callee": "als.append", + "lineNumber": 217 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 219 + }, + { + "caller": "decode", + "callee": "(zd['author'][s] * zd['paper'][d]).sum", + "lineNumber": 222 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 225 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 226 + }, + { + "caller": "reset", + "callee": "nn.init.zeros_", + "lineNumber": 226 + }, + { + "caller": "make_vanilla_lgcn", + "callee": "m.reset_parameters", + "lineNumber": 229 + }, + { + "caller": "make_learnw_lgcn", + "callee": "nn.Module", + "lineNumber": 235 + }, + { + "caller": "make_learnw_lgcn", + "callee": "nn.Embedding", + "lineNumber": 236 + }, + { + "caller": "make_learnw_lgcn", + "callee": "nn.Linear", + "lineNumber": 237 + }, + { + "caller": "make_learnw_lgcn", + "callee": "nn.ModuleList", + "lineNumber": 238 + }, + { + "caller": "make_learnw_lgcn", + "callee": "MeanAggLayer", + "lineNumber": 238 + }, + { + "caller": "make_learnw_lgcn", + "callee": "range", + "lineNumber": 238 + }, + { + "caller": "make_learnw_lgcn", + "callee": "nn.Parameter", + "lineNumber": 240 + }, + { + "caller": "make_learnw_lgcn", + "callee": "torch.ones", + "lineNumber": 240 + }, + { + "caller": "encode", + "callee": "m.pp", + "lineNumber": 244 + }, + { + "caller": "encode", + "callee": "l", + "lineNumber": 246 + }, + { + "caller": "encode", + "callee": "als.append", + "lineNumber": 246 + }, + { + "caller": "encode", + "callee": "F.softmax", + "lineNumber": 247 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 248 + }, + { + "caller": "encode", + "callee": "enumerate", + "lineNumber": 248 + }, + { + "caller": "decode", + "callee": "(zd['author'][s] * zd['paper'][d]).sum", + "lineNumber": 251 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 254 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 255 + }, + { + "caller": "reset", + "callee": "nn.init.zeros_", + "lineNumber": 255 + }, + { + "caller": "make_learnw_lgcn", + "callee": "m.reset_parameters", + "lineNumber": 258 + }, + { + "caller": "make_gat_lgcn", + "callee": "nn.Module", + "lineNumber": 264 + }, + { + "caller": "make_gat_lgcn", + "callee": "nn.Embedding", + "lineNumber": 265 + }, + { + "caller": "make_gat_lgcn", + "callee": "nn.Linear", + "lineNumber": 266 + }, + { + "caller": "make_gat_lgcn", + "callee": "nn.ModuleList", + "lineNumber": 267 + }, + { + "caller": "make_gat_lgcn", + "callee": "GATAggLayer", + "lineNumber": 267 + }, + { + "caller": "make_gat_lgcn", + "callee": "range", + "lineNumber": 267 + }, + { + "caller": "encode", + "callee": "m.pp", + "lineNumber": 272 + }, + { + "caller": "encode", + "callee": "l", + "lineNumber": 274 + }, + { + "caller": "encode", + "callee": "als.append", + "lineNumber": 274 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 276 + }, + { + "caller": "decode", + "callee": "(zd['author'][s] * zd['paper'][d]).sum", + "lineNumber": 279 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 282 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 283 + }, + { + "caller": "reset", + "callee": "nn.init.zeros_", + "lineNumber": 283 + }, + { + "caller": "make_gat_lgcn", + "callee": "m.reset_parameters", + "lineNumber": 286 + }, + { + "caller": "make_sage_lgcn", + "callee": "nn.Module", + "lineNumber": 292 + }, + { + "caller": "make_sage_lgcn", + "callee": "nn.Embedding", + "lineNumber": 293 + }, + { + "caller": "make_sage_lgcn", + "callee": "nn.Linear", + "lineNumber": 294 + }, + { + "caller": "make_sage_lgcn", + "callee": "nn.ModuleList", + "lineNumber": 295 + }, + { + "caller": "make_sage_lgcn", + "callee": "SAGEAggLayer", + "lineNumber": 295 + }, + { + "caller": "make_sage_lgcn", + "callee": "range", + "lineNumber": 295 + }, + { + "caller": "encode", + "callee": "m.pp", + "lineNumber": 300 + }, + { + "caller": "encode", + "callee": "l", + "lineNumber": 302 + }, + { + "caller": "encode", + "callee": "als.append", + "lineNumber": 302 + }, + { + "caller": "encode", + "callee": "F.relu", + "lineNumber": 304 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 304 + }, + { + "caller": "decode", + "callee": "(zd['author'][s] * zd['paper'][d]).sum", + "lineNumber": 307 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 310 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 311 + }, + { + "caller": "reset", + "callee": "nn.init.zeros_", + "lineNumber": 311 + }, + { + "caller": "make_sage_lgcn", + "callee": "m.reset_parameters", + "lineNumber": 314 + }, + { + "caller": "make_deep_lgcn", + "callee": "nn.Module", + "lineNumber": 320 + }, + { + "caller": "make_deep_lgcn", + "callee": "nn.Embedding", + "lineNumber": 321 + }, + { + "caller": "make_deep_lgcn", + "callee": "nn.Linear", + "lineNumber": 322 + }, + { + "caller": "make_deep_lgcn", + "callee": "nn.ModuleList", + "lineNumber": 323 + }, + { + "caller": "make_deep_lgcn", + "callee": "MeanAggLayer", + "lineNumber": 323 + }, + { + "caller": "make_deep_lgcn", + "callee": "range", + "lineNumber": 323 + }, + { + "caller": "encode", + "callee": "m.pp", + "lineNumber": 328 + }, + { + "caller": "encode", + "callee": "l", + "lineNumber": 330 + }, + { + "caller": "encode", + "callee": "als.append", + "lineNumber": 330 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 332 + }, + { + "caller": "decode", + "callee": "(zd['author'][s] * zd['paper'][d]).sum", + "lineNumber": 335 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 338 + }, + { + "caller": "reset", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 339 + }, + { + "caller": "reset", + "callee": "nn.init.zeros_", + "lineNumber": 339 + }, + { + "caller": "make_deep_lgcn", + "callee": "m.reset_parameters", + "lineNumber": 342 + }, + { + "caller": "make_wide_lgcn", + "callee": "make_vanilla_lgcn", + "lineNumber": 348 + }, + { + "caller": "run_trial", + "callee": "print", + "lineNumber": 355 + }, + { + "caller": "run_trial", + "callee": "time.time", + "lineNumber": 356 + }, + { + "caller": "run_trial", + "callee": "set_seed", + "lineNumber": 357 + }, + { + "caller": "run_trial", + "callee": "build_data", + "lineNumber": 358 + }, + { + "caller": "run_trial", + "callee": "make_fn().to", + "lineNumber": 359 + }, + { + "caller": "run_trial", + "callee": "make_fn", + "lineNumber": 359 + }, + { + "caller": "run_trial", + "callee": "torch.optim.Adam", + "lineNumber": 360 + }, + { + "caller": "run_trial", + "callee": "model.parameters", + "lineNumber": 360 + }, + { + "caller": "run_trial", + "callee": "min", + "lineNumber": 362 + }, + { + "caller": "run_trial", + "callee": "pe.size", + "lineNumber": 362 + }, + { + "caller": "run_trial", + "callee": "range", + "lineNumber": 365 + }, + { + "caller": "run_trial", + "callee": "model.train", + "lineNumber": 366 + }, + { + "caller": "run_trial", + "callee": "torch.randperm", + "lineNumber": 367 + }, + { + "caller": "run_trial", + "callee": "pe.size", + "lineNumber": 367 + }, + { + "caller": "run_trial", + "callee": "sample_hard_neg", + "lineNumber": 369 + }, + { + "caller": "run_trial", + "callee": "pos.size", + "lineNumber": 369 + }, + { + "caller": "run_trial", + "callee": "model.encode", + "lineNumber": 370 + }, + { + "caller": "run_trial", + "callee": "model.decode(z, pos).repeat_interleave", + "lineNumber": 371 + }, + { + "caller": "run_trial", + "callee": "model.decode", + "lineNumber": 371 + }, + { + "caller": "run_trial", + "callee": "model.decode", + "lineNumber": 372 + }, + { + "caller": "run_trial", + "callee": "F.logsigmoid(ps - ns).mean", + "lineNumber": 373 + }, + { + "caller": "run_trial", + "callee": "F.logsigmoid", + "lineNumber": 373 + }, + { + "caller": "run_trial", + "callee": "opt.zero_grad", + "lineNumber": 374 + }, + { + "caller": "run_trial", + "callee": "loss.backward", + "lineNumber": 374 + }, + { + "caller": "run_trial", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 375 + }, + { + "caller": "run_trial", + "callee": "model.parameters", + "lineNumber": 375 + }, + { + "caller": "run_trial", + "callee": "opt.step", + "lineNumber": 376 + }, + { + "caller": "run_trial", + "callee": "evaluate", + "lineNumber": 379 + }, + { + "caller": "run_trial", + "callee": "print", + "lineNumber": 382 + }, + { + "caller": "run_trial", + "callee": "loss.item", + "lineNumber": 382 + }, + { + "caller": "run_trial", + "callee": "time.time", + "lineNumber": 384 + }, + { + "caller": "run_trial", + "callee": "sum", + "lineNumber": 385 + }, + { + "caller": "run_trial", + "callee": "p.numel", + "lineNumber": 385 + }, + { + "caller": "run_trial", + "callee": "model.parameters", + "lineNumber": 385 + }, + { + "caller": "run_trial", + "callee": "print", + "lineNumber": 386 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 17, + "functionCount": 14, + "classCount": 3 + } + }, + { + "path": "code/content_rich_ablation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 208, + "nonEmptyLines": 182, + "functions": [ + { + "name": "load_module", + "startLine": 17, + "endLine": 22, + "params": [ + "name", + "path" + ] + }, + { + "name": "best_f1", + "startLine": 25, + "endLine": 30, + "params": [ + "y", + "s" + ] + }, + { + "name": "fit_lgb_oof", + "startLine": 33, + "endLine": 51, + "params": [ + "X", + "y", + "seed", + "n_splits", + "ranker_like" + ] + }, + { + "name": "content_rich_features", + "startLine": 54, + "endLine": 129, + "params": [ + "root", + "pairs", + "builder" + ] + }, + { + "name": "main", + "startLine": 132, + "endLine": 204, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 17, + "isDefault": false + }, + { + "name": "best_f1", + "line": 25, + "isDefault": false + }, + { + "name": "fit_lgb_oof", + "line": 33, + "isDefault": false + }, + { + "name": "content_rich_features", + "line": 54, + "isDefault": false + }, + { + "name": "main", + "line": 132, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 18 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 19 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 21 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 26 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 29 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 29 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.zeros", + "lineNumber": 34 + }, + { + "caller": "fit_lgb_oof", + "callee": "len", + "lineNumber": 34 + }, + { + "caller": "fit_lgb_oof", + "callee": "StratifiedKFold", + "lineNumber": 35 + }, + { + "caller": "fit_lgb_oof", + "callee": "enumerate", + "lineNumber": 36 + }, + { + "caller": "fit_lgb_oof", + "callee": "skf.split", + "lineNumber": 36 + }, + { + "caller": "fit_lgb_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 37 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.fit", + "lineNumber": 49 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba", + "lineNumber": 50 + }, + { + "caller": "content_rich_features", + "callee": "cache.mkdir", + "lineNumber": 56 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 57 + }, + { + "caller": "content_rich_features", + "callee": "int", + "lineNumber": 57 + }, + { + "caller": "content_rich_features", + "callee": "pairs[:,0].sum", + "lineNumber": 57 + }, + { + "caller": "content_rich_features", + "callee": "int", + "lineNumber": 57 + }, + { + "caller": "content_rich_features", + "callee": "pairs[:,1].sum", + "lineNumber": 57 + }, + { + "caller": "content_rich_features", + "callee": "path.exists", + "lineNumber": 58 + }, + { + "caller": "content_rich_features", + "callee": "np.load", + "lineNumber": 59 + }, + { + "caller": "content_rich_features", + "callee": "(root / \"data_and_docs\" / \"feature.pkl\").open", + "lineNumber": 61 + }, + { + "caller": "content_rich_features", + "callee": "pkl.load(f).numpy().astype", + "lineNumber": 62 + }, + { + "caller": "content_rich_features", + "callee": "pkl.load(f).numpy", + "lineNumber": 62 + }, + { + "caller": "content_rich_features", + "callee": "pkl.load", + "lineNumber": 62 + }, + { + "caller": "content_rich_features", + "callee": "np.linalg.norm", + "lineNumber": 63 + }, + { + "caller": "content_rich_features", + "callee": "np.zeros", + "lineNumber": 67 + }, + { + "caller": "content_rich_features", + "callee": "np.zeros", + "lineNumber": 68 + }, + { + "caller": "content_rich_features", + "callee": "np.zeros", + "lineNumber": 69 + }, + { + "caller": "content_rich_features", + "callee": "np.zeros", + "lineNumber": 70 + }, + { + "caller": "content_rich_features", + "callee": "np.zeros", + "lineNumber": 71 + }, + { + "caller": "content_rich_features", + "callee": "range", + "lineNumber": 72 + }, + { + "caller": "content_rich_features", + "callee": "np.asarray", + "lineNumber": 73 + }, + { + "caller": "content_rich_features", + "callee": "list", + "lineNumber": 73 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 74 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 75 + }, + { + "caller": "content_rich_features", + "callee": "H.mean", + "lineNumber": 78 + }, + { + "caller": "content_rich_features", + "callee": "np.linalg.norm", + "lineNumber": 80 + }, + { + "caller": "content_rich_features", + "callee": "np.sum", + "lineNumber": 81 + }, + { + "caller": "content_rich_features", + "callee": "float", + "lineNumber": 82 + }, + { + "caller": "content_rich_features", + "callee": "np.sqrt", + "lineNumber": 82 + }, + { + "caller": "content_rich_features", + "callee": "dist.mean", + "lineNumber": 82 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 83 + }, + { + "caller": "content_rich_features", + "callee": "float", + "lineNumber": 85 + }, + { + "caller": "content_rich_features", + "callee": "sims.sum", + "lineNumber": 85 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 85 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 85 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 85 + }, + { + "caller": "content_rich_features", + "callee": "np.zeros", + "lineNumber": 89 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 89 + }, + { + "caller": "content_rich_features", + "callee": "np.argsort", + "lineNumber": 90 + }, + { + "caller": "content_rich_features", + "callee": "np.flatnonzero", + "lineNumber": 92 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 92 + }, + { + "caller": "content_rich_features", + "callee": "zip", + "lineNumber": 93 + }, + { + "caller": "content_rich_features", + "callee": "int", + "lineNumber": 95 + }, + { + "caller": "content_rich_features", + "callee": "pairs[idx, 1].astype", + "lineNumber": 96 + }, + { + "caller": "content_rich_features", + "callee": "np.sqrt", + "lineNumber": 99 + }, + { + "caller": "content_rich_features", + "callee": "np.sum", + "lineNumber": 99 + }, + { + "caller": "content_rich_features", + "callee": "np.log1p", + "lineNumber": 103 + }, + { + "caller": "content_rich_features", + "callee": "np.asarray", + "lineNumber": 107 + }, + { + "caller": "content_rich_features", + "callee": "list", + "lineNumber": 107 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 108 + }, + { + "caller": "content_rich_features", + "callee": "sims.max", + "lineNumber": 111 + }, + { + "caller": "content_rich_features", + "callee": "sims.mean", + "lineNumber": 112 + }, + { + "caller": "content_rich_features", + "callee": "sims.std", + "lineNumber": 113 + }, + { + "caller": "content_rich_features", + "callee": "np.median", + "lineNumber": 114 + }, + { + "caller": "content_rich_features", + "callee": "min", + "lineNumber": 116 + }, + { + "caller": "content_rich_features", + "callee": "np.partition(sims, -kk, axis=1)[:, -kk:].mean", + "lineNumber": 117 + }, + { + "caller": "content_rich_features", + "callee": "np.partition", + "lineNumber": 117 + }, + { + "caller": "content_rich_features", + "callee": "(sims > 0.5).mean", + "lineNumber": 118 + }, + { + "caller": "content_rich_features", + "callee": "(sims > 0.7).mean", + "lineNumber": 119 + }, + { + "caller": "content_rich_features", + "callee": "np.argsort", + "lineNumber": 122 + }, + { + "caller": "content_rich_features", + "callee": "np.linspace", + "lineNumber": 123 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 123 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 123 + }, + { + "caller": "content_rich_features", + "callee": "np.array", + "lineNumber": 123 + }, + { + "caller": "content_rich_features", + "callee": "np.zeros", + "lineNumber": 124 + }, + { + "caller": "content_rich_features", + "callee": "len", + "lineNumber": 124 + }, + { + "caller": "content_rich_features", + "callee": "np.save", + "lineNumber": 128 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 137 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 142 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 145 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 146 + }, + { + "caller": "main", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 149 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 150 + }, + { + "caller": "main", + "callee": "np.load(args.main_val_score_file).astype", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 153 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 155 + }, + { + "caller": "main", + "callee": "builder.transform", + "lineNumber": 156 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(pairs, main),\n X_hand,\n post.negative_evidence_features(X_hand, main),\n gen.topk_content_similarity_fast(root, pairs, builder),\n ]\n ).astype", + "lineNumber": 157 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 157 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 159 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 162 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, gen.variant_feature_matrix(post, [np.load(p).astype(np.float32) for p in selected])]).astype", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "np.load(p).astype", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 167 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"extra_score_sources\" / f\"val_mf_bpr_s{args.seed}_d256.npy\").astype", + "lineNumber": 168 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 168 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 169 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 170 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, Xc, Xm]).astype", + "lineNumber": 171 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 171 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 174 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 175 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 176 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 177 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "content_rich_features", + "lineNumber": 181 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 182 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 183 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 187 + }, + { + "caller": "main", + "callee": "np.column_stack([X_cm, X_rich]).astype", + "lineNumber": 188 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 188 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 189 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 190 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 191 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 192 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 194 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 195 + }, + { + "caller": "main", + "callee": "np.column_stack([X_all, X_score]).astype", + "lineNumber": 196 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 196 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 197 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 198 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 199 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 200 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 202 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 202 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 203 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 204 + }, + { + "caller": "main", + "callee": "result.to_string", + "lineNumber": 204 + } + ], + "metrics": { + "importCount": 5, + "exportCount": 5, + "functionCount": 5, + "classCount": 0 + } + }, + { + "path": "code/error_group_calibration.py", + "language": "python", + "fileCategory": "code", + "totalLines": 800, + "nonEmptyLines": 720, + "functions": [ + { + "name": "load_module", + "startLine": 44, + "endLine": 49, + "params": [ + "name", + "path" + ] + }, + { + "name": "read_txt", + "startLine": 52, + "endLine": 53, + "params": [ + "path" + ] + }, + { + "name": "prf", + "startLine": 56, + "endLine": 65, + "params": [ + "y", + "pred" + ] + }, + { + "name": "best_f1", + "startLine": 68, + "endLine": 73, + "params": [ + "y", + "score" + ] + }, + { + "name": "score_at_threshold", + "startLine": 76, + "endLine": 88, + "params": [ + "y", + "score", + "th" + ] + }, + { + "name": "rank01", + "startLine": 91, + "endLine": 95, + "params": [ + "x" + ] + }, + { + "name": "zscore", + "startLine": 98, + "endLine": 99, + "params": [ + "x" + ] + }, + { + "name": "author_rank01", + "startLine": 102, + "endLine": 110, + "params": [ + "pairs", + "score" + ] + }, + { + "name": "author_rank_position", + "startLine": 113, + "endLine": 122, + "params": [ + "pairs", + "score", + "descending" + ] + }, + { + "name": "score_features", + "startLine": 125, + "endLine": 129, + "params": [ + "scores", + "prefix", + "pairs" + ] + }, + { + "name": "fit_lgb_oof", + "startLine": 132, + "endLine": 164, + "params": [ + "X", + "y", + "seed", + "n_splits", + "train_mask", + "params" + ] + }, + { + "name": "fit_full_lgb", + "startLine": 167, + "endLine": 184, + "params": [ + "X", + "y", + "seed", + "params" + ] + }, + { + "name": "average_predict", + "startLine": 187, + "endLine": 192, + "params": [ + "models", + "X" + ] + }, + { + "name": "bucket_cut", + "startLine": 195, + "endLine": 201, + "params": [ + "values", + "name", + "bins" + ] + }, + { + "name": "bucket_quantile", + "startLine": 204, + "endLine": 205, + "params": [ + "values", + "name", + "q" + ] + }, + { + "name": "load_submission_pred", + "startLine": 208, + "endLine": 209, + "params": [ + "path" + ] + }, + { + "name": "write_submission", + "startLine": 212, + "endLine": 222, + "params": [ + "path", + "score", + "known", + "threshold", + "ratio" + ] + }, + { + "name": "write_group_submission", + "startLine": 225, + "endLine": 238, + "params": [ + "path", + "score", + "groups", + "thresholds", + "known" + ] + }, + { + "name": "group_threshold", + "startLine": 241, + "endLine": 258, + "params": [ + "y", + "score", + "groups" + ] + }, + { + "name": "summarize_pred", + "startLine": 261, + "endLine": 274, + "params": [ + "name", + "y", + "score", + "pred", + "path", + "anchor_pred" + ] + }, + { + "name": "build_feature_names", + "startLine": 277, + "endLine": 298, + "params": [ + "selected", + "rw_names" + ] + }, + { + "name": "build_val_test_context", + "startLine": 301, + "endLine": 413, + "params": [ + "root", + "split_seed", + "main_val_score_file" + ] + }, + { + "name": "error_analysis", + "startLine": 416, + "endLine": 453, + "params": [ + "ctx", + "pred", + "out_dir" + ] + }, + { + "name": "add_agreement_features", + "startLine": 456, + "endLine": 517, + "params": [ + "ctx" + ] + }, + { + "name": "boundary_features", + "startLine": 520, + "endLine": 583, + "params": [ + "ctx", + "agreement", + "agreement_test" + ] + }, + { + "name": "main", + "startLine": 586, + "endLine": 796, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 44, + "isDefault": false + }, + { + "name": "read_txt", + "line": 52, + "isDefault": false + }, + { + "name": "prf", + "line": 56, + "isDefault": false + }, + { + "name": "best_f1", + "line": 68, + "isDefault": false + }, + { + "name": "score_at_threshold", + "line": 76, + "isDefault": false + }, + { + "name": "rank01", + "line": 91, + "isDefault": false + }, + { + "name": "zscore", + "line": 98, + "isDefault": false + }, + { + "name": "author_rank01", + "line": 102, + "isDefault": false + }, + { + "name": "author_rank_position", + "line": 113, + "isDefault": false + }, + { + "name": "score_features", + "line": 125, + "isDefault": false + }, + { + "name": "fit_lgb_oof", + "line": 132, + "isDefault": false + }, + { + "name": "fit_full_lgb", + "line": 167, + "isDefault": false + }, + { + "name": "average_predict", + "line": 187, + "isDefault": false + }, + { + "name": "bucket_cut", + "line": 195, + "isDefault": false + }, + { + "name": "bucket_quantile", + "line": 204, + "isDefault": false + }, + { + "name": "load_submission_pred", + "line": 208, + "isDefault": false + }, + { + "name": "write_submission", + "line": 212, + "isDefault": false + }, + { + "name": "write_group_submission", + "line": 225, + "isDefault": false + }, + { + "name": "group_threshold", + "line": 241, + "isDefault": false + }, + { + "name": "summarize_pred", + "line": 261, + "isDefault": false + }, + { + "name": "build_feature_names", + "line": 277, + "isDefault": false + }, + { + "name": "build_val_test_context", + "line": 301, + "isDefault": false + }, + { + "name": "error_analysis", + "line": 416, + "isDefault": false + }, + { + "name": "add_agreement_features", + "line": 456, + "isDefault": false + }, + { + "name": "boundary_features", + "line": 520, + "isDefault": false + }, + { + "name": "main", + "line": 586, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 45 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 46 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 48 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 53 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 53 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 53 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 53 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 53 + }, + { + "caller": "prf", + "callee": "y.astype", + "lineNumber": 57 + }, + { + "caller": "prf", + "callee": "pred.astype", + "lineNumber": 58 + }, + { + "caller": "prf", + "callee": "int", + "lineNumber": 59 + }, + { + "caller": "prf", + "callee": "((pred == 1) & (y == 1)).sum", + "lineNumber": 59 + }, + { + "caller": "prf", + "callee": "int", + "lineNumber": 60 + }, + { + "caller": "prf", + "callee": "((pred == 1) & (y == 0)).sum", + "lineNumber": 60 + }, + { + "caller": "prf", + "callee": "int", + "lineNumber": 61 + }, + { + "caller": "prf", + "callee": "((pred == 0) & (y == 1)).sum", + "lineNumber": 61 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 69 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 71 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 71 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 72 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 72 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 73 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 73 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 73 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 73 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 73 + }, + { + "caller": "score_at_threshold", + "callee": "(score >= th).astype", + "lineNumber": 77 + }, + { + "caller": "score_at_threshold", + "callee": "prf", + "lineNumber": 78 + }, + { + "caller": "score_at_threshold", + "callee": "float", + "lineNumber": 80 + }, + { + "caller": "score_at_threshold", + "callee": "float", + "lineNumber": 84 + }, + { + "caller": "score_at_threshold", + "callee": "pred.mean", + "lineNumber": 84 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 92 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 93 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 93 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 94 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 94 + }, + { + "caller": "zscore", + "callee": "((x - x.mean()) / (x.std() + 1e-8)).astype", + "lineNumber": 99 + }, + { + "caller": "zscore", + "callee": "x.mean", + "lineNumber": 99 + }, + { + "caller": "zscore", + "callee": "x.std", + "lineNumber": 99 + }, + { + "caller": "author_rank01", + "callee": "np.zeros", + "lineNumber": 103 + }, + { + "caller": "author_rank01", + "callee": "len", + "lineNumber": 103 + }, + { + "caller": "author_rank01", + "callee": "pd.DataFrame", + "lineNumber": 104 + }, + { + "caller": "author_rank01", + "callee": "np.arange", + "lineNumber": 104 + }, + { + "caller": "author_rank01", + "callee": "len", + "lineNumber": 104 + }, + { + "caller": "author_rank01", + "callee": "df.groupby", + "lineNumber": 105 + }, + { + "caller": "author_rank01", + "callee": "g[\"idx\"].to_numpy", + "lineNumber": 106 + }, + { + "caller": "author_rank01", + "callee": "np.argsort", + "lineNumber": 107 + }, + { + "caller": "author_rank01", + "callee": "g[\"score\"].to_numpy", + "lineNumber": 107 + }, + { + "caller": "author_rank01", + "callee": "np.linspace", + "lineNumber": 108 + }, + { + "caller": "author_rank01", + "callee": "len", + "lineNumber": 108 + }, + { + "caller": "author_rank01", + "callee": "len", + "lineNumber": 108 + }, + { + "caller": "author_rank01", + "callee": "np.array", + "lineNumber": 108 + }, + { + "caller": "author_rank_position", + "callee": "np.zeros", + "lineNumber": 114 + }, + { + "caller": "author_rank_position", + "callee": "len", + "lineNumber": 114 + }, + { + "caller": "author_rank_position", + "callee": "pd.DataFrame", + "lineNumber": 115 + }, + { + "caller": "author_rank_position", + "callee": "np.arange", + "lineNumber": 115 + }, + { + "caller": "author_rank_position", + "callee": "len", + "lineNumber": 115 + }, + { + "caller": "author_rank_position", + "callee": "df.groupby", + "lineNumber": 116 + }, + { + "caller": "author_rank_position", + "callee": "g[\"idx\"].to_numpy", + "lineNumber": 117 + }, + { + "caller": "author_rank_position", + "callee": "np.argsort", + "lineNumber": 118 + }, + { + "caller": "author_rank_position", + "callee": "g[\"score\"].to_numpy", + "lineNumber": 118 + }, + { + "caller": "author_rank_position", + "callee": "np.arange", + "lineNumber": 121 + }, + { + "caller": "author_rank_position", + "callee": "len", + "lineNumber": 121 + }, + { + "caller": "score_features", + "callee": "np.column_stack([scores.astype(np.float32), zscore(scores), rank01(scores), author_rank01(pairs, scores)]).astype", + "lineNumber": 127 + }, + { + "caller": "score_features", + "callee": "np.column_stack", + "lineNumber": 127 + }, + { + "caller": "score_features", + "callee": "scores.astype", + "lineNumber": 127 + }, + { + "caller": "score_features", + "callee": "zscore", + "lineNumber": 127 + }, + { + "caller": "score_features", + "callee": "rank01", + "lineNumber": 127 + }, + { + "caller": "score_features", + "callee": "author_rank01", + "lineNumber": 127 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.zeros", + "lineNumber": 140 + }, + { + "caller": "fit_lgb_oof", + "callee": "len", + "lineNumber": 140 + }, + { + "caller": "fit_lgb_oof", + "callee": "dict", + "lineNumber": 142 + }, + { + "caller": "fit_lgb_oof", + "callee": "base_params.update", + "lineNumber": 154 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.arange", + "lineNumber": 155 + }, + { + "caller": "fit_lgb_oof", + "callee": "len", + "lineNumber": 155 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.flatnonzero", + "lineNumber": 155 + }, + { + "caller": "fit_lgb_oof", + "callee": "StratifiedKFold", + "lineNumber": 156 + }, + { + "caller": "fit_lgb_oof", + "callee": "enumerate", + "lineNumber": 157 + }, + { + "caller": "fit_lgb_oof", + "callee": "skf.split", + "lineNumber": 157 + }, + { + "caller": "fit_lgb_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 160 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.fit", + "lineNumber": 161 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba", + "lineNumber": 162 + }, + { + "caller": "fit_lgb_oof", + "callee": "models.append", + "lineNumber": 163 + }, + { + "caller": "fit_full_lgb", + "callee": "dict", + "lineNumber": 168 + }, + { + "caller": "fit_full_lgb", + "callee": "base_params.update", + "lineNumber": 181 + }, + { + "caller": "fit_full_lgb", + "callee": "lgb.LGBMClassifier", + "lineNumber": 182 + }, + { + "caller": "fit_full_lgb", + "callee": "clf.fit", + "lineNumber": 183 + }, + { + "caller": "average_predict", + "callee": "np.zeros", + "lineNumber": 188 + }, + { + "caller": "average_predict", + "callee": "m.predict_proba(X)[:, 1].astype", + "lineNumber": 190 + }, + { + "caller": "average_predict", + "callee": "m.predict_proba", + "lineNumber": 190 + }, + { + "caller": "average_predict", + "callee": "max", + "lineNumber": 191 + }, + { + "caller": "average_predict", + "callee": "len", + "lineNumber": 191 + }, + { + "caller": "bucket_cut", + "callee": "zip", + "lineNumber": 197 + }, + { + "caller": "bucket_cut", + "callee": "np.isneginf", + "lineNumber": 198 + }, + { + "caller": "bucket_cut", + "callee": "np.isposinf", + "lineNumber": 199 + }, + { + "caller": "bucket_cut", + "callee": "labels.append", + "lineNumber": 200 + }, + { + "caller": "bucket_cut", + "callee": "np.asarray", + "lineNumber": 201 + }, + { + "caller": "bucket_cut", + "callee": "pd.cut(values, bins=bins, labels=labels, include_lowest=True, right=False).astype", + "lineNumber": 201 + }, + { + "caller": "bucket_cut", + "callee": "pd.cut", + "lineNumber": 201 + }, + { + "caller": "bucket_quantile", + "callee": "np.asarray", + "lineNumber": 205 + }, + { + "caller": "bucket_quantile", + "callee": "pd.qcut(values, q=q, duplicates=\"drop\").astype", + "lineNumber": 205 + }, + { + "caller": "bucket_quantile", + "callee": "pd.qcut", + "lineNumber": 205 + }, + { + "caller": "load_submission_pred", + "callee": "pd.read_csv(path)[\"Predicted\"].to_numpy", + "lineNumber": 209 + }, + { + "caller": "load_submission_pred", + "callee": "pd.read_csv", + "lineNumber": 209 + }, + { + "caller": "write_submission", + "callee": "ValueError", + "lineNumber": 214 + }, + { + "caller": "write_submission", + "callee": "(score >= threshold).astype", + "lineNumber": 216 + }, + { + "caller": "write_submission", + "callee": "np.zeros", + "lineNumber": 218 + }, + { + "caller": "write_submission", + "callee": "len", + "lineNumber": 218 + }, + { + "caller": "write_submission", + "callee": "np.argsort", + "lineNumber": 219 + }, + { + "caller": "write_submission", + "callee": "int", + "lineNumber": 219 + }, + { + "caller": "write_submission", + "callee": "round", + "lineNumber": 219 + }, + { + "caller": "write_submission", + "callee": "len", + "lineNumber": 219 + }, + { + "caller": "write_submission", + "callee": "float", + "lineNumber": 219 + }, + { + "caller": "write_submission", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 221 + }, + { + "caller": "write_submission", + "callee": "pd.DataFrame", + "lineNumber": 221 + }, + { + "caller": "write_submission", + "callee": "np.arange", + "lineNumber": 221 + }, + { + "caller": "write_submission", + "callee": "len", + "lineNumber": 221 + }, + { + "caller": "write_group_submission", + "callee": "np.zeros", + "lineNumber": 232 + }, + { + "caller": "write_group_submission", + "callee": "len", + "lineNumber": 232 + }, + { + "caller": "write_group_submission", + "callee": "thresholds.items", + "lineNumber": 233 + }, + { + "caller": "write_group_submission", + "callee": "(score[mask] >= th).astype", + "lineNumber": 235 + }, + { + "caller": "write_group_submission", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 237 + }, + { + "caller": "write_group_submission", + "callee": "pd.DataFrame", + "lineNumber": 237 + }, + { + "caller": "write_group_submission", + "callee": "np.arange", + "lineNumber": 237 + }, + { + "caller": "write_group_submission", + "callee": "len", + "lineNumber": 237 + }, + { + "caller": "group_threshold", + "callee": "np.zeros", + "lineNumber": 242 + }, + { + "caller": "group_threshold", + "callee": "len", + "lineNumber": 242 + }, + { + "caller": "group_threshold", + "callee": "pd.Series(groups).dropna().unique", + "lineNumber": 245 + }, + { + "caller": "group_threshold", + "callee": "pd.Series(groups).dropna", + "lineNumber": 245 + }, + { + "caller": "group_threshold", + "callee": "pd.Series", + "lineNumber": 245 + }, + { + "caller": "group_threshold", + "callee": "str", + "lineNumber": 246 + }, + { + "caller": "group_threshold", + "callee": "int", + "lineNumber": 248 + }, + { + "caller": "group_threshold", + "callee": "mask.sum", + "lineNumber": 248 + }, + { + "caller": "group_threshold", + "callee": "len", + "lineNumber": 248 + }, + { + "caller": "group_threshold", + "callee": "np.unique", + "lineNumber": 248 + }, + { + "caller": "group_threshold", + "callee": "best_f1", + "lineNumber": 249 + }, + { + "caller": "group_threshold", + "callee": "best_f1", + "lineNumber": 251 + }, + { + "caller": "group_threshold", + "callee": "float", + "lineNumber": 252 + }, + { + "caller": "group_threshold", + "callee": "(score[mask] >= th).astype", + "lineNumber": 253 + }, + { + "caller": "group_threshold", + "callee": "prf", + "lineNumber": 254 + }, + { + "caller": "group_threshold", + "callee": "rows.append", + "lineNumber": 255 + }, + { + "caller": "group_threshold", + "callee": "int", + "lineNumber": 255 + }, + { + "caller": "group_threshold", + "callee": "mask.sum", + "lineNumber": 255 + }, + { + "caller": "group_threshold", + "callee": "prf", + "lineNumber": 256 + }, + { + "caller": "group_threshold", + "callee": "float", + "lineNumber": 257 + }, + { + "caller": "group_threshold", + "callee": "pred.mean", + "lineNumber": 257 + }, + { + "caller": "summarize_pred", + "callee": "prf", + "lineNumber": 262 + }, + { + "caller": "summarize_pred", + "callee": "float", + "lineNumber": 268 + }, + { + "caller": "summarize_pred", + "callee": "pred.mean", + "lineNumber": 268 + }, + { + "caller": "summarize_pred", + "callee": "str", + "lineNumber": 272 + }, + { + "caller": "summarize_pred", + "callee": "int", + "lineNumber": 273 + }, + { + "caller": "summarize_pred", + "callee": "(load_submission_pred(path) != anchor_pred).sum", + "lineNumber": 273 + }, + { + "caller": "summarize_pred", + "callee": "load_submission_pred", + "lineNumber": 273 + }, + { + "caller": "build_val_test_context", + "callee": "root.resolve", + "lineNumber": 302 + }, + { + "caller": "build_val_test_context", + "callee": "load_module", + "lineNumber": 303 + }, + { + "caller": "build_val_test_context", + "callee": "load_module", + "lineNumber": 304 + }, + { + "caller": "build_val_test_context", + "callee": "load_module", + "lineNumber": 305 + }, + { + "caller": "build_val_test_context", + "callee": "load_module", + "lineNumber": 306 + }, + { + "caller": "build_val_test_context", + "callee": "load_module", + "lineNumber": 307 + }, + { + "caller": "build_val_test_context", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 309 + }, + { + "caller": "build_val_test_context", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 310 + }, + { + "caller": "build_val_test_context", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 311 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(main_val_score_file).astype", + "lineNumber": 312 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 312 + }, + { + "caller": "build_val_test_context", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 313 + }, + { + "caller": "build_val_test_context", + "callee": "val_builder.transform", + "lineNumber": 314 + }, + { + "caller": "build_val_test_context", + "callee": "Path", + "lineNumber": 316 + }, + { + "caller": "build_val_test_context", + "callee": "x.strip", + "lineNumber": 316 + }, + { + "caller": "build_val_test_context", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 316 + }, + { + "caller": "build_val_test_context", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 316 + }, + { + "caller": "build_val_test_context", + "callee": "x.strip", + "lineNumber": 316 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack(\n [\n stack.add_rank_features(val_arr, main_val),\n Xh_val,\n post.negative_evidence_features(Xh_val, main_val),\n gen.topk_content_similarity_fast(root, val_arr, val_builder),\n gen.variant_feature_matrix(post, [np.load(p).astype(np.float32) for p in selected]),\n ]\n ).astype", + "lineNumber": 317 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack", + "lineNumber": 317 + }, + { + "caller": "build_val_test_context", + "callee": "stack.add_rank_features", + "lineNumber": 319 + }, + { + "caller": "build_val_test_context", + "callee": "post.negative_evidence_features", + "lineNumber": 321 + }, + { + "caller": "build_val_test_context", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 322 + }, + { + "caller": "build_val_test_context", + "callee": "gen.variant_feature_matrix", + "lineNumber": 323 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(p).astype", + "lineNumber": 323 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 323 + }, + { + "caller": "build_val_test_context", + "callee": "extra.content_mean_score", + "lineNumber": 326 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"extra_score_sources\" / f\"val_mf_bpr_s{split_seed}_d256.npy\").astype", + "lineNumber": 327 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 327 + }, + { + "caller": "build_val_test_context", + "callee": "score_features", + "lineNumber": 328 + }, + { + "caller": "build_val_test_context", + "callee": "score_features", + "lineNumber": 329 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack([X_val, Xc_val, Xm_val]).astype", + "lineNumber": 330 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack", + "lineNumber": 330 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(base_dir / f\"{name}_cos_{len(val_arr)}_{int(val_arr[:,0].sum())}_{int(val_arr[:,1].sum())}.npy\").astype", + "lineNumber": 336 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 336 + }, + { + "caller": "build_val_test_context", + "callee": "len", + "lineNumber": 336 + }, + { + "caller": "build_val_test_context", + "callee": "int", + "lineNumber": 336 + }, + { + "caller": "build_val_test_context", + "callee": "val_arr[:,0].sum", + "lineNumber": 336 + }, + { + "caller": "build_val_test_context", + "callee": "int", + "lineNumber": 336 + }, + { + "caller": "build_val_test_context", + "callee": "val_arr[:,1].sum", + "lineNumber": 336 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(base_dir / f\"{name}_dot_{len(val_arr)}_{int(val_arr[:,0].sum())}_{int(val_arr[:,1].sum())}.npy\").astype", + "lineNumber": 337 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 337 + }, + { + "caller": "build_val_test_context", + "callee": "len", + "lineNumber": 337 + }, + { + "caller": "build_val_test_context", + "callee": "int", + "lineNumber": 337 + }, + { + "caller": "build_val_test_context", + "callee": "val_arr[:,0].sum", + "lineNumber": 337 + }, + { + "caller": "build_val_test_context", + "callee": "int", + "lineNumber": 337 + }, + { + "caller": "build_val_test_context", + "callee": "val_arr[:,1].sum", + "lineNumber": 337 + }, + { + "caller": "build_val_test_context", + "callee": "score_features", + "lineNumber": 340 + }, + { + "caller": "build_val_test_context", + "callee": "score_features", + "lineNumber": 341 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack([X_val, Xcos, Xdot]).astype", + "lineNumber": 343 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack", + "lineNumber": 343 + }, + { + "caller": "build_val_test_context", + "callee": "np.array", + "lineNumber": 345 + }, + { + "caller": "build_val_test_context", + "callee": "read_txt", + "lineNumber": 345 + }, + { + "caller": "build_val_test_context", + "callee": "pd.DataFrame", + "lineNumber": 346 + }, + { + "caller": "build_val_test_context", + "callee": "read_txt", + "lineNumber": 346 + }, + { + "caller": "build_val_test_context", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 347 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"post95_test_scores\" / \"dyn202_l2d512_bpr_bigbatch_more\" / \"scores\" / \"test_vanilla_ensemble_mean.npy\").astype", + "lineNumber": 348 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 348 + }, + { + "caller": "build_val_test_context", + "callee": "test_builder.transform", + "lineNumber": 349 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack(\n [\n stack.add_rank_features(test_arr, main_test),\n Xh_test,\n post.negative_evidence_features(Xh_test, main_test),\n gen.topk_content_similarity_fast(root, test_arr, test_builder),\n ]\n ).astype", + "lineNumber": 350 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack", + "lineNumber": 350 + }, + { + "caller": "build_val_test_context", + "callee": "stack.add_rank_features", + "lineNumber": 352 + }, + { + "caller": "build_val_test_context", + "callee": "post.negative_evidence_features", + "lineNumber": 354 + }, + { + "caller": "build_val_test_context", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 355 + }, + { + "caller": "build_val_test_context", + "callee": "p.resolve().relative_to", + "lineNumber": 360 + }, + { + "caller": "build_val_test_context", + "callee": "p.resolve", + "lineNumber": 360 + }, + { + "caller": "build_val_test_context", + "callee": "rel.name.replace", + "lineNumber": 361 + }, + { + "caller": "build_val_test_context", + "callee": "test_variant_scores.append", + "lineNumber": 362 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(tp).astype", + "lineNumber": 362 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 362 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack([X_test, gen.variant_feature_matrix(post, test_variant_scores)]).astype", + "lineNumber": 363 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack", + "lineNumber": 363 + }, + { + "caller": "build_val_test_context", + "callee": "gen.variant_feature_matrix", + "lineNumber": 363 + }, + { + "caller": "build_val_test_context", + "callee": "extra.content_mean_score", + "lineNumber": 364 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"extra_bprmf_submission\" / \"test_mf_bpr_dynamic_s202_d256_e220.npy\").astype", + "lineNumber": 365 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 365 + }, + { + "caller": "build_val_test_context", + "callee": "score_features", + "lineNumber": 366 + }, + { + "caller": "build_val_test_context", + "callee": "score_features", + "lineNumber": 367 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack([X_test, Xc_test, Xm_test]).astype", + "lineNumber": 368 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack", + "lineNumber": 368 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(base_dir / f\"{name}_cos_{len(test_arr)}_{int(test_arr[:,0].sum())}_{int(test_arr[:,1].sum())}.npy\").astype", + "lineNumber": 372 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 372 + }, + { + "caller": "build_val_test_context", + "callee": "len", + "lineNumber": 372 + }, + { + "caller": "build_val_test_context", + "callee": "int", + "lineNumber": 372 + }, + { + "caller": "build_val_test_context", + "callee": "test_arr[:,0].sum", + "lineNumber": 372 + }, + { + "caller": "build_val_test_context", + "callee": "int", + "lineNumber": 372 + }, + { + "caller": "build_val_test_context", + "callee": "test_arr[:,1].sum", + "lineNumber": 372 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(base_dir / f\"{name}_dot_{len(test_arr)}_{int(test_arr[:,0].sum())}_{int(test_arr[:,1].sum())}.npy\").astype", + "lineNumber": 373 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 373 + }, + { + "caller": "build_val_test_context", + "callee": "len", + "lineNumber": 373 + }, + { + "caller": "build_val_test_context", + "callee": "int", + "lineNumber": 373 + }, + { + "caller": "build_val_test_context", + "callee": "test_arr[:,0].sum", + "lineNumber": 373 + }, + { + "caller": "build_val_test_context", + "callee": "int", + "lineNumber": 373 + }, + { + "caller": "build_val_test_context", + "callee": "test_arr[:,1].sum", + "lineNumber": 373 + }, + { + "caller": "build_val_test_context", + "callee": "score_features", + "lineNumber": 376 + }, + { + "caller": "build_val_test_context", + "callee": "score_features", + "lineNumber": 377 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack([X_test, Xcos, Xdot]).astype", + "lineNumber": 378 + }, + { + "caller": "build_val_test_context", + "callee": "np.column_stack", + "lineNumber": 378 + }, + { + "caller": "build_val_test_context", + "callee": "build_feature_names", + "lineNumber": 380 + }, + { + "caller": "build_val_test_context", + "callee": "len", + "lineNumber": 381 + }, + { + "caller": "build_val_test_context", + "callee": "len", + "lineNumber": 381 + }, + { + "caller": "build_val_test_context", + "callee": "len", + "lineNumber": 382 + }, + { + "caller": "build_val_test_context", + "callee": "len", + "lineNumber": 382 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"node2vec_deepwalk\" / \"node2vec_stack_oof.npy\").astype", + "lineNumber": 394 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 394 + }, + { + "caller": "build_val_test_context", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"node2vec_deepwalk_submission\" / \"test_content_mf_deepwalk_node2vec_lgb_pred.npy\").astype", + "lineNumber": 404 + }, + { + "caller": "build_val_test_context", + "callee": "np.load", + "lineNumber": 404 + }, + { + "caller": "error_analysis", + "callee": "((Xh[:, 3] + Xh[:, 7] + Xh[:, 8] + Xh[:, 12] + Xh[:, 13] + Xh[:, 14]) > 0).astype", + "lineNumber": 420 + }, + { + "caller": "error_analysis", + "callee": "bucket_cut", + "lineNumber": 422 + }, + { + "caller": "error_analysis", + "callee": "bucket_cut", + "lineNumber": 423 + }, + { + "caller": "error_analysis", + "callee": "bucket_cut", + "lineNumber": 424 + }, + { + "caller": "error_analysis", + "callee": "bucket_quantile", + "lineNumber": 425 + }, + { + "caller": "error_analysis", + "callee": "bucket_quantile", + "lineNumber": 426 + }, + { + "caller": "error_analysis", + "callee": "bucket_quantile", + "lineNumber": 427 + }, + { + "caller": "error_analysis", + "callee": "bucket_quantile", + "lineNumber": 428 + }, + { + "caller": "error_analysis", + "callee": "bucket_quantile", + "lineNumber": 429 + }, + { + "caller": "error_analysis", + "callee": "bucket_quantile", + "lineNumber": 430 + }, + { + "caller": "error_analysis", + "callee": "np.where", + "lineNumber": 431 + }, + { + "caller": "error_analysis", + "callee": "bucket_cut", + "lineNumber": 432 + }, + { + "caller": "error_analysis", + "callee": "author_rank_position", + "lineNumber": 432 + }, + { + "caller": "error_analysis", + "callee": "bucket_defs.items", + "lineNumber": 435 + }, + { + "caller": "error_analysis", + "callee": "pd.Series(groups).dropna().unique", + "lineNumber": 436 + }, + { + "caller": "error_analysis", + "callee": "pd.Series(groups).dropna", + "lineNumber": 436 + }, + { + "caller": "error_analysis", + "callee": "pd.Series", + "lineNumber": 436 + }, + { + "caller": "error_analysis", + "callee": "prf", + "lineNumber": 438 + }, + { + "caller": "error_analysis", + "callee": "rows.append", + "lineNumber": 439 + }, + { + "caller": "error_analysis", + "callee": "str", + "lineNumber": 442 + }, + { + "caller": "error_analysis", + "callee": "int", + "lineNumber": 443 + }, + { + "caller": "error_analysis", + "callee": "mask.sum", + "lineNumber": 443 + }, + { + "caller": "error_analysis", + "callee": "int", + "lineNumber": 444 + }, + { + "caller": "error_analysis", + "callee": "y[mask].sum", + "lineNumber": 444 + }, + { + "caller": "error_analysis", + "callee": "int", + "lineNumber": 445 + }, + { + "caller": "error_analysis", + "callee": "pred[mask].sum", + "lineNumber": 445 + }, + { + "caller": "error_analysis", + "callee": "pd.DataFrame(rows).to_csv", + "lineNumber": 453 + }, + { + "caller": "error_analysis", + "callee": "pd.DataFrame", + "lineNumber": 453 + }, + { + "caller": "add_agreement_features", + "callee": "train_scores.items", + "lineNumber": 480 + }, + { + "caller": "add_agreement_features", + "callee": "best_f1", + "lineNumber": 481 + }, + { + "caller": "add_agreement_features", + "callee": "rows.append", + "lineNumber": 483 + }, + { + "caller": "add_agreement_features", + "callee": "val_votes.append", + "lineNumber": 484 + }, + { + "caller": "add_agreement_features", + "callee": "(s >= th).astype", + "lineNumber": 484 + }, + { + "caller": "add_agreement_features", + "callee": "test_votes.append", + "lineNumber": 485 + }, + { + "caller": "add_agreement_features", + "callee": "(test_scores[name] >= th).astype", + "lineNumber": 485 + }, + { + "caller": "add_agreement_features", + "callee": "author_rank01", + "lineNumber": 486 + }, + { + "caller": "add_agreement_features", + "callee": "author_rank01", + "lineNumber": 487 + }, + { + "caller": "add_agreement_features", + "callee": "np.vstack(val_votes).T.astype", + "lineNumber": 488 + }, + { + "caller": "add_agreement_features", + "callee": "np.vstack", + "lineNumber": 488 + }, + { + "caller": "add_agreement_features", + "callee": "np.vstack(test_votes).T.astype", + "lineNumber": 489 + }, + { + "caller": "add_agreement_features", + "callee": "np.vstack", + "lineNumber": 489 + }, + { + "caller": "add_agreement_features", + "callee": "graph_val.sum", + "lineNumber": 494 + }, + { + "caller": "add_agreement_features", + "callee": "graph_test.sum", + "lineNumber": 495 + }, + { + "caller": "add_agreement_features", + "callee": "np.column_stack(\n [\n V.sum(axis=1),\n graph_vote_count_val,\n content_vote_val - graph_vote_count_val / 4.0,\n val_ranks[\"lgcn\"] - val_ranks[\"mf_bpr\"],\n content_graph_gap_val,\n ]\n ).astype", + "lineNumber": 498 + }, + { + "caller": "add_agreement_features", + "callee": "np.column_stack", + "lineNumber": 498 + }, + { + "caller": "add_agreement_features", + "callee": "V.sum", + "lineNumber": 500 + }, + { + "caller": "add_agreement_features", + "callee": "np.column_stack(\n [\n T.sum(axis=1),\n graph_vote_count_test,\n content_vote_test - graph_vote_count_test / 4.0,\n test_ranks[\"lgcn\"] - test_ranks[\"mf_bpr\"],\n content_graph_gap_test,\n ]\n ).astype", + "lineNumber": 507 + }, + { + "caller": "add_agreement_features", + "callee": "np.column_stack", + "lineNumber": 507 + }, + { + "caller": "add_agreement_features", + "callee": "T.sum", + "lineNumber": 509 + }, + { + "caller": "add_agreement_features", + "callee": "pd.DataFrame", + "lineNumber": 517 + }, + { + "caller": "boundary_features", + "callee": "((Xh[:, 3] + Xh[:, 7] + Xh[:, 8] + Xh[:, 12] + Xh[:, 13] + Xh[:, 14]) > 0).astype", + "lineNumber": 527 + }, + { + "caller": "boundary_features", + "callee": "((Xht[:, 3] + Xht[:, 7] + Xht[:, 8] + Xht[:, 12] + Xht[:, 13] + Xht[:, 14]) > 0).astype", + "lineNumber": 528 + }, + { + "caller": "boundary_features", + "callee": "np.column_stack(\n [\n author_rank01(pairs, scores[\"content\"]),\n author_rank01(pairs, scores[\"mf_bpr\"]),\n author_rank01(pairs, scores[\"lgcn\"]),\n author_rank01(pairs, rw_score),\n Xh[:, 3],\n Xh[:, 4],\n Xh[:, 7],\n Xh[:, 8],\n Xh[:, 9],\n Xh[:, 10],\n -rank01(Xh[:, 1]),\n has_local,\n agreement[:, 0],\n agreement[:, 1],\n ]\n ).astype", + "lineNumber": 531 + }, + { + "caller": "boundary_features", + "callee": "np.column_stack", + "lineNumber": 531 + }, + { + "caller": "boundary_features", + "callee": "author_rank01", + "lineNumber": 533 + }, + { + "caller": "boundary_features", + "callee": "author_rank01", + "lineNumber": 534 + }, + { + "caller": "boundary_features", + "callee": "author_rank01", + "lineNumber": 535 + }, + { + "caller": "boundary_features", + "callee": "author_rank01", + "lineNumber": 536 + }, + { + "caller": "boundary_features", + "callee": "rank01", + "lineNumber": 543 + }, + { + "caller": "boundary_features", + "callee": "np.column_stack(\n [\n author_rank01(test_pairs, test_scores[\"content\"]),\n author_rank01(test_pairs, test_scores[\"mf_bpr\"]),\n author_rank01(test_pairs, test_scores[\"lgcn\"]),\n author_rank01(test_pairs, rw_score_t),\n Xht[:, 3],\n Xht[:, 4],\n Xht[:, 7],\n Xht[:, 8],\n Xht[:, 9],\n Xht[:, 10],\n -rank01(Xht[:, 1]),\n has_local_t,\n agreement_test[:, 0],\n agreement_test[:, 1],\n ]\n ).astype", + "lineNumber": 549 + }, + { + "caller": "boundary_features", + "callee": "np.column_stack", + "lineNumber": 549 + }, + { + "caller": "boundary_features", + "callee": "author_rank01", + "lineNumber": 551 + }, + { + "caller": "boundary_features", + "callee": "author_rank01", + "lineNumber": 552 + }, + { + "caller": "boundary_features", + "callee": "author_rank01", + "lineNumber": 553 + }, + { + "caller": "boundary_features", + "callee": "author_rank01", + "lineNumber": 554 + }, + { + "caller": "boundary_features", + "callee": "rank01", + "lineNumber": 561 + }, + { + "caller": "main", + "callee": "warnings.filterwarnings", + "lineNumber": 587 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 588 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 589 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 589 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 589 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 590 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 591 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 592 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 593 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 594 + }, + { + "caller": "main", + "callee": "args.package_root.resolve", + "lineNumber": 596 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 600 + }, + { + "caller": "main", + "callee": "sub_dir.mkdir", + "lineNumber": 601 + }, + { + "caller": "main", + "callee": "build_val_test_context", + "lineNumber": 603 + }, + { + "caller": "main", + "callee": "np.load(root / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 607 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 607 + }, + { + "caller": "main", + "callee": "load_submission_pred", + "lineNumber": 609 + }, + { + "caller": "main", + "callee": "score_at_threshold", + "lineNumber": 612 + }, + { + "caller": "main", + "callee": "(score >= 0.48).astype", + "lineNumber": 613 + }, + { + "caller": "main", + "callee": "error_analysis", + "lineNumber": 614 + }, + { + "caller": "main", + "callee": "overall_rows.append", + "lineNumber": 615 + }, + { + "caller": "main", + "callee": "summarize_pred", + "lineNumber": 615 + }, + { + "caller": "main", + "callee": "write_submission", + "lineNumber": 620 + }, + { + "caller": "main", + "callee": "score_at_threshold", + "lineNumber": 621 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 622 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 623 + }, + { + "caller": "main", + "callee": "(pred_test != anchor_pred).sum", + "lineNumber": 623 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 624 + }, + { + "caller": "main", + "callee": "pred_test.mean", + "lineNumber": 624 + }, + { + "caller": "main", + "callee": "threshold_rows.append", + "lineNumber": 625 + }, + { + "caller": "main", + "callee": "overall_rows.append", + "lineNumber": 626 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 636 + }, + { + "caller": "main", + "callee": "pd.DataFrame(threshold_rows).to_csv", + "lineNumber": 640 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 640 + }, + { + "caller": "main", + "callee": "((Xh[:, 3] + Xh[:, 7] + Xh[:, 8] + Xh[:, 12] + Xh[:, 13] + Xh[:, 14]) > 0).astype", + "lineNumber": 644 + }, + { + "caller": "main", + "callee": "((Xht[:, 3] + Xht[:, 7] + Xht[:, 8] + Xht[:, 12] + Xht[:, 13] + Xht[:, 14]) > 0).astype", + "lineNumber": 645 + }, + { + "caller": "main", + "callee": "bucket_cut", + "lineNumber": 648 + }, + { + "caller": "main", + "callee": "bucket_cut", + "lineNumber": 649 + }, + { + "caller": "main", + "callee": "bucket_cut", + "lineNumber": 652 + }, + { + "caller": "main", + "callee": "bucket_cut", + "lineNumber": 653 + }, + { + "caller": "main", + "callee": "np.where", + "lineNumber": 656 + }, + { + "caller": "main", + "callee": "np.where", + "lineNumber": 657 + }, + { + "caller": "main", + "callee": "group_defs.items", + "lineNumber": 661 + }, + { + "caller": "main", + "callee": "group_threshold", + "lineNumber": 662 + }, + { + "caller": "main", + "callee": "write_group_submission", + "lineNumber": 664 + }, + { + "caller": "main", + "callee": "pd.DataFrame(metrics.pop(\"group_rows\")).to_csv", + "lineNumber": 665 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 665 + }, + { + "caller": "main", + "callee": "metrics.pop", + "lineNumber": 665 + }, + { + "caller": "main", + "callee": "pd.Series(thresholds).to_csv", + "lineNumber": 666 + }, + { + "caller": "main", + "callee": "pd.Series", + "lineNumber": 666 + }, + { + "caller": "main", + "callee": "group_rows.append", + "lineNumber": 667 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 667 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 667 + }, + { + "caller": "main", + "callee": "(pred_test != anchor_pred).sum", + "lineNumber": 667 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 667 + }, + { + "caller": "main", + "callee": "pred_test.mean", + "lineNumber": 667 + }, + { + "caller": "main", + "callee": "overall_rows.append", + "lineNumber": 668 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 674 + }, + { + "caller": "main", + "callee": "pred_test.mean", + "lineNumber": 674 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 678 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 679 + }, + { + "caller": "main", + "callee": "(pred_test != anchor_pred).sum", + "lineNumber": 679 + }, + { + "caller": "main", + "callee": "pd.DataFrame(group_rows).to_csv", + "lineNumber": 682 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 682 + }, + { + "caller": "main", + "callee": "add_agreement_features", + "lineNumber": 684 + }, + { + "caller": "main", + "callee": "vote_thresholds.to_csv", + "lineNumber": 685 + }, + { + "caller": "main", + "callee": "boundary_features", + "lineNumber": 687 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 689 + }, + { + "caller": "main", + "callee": "np.zeros", + "lineNumber": 690 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 690 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 693 + }, + { + "caller": "main", + "callee": "(boundary_oof[boundary_mask] >= boundary_th).astype", + "lineNumber": 694 + }, + { + "caller": "main", + "callee": "average_predict", + "lineNumber": 695 + }, + { + "caller": "main", + "callee": "np.zeros", + "lineNumber": 696 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 696 + }, + { + "caller": "main", + "callee": "(boundary_test_score[boundary_test_mask] >= boundary_th).astype", + "lineNumber": 700 + }, + { + "caller": "main", + "callee": "pd.DataFrame({\"Index\": np.arange(len(boundary_test_pred), dtype=np.int64), \"Predicted\": boundary_test_pred}).to_csv", + "lineNumber": 703 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 703 + }, + { + "caller": "main", + "callee": "np.arange", + "lineNumber": 703 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 703 + }, + { + "caller": "main", + "callee": "pd.Series(boundary_names).to_csv", + "lineNumber": 704 + }, + { + "caller": "main", + "callee": "pd.Series", + "lineNumber": 704 + }, + { + "caller": "main", + "callee": "overall_rows.append", + "lineNumber": 705 + }, + { + "caller": "main", + "callee": "summarize_pred", + "lineNumber": 705 + }, + { + "caller": "main", + "callee": "np.arange", + "lineNumber": 709 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 710 + }, + { + "caller": "main", + "callee": "enumerate", + "lineNumber": 710 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 711 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 712 + }, + { + "caller": "main", + "callee": "ablations.items", + "lineNumber": 714 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 715 + }, + { + "caller": "main", + "callee": "np.zeros", + "lineNumber": 716 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 716 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 718 + }, + { + "caller": "main", + "callee": "(oof[boundary_mask] >= th).astype", + "lineNumber": 719 + }, + { + "caller": "main", + "callee": "prf", + "lineNumber": 720 + }, + { + "caller": "main", + "callee": "boundary_ablation.append", + "lineNumber": 721 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 721 + }, + { + "caller": "main", + "callee": "pd.DataFrame(boundary_ablation).to_csv", + "lineNumber": 722 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 722 + }, + { + "caller": "main", + "callee": "np.column_stack([ctx[\"X\"], agree_val]).astype", + "lineNumber": 724 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 724 + }, + { + "caller": "main", + "callee": "np.column_stack([ctx[\"X_test\"], agree_test]).astype", + "lineNumber": 725 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 725 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 726 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 727 + }, + { + "caller": "main", + "callee": "average_predict", + "lineNumber": 728 + }, + { + "caller": "main", + "callee": "write_submission", + "lineNumber": 730 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 730 + }, + { + "caller": "main", + "callee": "(agree_oof >= th).mean", + "lineNumber": 730 + }, + { + "caller": "main", + "callee": "(agree_oof >= th).astype", + "lineNumber": 731 + }, + { + "caller": "main", + "callee": "overall_rows.append", + "lineNumber": 732 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 738 + }, + { + "caller": "main", + "callee": "pred_test.mean", + "lineNumber": 738 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 739 + }, + { + "caller": "main", + "callee": "((pred_val == 1) & (y == 1)).sum", + "lineNumber": 739 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 740 + }, + { + "caller": "main", + "callee": "((pred_val == 1) & (y == 0)).sum", + "lineNumber": 740 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 741 + }, + { + "caller": "main", + "callee": "((pred_val == 0) & (y == 1)).sum", + "lineNumber": 741 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 742 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 743 + }, + { + "caller": "main", + "callee": "(pred_test != anchor_pred).sum", + "lineNumber": 743 + }, + { + "caller": "main", + "callee": "pd.Series(ctx[\"feature_names\"] + agree_names).to_csv", + "lineNumber": 746 + }, + { + "caller": "main", + "callee": "pd.Series", + "lineNumber": 746 + }, + { + "caller": "main", + "callee": "fit_full_lgb", + "lineNumber": 749 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 750 + }, + { + "caller": "main", + "callee": "full_model.booster_.feature_importance", + "lineNumber": 750 + }, + { + "caller": "main", + "callee": "full_model.booster_.feature_importance", + "lineNumber": 750 + }, + { + "caller": "main", + "callee": "importances.sort_values(\"gain_importance\", ascending=False).to_csv", + "lineNumber": 751 + }, + { + "caller": "main", + "callee": "importances.sort_values", + "lineNumber": 751 + }, + { + "caller": "main", + "callee": "train_test_split", + "lineNumber": 753 + }, + { + "caller": "main", + "callee": "np.arange", + "lineNumber": 753 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 753 + }, + { + "caller": "main", + "callee": "min", + "lineNumber": 753 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 753 + }, + { + "caller": "main", + "callee": "permutation_importance", + "lineNumber": 754 + }, + { + "caller": "main", + "callee": "pd.DataFrame({\"feature\": ctx[\"feature_names\"], \"permutation_importance_mean\": perm.importances_mean, \"permutation_importance_std\": perm.importances_std}).sort_values(\"permutation_importance_mean\", ascending=False).to_csv", + "lineNumber": 755 + }, + { + "caller": "main", + "callee": "pd.DataFrame({\"feature\": ctx[\"feature_names\"], \"permutation_importance_mean\": perm.importances_mean, \"permutation_importance_std\": perm.importances_std}).sort_values", + "lineNumber": 755 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 755 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 757 + }, + { + "caller": "main", + "callee": "importances.sort_values(\"gain_importance\").head", + "lineNumber": 757 + }, + { + "caller": "main", + "callee": "importances.sort_values", + "lineNumber": 757 + }, + { + "caller": "main", + "callee": "max", + "lineNumber": 757 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 757 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 757 + }, + { + "caller": "main", + "callee": "n.startswith", + "lineNumber": 758 + }, + { + "caller": "main", + "callee": "n.startswith", + "lineNumber": 758 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 759 + }, + { + "caller": "main", + "callee": "enumerate", + "lineNumber": 761 + }, + { + "caller": "main", + "callee": "enumerate", + "lineNumber": 762 + }, + { + "caller": "main", + "callee": "enumerate", + "lineNumber": 763 + }, + { + "caller": "main", + "callee": "n.endswith", + "lineNumber": 763 + }, + { + "caller": "main", + "callee": "prune_sets.items", + "lineNumber": 765 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 768 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 769 + }, + { + "caller": "main", + "callee": "average_predict", + "lineNumber": 770 + }, + { + "caller": "main", + "callee": "write_submission", + "lineNumber": 772 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 772 + }, + { + "caller": "main", + "callee": "(oof >= th).mean", + "lineNumber": 772 + }, + { + "caller": "main", + "callee": "(oof >= th).astype", + "lineNumber": 773 + }, + { + "caller": "main", + "callee": "feature_rows.append", + "lineNumber": 774 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 774 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 774 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 774 + }, + { + "caller": "main", + "callee": "pred_test.mean", + "lineNumber": 774 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 774 + }, + { + "caller": "main", + "callee": "(pred_test != anchor_pred).sum", + "lineNumber": 774 + }, + { + "caller": "main", + "callee": "overall_rows.append", + "lineNumber": 775 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 781 + }, + { + "caller": "main", + "callee": "pred_test.mean", + "lineNumber": 781 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 782 + }, + { + "caller": "main", + "callee": "((pred_val == 1) & (y == 1)).sum", + "lineNumber": 782 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 783 + }, + { + "caller": "main", + "callee": "((pred_val == 1) & (y == 0)).sum", + "lineNumber": 783 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 784 + }, + { + "caller": "main", + "callee": "((pred_val == 0) & (y == 1)).sum", + "lineNumber": 784 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 785 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 786 + }, + { + "caller": "main", + "callee": "(pred_test != anchor_pred).sum", + "lineNumber": 786 + }, + { + "caller": "main", + "callee": "pd.DataFrame(feature_rows).to_csv", + "lineNumber": 789 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 789 + }, + { + "caller": "main", + "callee": "pd.DataFrame(overall_rows).sort_values(\"validation_f1\", ascending=False).to_csv", + "lineNumber": 791 + }, + { + "caller": "main", + "callee": "pd.DataFrame(overall_rows).sort_values", + "lineNumber": 791 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 791 + }, + { + "caller": "main", + "callee": "(out_dir / \"run_notes.txt\").open", + "lineNumber": 792 + }, + { + "caller": "main", + "callee": "f.write", + "lineNumber": 793 + }, + { + "caller": "main", + "callee": "f.write", + "lineNumber": 794 + }, + { + "caller": "main", + "callee": "f.write", + "lineNumber": 795 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 796 + }, + { + "caller": "main", + "callee": "pd.DataFrame(overall_rows).sort_values(\"validation_f1\", ascending=False).to_string", + "lineNumber": 796 + }, + { + "caller": "main", + "callee": "pd.DataFrame(overall_rows).sort_values", + "lineNumber": 796 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 796 + } + ], + "metrics": { + "importCount": 5, + "exportCount": 26, + "functionCount": 26, + "classCount": 0 + } + }, + { + "path": "code/evaluate_val_checkpoints.py", + "language": "python", + "fileCategory": "code", + "totalLines": 147, + "nonEmptyLines": 128, + "functions": [ + { + "name": "load_train_module", + "startLine": 16, + "endLine": 21, + "params": [ + "path" + ] + }, + { + "name": "best_f1", + "startLine": 24, + "endLine": 29, + "params": [ + "labels", + "scores" + ] + }, + { + "name": "infer_layers", + "startLine": 32, + "endLine": 42, + "params": [ + "path", + "state" + ] + }, + { + "name": "score_model", + "startLine": 46, + "endLine": 65, + "params": [ + "module", + "model", + "data", + "pairs", + "mode", + "batch_size" + ] + }, + { + "name": "main", + "startLine": 68, + "endLine": 143, + "params": [] + } + ], + "exports": [ + { + "name": "load_train_module", + "line": 16, + "isDefault": false + }, + { + "name": "best_f1", + "line": 24, + "isDefault": false + }, + { + "name": "infer_layers", + "line": 32, + "isDefault": false + }, + { + "name": "score_model", + "line": 45, + "isDefault": false + }, + { + "name": "main", + "line": 68, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_train_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 17 + }, + { + "caller": "load_train_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 18 + }, + { + "caller": "load_train_module", + "callee": "spec.loader.exec_module", + "lineNumber": 20 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 25 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 27 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 27 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 29 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 29 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 29 + }, + { + "caller": "infer_layers", + "callee": "int", + "lineNumber": 34 + }, + { + "caller": "infer_layers", + "callee": "re.search", + "lineNumber": 36 + }, + { + "caller": "infer_layers", + "callee": "int", + "lineNumber": 38 + }, + { + "caller": "infer_layers", + "callee": "match.group", + "lineNumber": 38 + }, + { + "caller": "infer_layers", + "callee": "re.search", + "lineNumber": 39 + }, + { + "caller": "infer_layers", + "callee": "int", + "lineNumber": 41 + }, + { + "caller": "infer_layers", + "callee": "match.group", + "lineNumber": 41 + }, + { + "caller": "score_model", + "callee": "model.eval", + "lineNumber": 47 + }, + { + "caller": "score_model", + "callee": "model.encode", + "lineNumber": 48 + }, + { + "caller": "score_model", + "callee": "z[\"author\"].detach().cpu().numpy", + "lineNumber": 49 + }, + { + "caller": "score_model", + "callee": "z[\"author\"].detach().cpu", + "lineNumber": 49 + }, + { + "caller": "score_model", + "callee": "z[\"author\"].detach", + "lineNumber": 49 + }, + { + "caller": "score_model", + "callee": "z[\"paper\"].detach().cpu().numpy", + "lineNumber": 50 + }, + { + "caller": "score_model", + "callee": "z[\"paper\"].detach().cpu", + "lineNumber": 50 + }, + { + "caller": "score_model", + "callee": "z[\"paper\"].detach", + "lineNumber": 50 + }, + { + "caller": "score_model", + "callee": "range", + "lineNumber": 52 + }, + { + "caller": "score_model", + "callee": "len", + "lineNumber": 52 + }, + { + "caller": "score_model", + "callee": "np.sum", + "lineNumber": 57 + }, + { + "caller": "score_model", + "callee": "module.cos_sim", + "lineNumber": 59 + }, + { + "caller": "score_model", + "callee": "np.sum", + "lineNumber": 61 + }, + { + "caller": "score_model", + "callee": "ValueError", + "lineNumber": 63 + }, + { + "caller": "score_model", + "callee": "scores.append", + "lineNumber": 64 + }, + { + "caller": "score_model", + "callee": "s.astype", + "lineNumber": 64 + }, + { + "caller": "score_model", + "callee": "np.concatenate", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 70 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 70 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 70 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 71 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 73 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "load_train_module", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "module.build_parts", + "lineNumber": 83 + }, + { + "caller": "main", + "callee": "module.build_parts", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "parts[\"val_pairs\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 88 + }, + { + "caller": "main", + "callee": "parts[\"val_pairs\"][\"label\"].to_numpy", + "lineNumber": 89 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 92 + }, + { + "caller": "main", + "callee": "sorted", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / split_name).glob", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "torch.load", + "lineNumber": 97 + }, + { + "caller": "main", + "callee": "infer_layers", + "lineNumber": 100 + }, + { + "caller": "main", + "callee": "module.build_data", + "lineNumber": 106 + }, + { + "caller": "main", + "callee": "torch.device", + "lineNumber": 110 + }, + { + "caller": "main", + "callee": "model_cls(6611, parts[\"paper_feat_aug\"].shape[1], embed_dim, layers).to", + "lineNumber": 116 + }, + { + "caller": "main", + "callee": "model_cls", + "lineNumber": 116 + }, + { + "caller": "main", + "callee": "torch.device", + "lineNumber": 116 + }, + { + "caller": "main", + "callee": "model.load_state_dict", + "lineNumber": 117 + }, + { + "caller": "main", + "callee": "score_model", + "lineNumber": 120 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 137 + }, + { + "caller": "main", + "callee": "torch.cuda.empty_cache", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "df.to_csv", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 142 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "df.head(30).to_string", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "df.head", + "lineNumber": 143 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 5, + "functionCount": 5, + "classCount": 0 + } + }, + { + "path": "code/extra_score_sources_ablation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 286, + "nonEmptyLines": 250, + "functions": [ + { + "name": "load_module", + "startLine": 20, + "endLine": 25, + "params": [ + "name", + "path" + ] + }, + { + "name": "best_f1", + "startLine": 28, + "endLine": 33, + "params": [ + "y", + "s" + ] + }, + { + "name": "rank01", + "startLine": 36, + "endLine": 40, + "params": [ + "x" + ] + }, + { + "name": "zscore", + "startLine": 43, + "endLine": 44, + "params": [ + "x" + ] + }, + { + "name": "score_to_features", + "startLine": 47, + "endLine": 56, + "params": [ + "scores", + "prefix", + "pairs" + ] + }, + { + "name": "fit_lgb_oof", + "startLine": 59, + "endLine": 77, + "params": [ + "X", + "y", + "seed", + "n_splits" + ] + }, + { + "name": "content_mean_score", + "startLine": 80, + "endLine": 97, + "params": [ + "root", + "pairs", + "builder" + ] + }, + { + "name": "train_mf_bpr_score", + "startLine": 116, + "endLine": 163, + "params": [ + "root", + "train_refs", + "val_pairs", + "out_dir", + "device", + "seed", + "dim", + "epochs" + ] + }, + { + "name": "train_ranker_oof", + "startLine": 166, + "endLine": 196, + "params": [ + "X", + "y", + "pairs", + "seed", + "out_dir" + ] + }, + { + "name": "main", + "startLine": 199, + "endLine": 282, + "params": [] + } + ], + "classes": [ + { + "name": "MF", + "startLine": 100, + "endLine": 113, + "methods": [ + "__init__", + "score" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 20, + "isDefault": false + }, + { + "name": "best_f1", + "line": 28, + "isDefault": false + }, + { + "name": "rank01", + "line": 36, + "isDefault": false + }, + { + "name": "zscore", + "line": 43, + "isDefault": false + }, + { + "name": "score_to_features", + "line": 47, + "isDefault": false + }, + { + "name": "fit_lgb_oof", + "line": 59, + "isDefault": false + }, + { + "name": "content_mean_score", + "line": 80, + "isDefault": false + }, + { + "name": "MF", + "line": 100, + "isDefault": false + }, + { + "name": "train_mf_bpr_score", + "line": 116, + "isDefault": false + }, + { + "name": "train_ranker_oof", + "line": 166, + "isDefault": false + }, + { + "name": "main", + "line": 199, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 21 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 22 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 24 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 29 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 31 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 31 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 37 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 38 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 38 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 39 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 39 + }, + { + "caller": "zscore", + "callee": "((x - x.mean()) / (x.std() + 1e-8)).astype", + "lineNumber": 44 + }, + { + "caller": "zscore", + "callee": "x.mean", + "lineNumber": 44 + }, + { + "caller": "zscore", + "callee": "x.std", + "lineNumber": 44 + }, + { + "caller": "score_to_features", + "callee": "np.zeros", + "lineNumber": 48 + }, + { + "caller": "score_to_features", + "callee": "len", + "lineNumber": 48 + }, + { + "caller": "score_to_features", + "callee": "pd.DataFrame", + "lineNumber": 49 + }, + { + "caller": "score_to_features", + "callee": "np.arange", + "lineNumber": 49 + }, + { + "caller": "score_to_features", + "callee": "len", + "lineNumber": 49 + }, + { + "caller": "score_to_features", + "callee": "df.groupby", + "lineNumber": 50 + }, + { + "caller": "score_to_features", + "callee": "g[\"idx\"].to_numpy", + "lineNumber": 51 + }, + { + "caller": "score_to_features", + "callee": "np.argsort", + "lineNumber": 52 + }, + { + "caller": "score_to_features", + "callee": "g[\"score\"].to_numpy", + "lineNumber": 52 + }, + { + "caller": "score_to_features", + "callee": "np.linspace", + "lineNumber": 53 + }, + { + "caller": "score_to_features", + "callee": "len", + "lineNumber": 53 + }, + { + "caller": "score_to_features", + "callee": "len", + "lineNumber": 53 + }, + { + "caller": "score_to_features", + "callee": "np.array", + "lineNumber": 53 + }, + { + "caller": "score_to_features", + "callee": "np.column_stack([scores.astype(np.float32), zscore(scores), rank01(scores), author_rank]).astype", + "lineNumber": 55 + }, + { + "caller": "score_to_features", + "callee": "np.column_stack", + "lineNumber": 55 + }, + { + "caller": "score_to_features", + "callee": "scores.astype", + "lineNumber": 55 + }, + { + "caller": "score_to_features", + "callee": "zscore", + "lineNumber": 55 + }, + { + "caller": "score_to_features", + "callee": "rank01", + "lineNumber": 55 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.zeros", + "lineNumber": 60 + }, + { + "caller": "fit_lgb_oof", + "callee": "len", + "lineNumber": 60 + }, + { + "caller": "fit_lgb_oof", + "callee": "StratifiedKFold", + "lineNumber": 61 + }, + { + "caller": "fit_lgb_oof", + "callee": "enumerate", + "lineNumber": 62 + }, + { + "caller": "fit_lgb_oof", + "callee": "skf.split", + "lineNumber": 62 + }, + { + "caller": "fit_lgb_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 63 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.fit", + "lineNumber": 75 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba", + "lineNumber": 76 + }, + { + "caller": "content_mean_score", + "callee": "cache.mkdir", + "lineNumber": 82 + }, + { + "caller": "content_mean_score", + "callee": "len", + "lineNumber": 83 + }, + { + "caller": "content_mean_score", + "callee": "int", + "lineNumber": 83 + }, + { + "caller": "content_mean_score", + "callee": "pairs[:,0].sum", + "lineNumber": 83 + }, + { + "caller": "content_mean_score", + "callee": "int", + "lineNumber": 83 + }, + { + "caller": "content_mean_score", + "callee": "pairs[:,1].sum", + "lineNumber": 83 + }, + { + "caller": "content_mean_score", + "callee": "path.exists", + "lineNumber": 84 + }, + { + "caller": "content_mean_score", + "callee": "np.load", + "lineNumber": 85 + }, + { + "caller": "content_mean_score", + "callee": "(root / \"data_and_docs\" / \"feature.pkl\").open", + "lineNumber": 86 + }, + { + "caller": "content_mean_score", + "callee": "pkl.load(f).numpy().astype", + "lineNumber": 87 + }, + { + "caller": "content_mean_score", + "callee": "pkl.load(f).numpy", + "lineNumber": 87 + }, + { + "caller": "content_mean_score", + "callee": "pkl.load", + "lineNumber": 87 + }, + { + "caller": "content_mean_score", + "callee": "np.linalg.norm", + "lineNumber": 88 + }, + { + "caller": "content_mean_score", + "callee": "np.zeros", + "lineNumber": 89 + }, + { + "caller": "content_mean_score", + "callee": "range", + "lineNumber": 90 + }, + { + "caller": "content_mean_score", + "callee": "list", + "lineNumber": 91 + }, + { + "caller": "content_mean_score", + "callee": "feat[np.asarray(hist, dtype=np.int64)].mean", + "lineNumber": 93 + }, + { + "caller": "content_mean_score", + "callee": "np.asarray", + "lineNumber": 93 + }, + { + "caller": "content_mean_score", + "callee": "np.linalg.norm", + "lineNumber": 94 + }, + { + "caller": "content_mean_score", + "callee": "np.sum(author_mean[pairs[:, 0]] * feat[pairs[:, 1]], axis=1).astype", + "lineNumber": 95 + }, + { + "caller": "content_mean_score", + "callee": "np.sum", + "lineNumber": 95 + }, + { + "caller": "content_mean_score", + "callee": "np.save", + "lineNumber": 96 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 102 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 102 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 103 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 104 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 105 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 106 + }, + { + "caller": "__init__", + "callee": "nn.init.normal_", + "lineNumber": 107 + }, + { + "caller": "__init__", + "callee": "nn.init.normal_", + "lineNumber": 108 + }, + { + "caller": "__init__", + "callee": "nn.init.zeros_", + "lineNumber": 109 + }, + { + "caller": "__init__", + "callee": "nn.init.zeros_", + "lineNumber": 110 + }, + { + "caller": "score", + "callee": "(self.a(pairs[:, 0]) * self.p(pairs[:, 1])).sum", + "lineNumber": 113 + }, + { + "caller": "score", + "callee": "self.a", + "lineNumber": 113 + }, + { + "caller": "score", + "callee": "self.p", + "lineNumber": 113 + }, + { + "caller": "score", + "callee": "self.ab(pairs[:, 0]).squeeze", + "lineNumber": 113 + }, + { + "caller": "score", + "callee": "self.ab", + "lineNumber": 113 + }, + { + "caller": "score", + "callee": "self.pb(pairs[:, 1]).squeeze", + "lineNumber": 113 + }, + { + "caller": "score", + "callee": "self.pb", + "lineNumber": 113 + }, + { + "caller": "train_mf_bpr_score", + "callee": "out_path.exists", + "lineNumber": 118 + }, + { + "caller": "train_mf_bpr_score", + "callee": "np.load", + "lineNumber": 119 + }, + { + "caller": "train_mf_bpr_score", + "callee": "torch.manual_seed", + "lineNumber": 120 + }, + { + "caller": "train_mf_bpr_score", + "callee": "np.random.seed", + "lineNumber": 121 + }, + { + "caller": "train_mf_bpr_score", + "callee": "np.random.default_rng", + "lineNumber": 122 + }, + { + "caller": "train_mf_bpr_score", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 123 + }, + { + "caller": "train_mf_bpr_score", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 124 + }, + { + "caller": "train_mf_bpr_score", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 125 + }, + { + "caller": "train_mf_bpr_score", + "callee": "set", + "lineNumber": 126 + }, + { + "caller": "train_mf_bpr_score", + "callee": "map", + "lineNumber": 126 + }, + { + "caller": "train_mf_bpr_score", + "callee": "train.tolist", + "lineNumber": 126 + }, + { + "caller": "train_mf_bpr_score", + "callee": "MF(6611, 79937, dim).to", + "lineNumber": 127 + }, + { + "caller": "train_mf_bpr_score", + "callee": "MF", + "lineNumber": 127 + }, + { + "caller": "train_mf_bpr_score", + "callee": "torch.device", + "lineNumber": 127 + }, + { + "caller": "train_mf_bpr_score", + "callee": "torch.optim.AdamW", + "lineNumber": 128 + }, + { + "caller": "train_mf_bpr_score", + "callee": "model.parameters", + "lineNumber": 128 + }, + { + "caller": "train_mf_bpr_score", + "callee": "torch.as_tensor", + "lineNumber": 129 + }, + { + "caller": "train_mf_bpr_score", + "callee": "torch.as_tensor", + "lineNumber": 130 + }, + { + "caller": "train_mf_bpr_score", + "callee": "range", + "lineNumber": 133 + }, + { + "caller": "train_mf_bpr_score", + "callee": "torch.randint", + "lineNumber": 134 + }, + { + "caller": "train_mf_bpr_score", + "callee": "train_t.size", + "lineNumber": 134 + }, + { + "caller": "train_mf_bpr_score", + "callee": "np.empty", + "lineNumber": 136 + }, + { + "caller": "train_mf_bpr_score", + "callee": "pos[:, 0].detach().cpu().numpy", + "lineNumber": 137 + }, + { + "caller": "train_mf_bpr_score", + "callee": "pos[:, 0].detach().cpu", + "lineNumber": 137 + }, + { + "caller": "train_mf_bpr_score", + "callee": "pos[:, 0].detach", + "lineNumber": 137 + }, + { + "caller": "train_mf_bpr_score", + "callee": "rng.integers", + "lineNumber": 140 + }, + { + "caller": "train_mf_bpr_score", + "callee": "zip", + "lineNumber": 141 + }, + { + "caller": "train_mf_bpr_score", + "callee": "int", + "lineNumber": 142 + }, + { + "caller": "train_mf_bpr_score", + "callee": "int", + "lineNumber": 142 + }, + { + "caller": "train_mf_bpr_score", + "callee": "torch.as_tensor", + "lineNumber": 147 + }, + { + "caller": "train_mf_bpr_score", + "callee": "F.logsigmoid(model.score(pos) - model.score(neg)).mean", + "lineNumber": 148 + }, + { + "caller": "train_mf_bpr_score", + "callee": "F.logsigmoid", + "lineNumber": 148 + }, + { + "caller": "train_mf_bpr_score", + "callee": "model.score", + "lineNumber": 148 + }, + { + "caller": "train_mf_bpr_score", + "callee": "model.score", + "lineNumber": 148 + }, + { + "caller": "train_mf_bpr_score", + "callee": "opt.zero_grad", + "lineNumber": 149 + }, + { + "caller": "train_mf_bpr_score", + "callee": "loss.backward", + "lineNumber": 150 + }, + { + "caller": "train_mf_bpr_score", + "callee": "opt.step", + "lineNumber": 151 + }, + { + "caller": "train_mf_bpr_score", + "callee": "torch.no_grad", + "lineNumber": 153 + }, + { + "caller": "train_mf_bpr_score", + "callee": "range", + "lineNumber": 155 + }, + { + "caller": "train_mf_bpr_score", + "callee": "len", + "lineNumber": 155 + }, + { + "caller": "train_mf_bpr_score", + "callee": "scores.append", + "lineNumber": 156 + }, + { + "caller": "train_mf_bpr_score", + "callee": "model.score(val_t[st : st + 131072]).detach().cpu().numpy", + "lineNumber": 156 + }, + { + "caller": "train_mf_bpr_score", + "callee": "model.score(val_t[st : st + 131072]).detach().cpu", + "lineNumber": 156 + }, + { + "caller": "train_mf_bpr_score", + "callee": "model.score(val_t[st : st + 131072]).detach", + "lineNumber": 156 + }, + { + "caller": "train_mf_bpr_score", + "callee": "model.score", + "lineNumber": 156 + }, + { + "caller": "train_mf_bpr_score", + "callee": "np.concatenate(scores).astype", + "lineNumber": 157 + }, + { + "caller": "train_mf_bpr_score", + "callee": "np.concatenate", + "lineNumber": 157 + }, + { + "caller": "train_mf_bpr_score", + "callee": "best_f1", + "lineNumber": 158 + }, + { + "caller": "train_mf_bpr_score", + "callee": "scores.copy", + "lineNumber": 160 + }, + { + "caller": "train_mf_bpr_score", + "callee": "print", + "lineNumber": 161 + }, + { + "caller": "train_mf_bpr_score", + "callee": "loss.item", + "lineNumber": 161 + }, + { + "caller": "train_mf_bpr_score", + "callee": "np.save", + "lineNumber": 162 + }, + { + "caller": "train_ranker_oof", + "callee": "out_path.exists", + "lineNumber": 168 + }, + { + "caller": "train_ranker_oof", + "callee": "np.load", + "lineNumber": 169 + }, + { + "caller": "train_ranker_oof", + "callee": "np.zeros", + "lineNumber": 170 + }, + { + "caller": "train_ranker_oof", + "callee": "len", + "lineNumber": 170 + }, + { + "caller": "train_ranker_oof", + "callee": "GroupKFold", + "lineNumber": 171 + }, + { + "caller": "train_ranker_oof", + "callee": "enumerate", + "lineNumber": 173 + }, + { + "caller": "train_ranker_oof", + "callee": "gkf.split", + "lineNumber": 173 + }, + { + "caller": "train_ranker_oof", + "callee": "np.lexsort", + "lineNumber": 174 + }, + { + "caller": "train_ranker_oof", + "callee": "np.arange", + "lineNumber": 174 + }, + { + "caller": "train_ranker_oof", + "callee": "len", + "lineNumber": 174 + }, + { + "caller": "train_ranker_oof", + "callee": "np.lexsort", + "lineNumber": 175 + }, + { + "caller": "train_ranker_oof", + "callee": "np.arange", + "lineNumber": 175 + }, + { + "caller": "train_ranker_oof", + "callee": "len", + "lineNumber": 175 + }, + { + "caller": "train_ranker_oof", + "callee": "pd.Series(pairs[tr_idx, 0]).value_counts(sort=False).to_numpy", + "lineNumber": 178 + }, + { + "caller": "train_ranker_oof", + "callee": "pd.Series(pairs[tr_idx, 0]).value_counts", + "lineNumber": 178 + }, + { + "caller": "train_ranker_oof", + "callee": "pd.Series", + "lineNumber": 178 + }, + { + "caller": "train_ranker_oof", + "callee": "lgb.LGBMRanker", + "lineNumber": 179 + }, + { + "caller": "train_ranker_oof", + "callee": "ranker.fit", + "lineNumber": 192 + }, + { + "caller": "train_ranker_oof", + "callee": "ranker.predict(X[va_idx]).astype", + "lineNumber": 193 + }, + { + "caller": "train_ranker_oof", + "callee": "ranker.predict", + "lineNumber": 193 + }, + { + "caller": "train_ranker_oof", + "callee": "print", + "lineNumber": 194 + }, + { + "caller": "train_ranker_oof", + "callee": "best_f1", + "lineNumber": 194 + }, + { + "caller": "train_ranker_oof", + "callee": "np.save", + "lineNumber": 195 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 200 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 201 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 201 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 201 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 202 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 203 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 204 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 204 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 205 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 206 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 207 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 208 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 211 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 212 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 213 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 214 + }, + { + "caller": "main", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 215 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 216 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 217 + }, + { + "caller": "main", + "callee": "np.load(args.main_val_score_file).astype", + "lineNumber": 218 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 218 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 220 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 222 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 223 + }, + { + "caller": "main", + "callee": "builder.transform", + "lineNumber": 224 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(pairs, main),\n X_hand,\n post.negative_evidence_features(X_hand, main),\n gen.topk_content_similarity_fast(root, pairs, builder),\n ]\n ).astype", + "lineNumber": 225 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 225 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 227 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 229 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 230 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "np.column_stack([X, gen.variant_feature_matrix(post, [np.load(p).astype(np.float32) for p in selected])]).astype", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "np.load(p).astype", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 237 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 238 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 239 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 240 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 245 + }, + { + "caller": "main", + "callee": "content_mean_score", + "lineNumber": 246 + }, + { + "caller": "main", + "callee": "score_to_features", + "lineNumber": 247 + }, + { + "caller": "main", + "callee": "extra_blocks.append", + "lineNumber": 248 + }, + { + "caller": "main", + "callee": "extra_names.extend", + "lineNumber": 249 + }, + { + "caller": "main", + "callee": "np.column_stack([X, *extra_blocks]).astype", + "lineNumber": 250 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 250 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 252 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 253 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 254 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 257 + }, + { + "caller": "main", + "callee": "train_mf_bpr_score", + "lineNumber": 258 + }, + { + "caller": "main", + "callee": "score_to_features", + "lineNumber": 259 + }, + { + "caller": "main", + "callee": "extra_blocks.append", + "lineNumber": 260 + }, + { + "caller": "main", + "callee": "extra_names.extend", + "lineNumber": 261 + }, + { + "caller": "main", + "callee": "np.column_stack([X, *extra_blocks]).astype", + "lineNumber": 262 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 262 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 263 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 264 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 265 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 266 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 268 + }, + { + "caller": "main", + "callee": "train_ranker_oof", + "lineNumber": 269 + }, + { + "caller": "main", + "callee": "score_to_features", + "lineNumber": 270 + }, + { + "caller": "main", + "callee": "extra_blocks.append", + "lineNumber": 271 + }, + { + "caller": "main", + "callee": "extra_names.extend", + "lineNumber": 272 + }, + { + "caller": "main", + "callee": "np.column_stack([X, *extra_blocks]).astype", + "lineNumber": 273 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 273 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 274 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 275 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 276 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 277 + }, + { + "caller": "main", + "callee": "pd.Series(extra_names).to_csv", + "lineNumber": 279 + }, + { + "caller": "main", + "callee": "pd.Series", + "lineNumber": 279 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 280 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 280 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 281 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 282 + }, + { + "caller": "main", + "callee": "result.to_string", + "lineNumber": 282 + } + ], + "metrics": { + "importCount": 4, + "exportCount": 11, + "functionCount": 10, + "classCount": 1 + } + }, + { + "path": "code/figures/fig1_dataset_overview.py", + "language": "python", + "fileCategory": "code", + "totalLines": 62, + "nonEmptyLines": 51, + "functions": [ + { + "name": "plot_ccdf", + "startLine": 30, + "endLine": 47, + "params": [ + "deg", + "ax", + "color", + "title" + ] + } + ], + "exports": [ + { + "name": "plot_ccdf", + "line": 30, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "plot_ccdf", + "callee": "np.sort", + "lineNumber": 31 + }, + { + "caller": "plot_ccdf", + "callee": "np.unique", + "lineNumber": 32 + }, + { + "caller": "plot_ccdf", + "callee": "np.cumsum", + "lineNumber": 33 + }, + { + "caller": "plot_ccdf", + "callee": "len", + "lineNumber": 34 + }, + { + "caller": "plot_ccdf", + "callee": "ax.loglog", + "lineNumber": 36 + }, + { + "caller": "plot_ccdf", + "callee": "np.log10", + "lineNumber": 38 + }, + { + "caller": "plot_ccdf", + "callee": "np.log10", + "lineNumber": 39 + }, + { + "caller": "plot_ccdf", + "callee": "np.polyfit", + "lineNumber": 40 + }, + { + "caller": "plot_ccdf", + "callee": "np.linspace", + "lineNumber": 41 + }, + { + "caller": "plot_ccdf", + "callee": "x.min", + "lineNumber": 41 + }, + { + "caller": "plot_ccdf", + "callee": "x.max", + "lineNumber": 41 + }, + { + "caller": "plot_ccdf", + "callee": "ax.loglog", + "lineNumber": 42 + }, + { + "caller": "plot_ccdf", + "callee": "ax.set_title", + "lineNumber": 44 + }, + { + "caller": "plot_ccdf", + "callee": "ax.set_xlabel", + "lineNumber": 45 + }, + { + "caller": "plot_ccdf", + "callee": "ax.set_ylabel", + "lineNumber": 46 + }, + { + "caller": "plot_ccdf", + "callee": "ax.legend", + "lineNumber": 47 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "code/figures/fig10_rw_ensemble_size.py", + "language": "python", + "fileCategory": "code", + "totalLines": 39, + "nonEmptyLines": 32, + "metrics": { + "importCount": 1, + "exportCount": 0, + "functionCount": 0, + "classCount": 0 + } + }, + { + "path": "code/figures/fig2_framework.py", + "language": "python", + "fileCategory": "code", + "totalLines": 55, + "nonEmptyLines": 41, + "functions": [ + { + "name": "box", + "startLine": 21, + "endLine": 25, + "params": [ + "x", + "y", + "w", + "h", + "text", + "color", + "fc_alpha", + "fs" + ] + }, + { + "name": "arrow", + "startLine": 28, + "endLine": 29, + "params": [ + "x1", + "y1", + "x2", + "y2" + ] + } + ], + "exports": [ + { + "name": "box", + "line": 21, + "isDefault": false + }, + { + "name": "arrow", + "line": 28, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "box", + "callee": "FancyBboxPatch", + "lineNumber": 22 + }, + { + "caller": "box", + "callee": "ax.add_patch", + "lineNumber": 24 + }, + { + "caller": "box", + "callee": "ax.text", + "lineNumber": 25 + }, + { + "caller": "arrow", + "callee": "ax.add_patch", + "lineNumber": 29 + }, + { + "caller": "arrow", + "callee": "FancyArrowPatch", + "lineNumber": 29 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 2, + "functionCount": 2, + "classCount": 0 + } + }, + { + "path": "code/figures/fig3_progression.py", + "language": "python", + "fileCategory": "code", + "totalLines": 59, + "nonEmptyLines": 50, + "metrics": { + "importCount": 1, + "exportCount": 0, + "functionCount": 0, + "classCount": 0 + } + }, + { + "path": "code/figures/fig4_highorder_ablation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 48, + "nonEmptyLines": 38, + "metrics": { + "importCount": 1, + "exportCount": 0, + "functionCount": 0, + "classCount": 0 + } + }, + { + "path": "code/figures/fig5_pr_roc.py", + "language": "python", + "fileCategory": "code", + "totalLines": 61, + "nonEmptyLines": 51, + "metrics": { + "importCount": 1, + "exportCount": 0, + "functionCount": 0, + "classCount": 0 + } + }, + { + "path": "code/figures/fig6_feature_contribution.py", + "language": "python", + "fileCategory": "code", + "totalLines": 48, + "nonEmptyLines": 42, + "metrics": { + "importCount": 1, + "exportCount": 0, + "functionCount": 0, + "classCount": 0 + } + }, + { + "path": "code/figures/fig7_error_analysis.py", + "language": "python", + "fileCategory": "code", + "totalLines": 71, + "nonEmptyLines": 58, + "functions": [ + { + "name": "plot_buckets", + "startLine": 31, + "endLine": 41, + "params": [ + "ax", + "btype", + "color", + "title" + ] + } + ], + "exports": [ + { + "name": "plot_buckets", + "line": 31, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "plot_buckets", + "callee": "buckets[buckets[\"bucket_type\"] == btype].copy", + "lineNumber": 32 + }, + { + "caller": "plot_buckets", + "callee": "sub.reset_index", + "lineNumber": 33 + }, + { + "caller": "plot_buckets", + "callee": "ax.bar", + "lineNumber": 34 + }, + { + "caller": "plot_buckets", + "callee": "range", + "lineNumber": 34 + }, + { + "caller": "plot_buckets", + "callee": "len", + "lineNumber": 34 + }, + { + "caller": "plot_buckets", + "callee": "ax.set_xticks", + "lineNumber": 35 + }, + { + "caller": "plot_buckets", + "callee": "range", + "lineNumber": 35 + }, + { + "caller": "plot_buckets", + "callee": "len", + "lineNumber": 35 + }, + { + "caller": "plot_buckets", + "callee": "ax.set_xticklabels", + "lineNumber": 36 + }, + { + "caller": "plot_buckets", + "callee": "enumerate", + "lineNumber": 37 + }, + { + "caller": "plot_buckets", + "callee": "ax.text", + "lineNumber": 38 + }, + { + "caller": "plot_buckets", + "callee": "ax.set_ylabel", + "lineNumber": 39 + }, + { + "caller": "plot_buckets", + "callee": "ax.set_ylim", + "lineNumber": 40 + }, + { + "caller": "plot_buckets", + "callee": "ax.set_title", + "lineNumber": 41 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "code/figures/fig8_lgcn_ensemble_correlation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 34, + "nonEmptyLines": 28, + "metrics": { + "importCount": 1, + "exportCount": 0, + "functionCount": 0, + "classCount": 0 + } + }, + { + "path": "code/figures/fig9_lgcn_hyperparam.py", + "language": "python", + "fileCategory": "code", + "totalLines": 50, + "nonEmptyLines": 40, + "functions": [ + { + "name": "parse", + "startLine": 26, + "endLine": 28, + "params": [ + "run" + ] + } + ], + "exports": [ + { + "name": "parse", + "line": 26, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "parse", + "callee": "re.search", + "lineNumber": 27 + }, + { + "caller": "parse", + "callee": "pd.Series", + "lineNumber": 28 + }, + { + "caller": "parse", + "callee": "int", + "lineNumber": 28 + }, + { + "caller": "parse", + "callee": "m.group", + "lineNumber": 28 + }, + { + "caller": "parse", + "callee": "int", + "lineNumber": 28 + }, + { + "caller": "parse", + "callee": "m.group", + "lineNumber": 28 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "code/figures/gen_val_labels.py", + "language": "python", + "fileCategory": "code", + "totalLines": 65, + "nonEmptyLines": 51, + "functions": [ + { + "name": "load_module", + "startLine": 23, + "endLine": 29, + "params": [ + "name", + "path" + ] + }, + { + "name": "main", + "startLine": 32, + "endLine": 61, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 23, + "isDefault": false + }, + { + "name": "main", + "line": 32, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 24 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 25 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 28 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 33 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 34 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 34 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 34 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 35 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 36 + }, + { + "caller": "main", + "callee": "ap.parse_args", + "lineNumber": 37 + }, + { + "caller": "main", + "callee": "args.package_root.resolve", + "lineNumber": 39 + }, + { + "caller": "main", + "callee": "vr.mkdir", + "lineNumber": 41 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 47 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 48 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 49 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 50 + }, + { + "caller": "main", + "callee": "y.mean", + "lineNumber": 50 + }, + { + "caller": "main", + "callee": "np.load(oof_path).astype", + "lineNumber": 54 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 54 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "precision_recall_curve", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 57 + }, + { + "caller": "main", + "callee": "(2 * p * r / (p + r + 1e-12)).max", + "lineNumber": 57 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 58 + }, + { + "caller": "main", + "callee": "roc_auc_score", + "lineNumber": 58 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 59 + }, + { + "caller": "main", + "callee": "abs", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 61 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 2, + "functionCount": 2, + "classCount": 0 + } + }, + { + "path": "code/figures/plot_style.py", + "language": "python", + "fileCategory": "code", + "totalLines": 53, + "nonEmptyLines": 45, + "functions": [ + { + "name": "apply", + "startLine": 18, + "endLine": 44, + "params": [] + }, + { + "name": "save", + "startLine": 47, + "endLine": 53, + "params": [ + "fig", + "name", + "out_dir" + ] + } + ], + "exports": [ + { + "name": "apply", + "line": 18, + "isDefault": false + }, + { + "name": "save", + "line": 47, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "apply", + "callee": "sns.set_theme", + "lineNumber": 20 + }, + { + "caller": "apply", + "callee": "mpl.rcParams.update", + "lineNumber": 21 + }, + { + "caller": "save", + "callee": "Path", + "lineNumber": 49 + }, + { + "caller": "save", + "callee": "out_dir.mkdir", + "lineNumber": 50 + }, + { + "caller": "save", + "callee": "fig.savefig", + "lineNumber": 51 + }, + { + "caller": "save", + "callee": "fig.savefig", + "lineNumber": 52 + }, + { + "caller": "save", + "callee": "plt.close", + "lineNumber": 53 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 2, + "functionCount": 2, + "classCount": 0 + } + }, + { + "path": "code/generate_conservative_rw_blends.py", + "language": "python", + "fileCategory": "code", + "totalLines": 71, + "nonEmptyLines": 56, + "functions": [ + { + "name": "rank01", + "startLine": 15, + "endLine": 19, + "params": [ + "x" + ] + }, + { + "name": "write_ratio_submission", + "startLine": 22, + "endLine": 30, + "params": [ + "name", + "score", + "ratio", + "reference" + ] + }, + { + "name": "main", + "startLine": 33, + "endLine": 67, + "params": [] + } + ], + "exports": [ + { + "name": "rank01", + "line": 15, + "isDefault": false + }, + { + "name": "write_ratio_submission", + "line": 22, + "isDefault": false + }, + { + "name": "main", + "line": 33, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 16 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 17 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 17 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 18 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 18 + }, + { + "caller": "write_ratio_submission", + "callee": "np.load(ROOT / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 23 + }, + { + "caller": "write_ratio_submission", + "callee": "np.load", + "lineNumber": 23 + }, + { + "caller": "write_ratio_submission", + "callee": "np.zeros", + "lineNumber": 24 + }, + { + "caller": "write_ratio_submission", + "callee": "len", + "lineNumber": 24 + }, + { + "caller": "write_ratio_submission", + "callee": "np.argsort", + "lineNumber": 25 + }, + { + "caller": "write_ratio_submission", + "callee": "int", + "lineNumber": 25 + }, + { + "caller": "write_ratio_submission", + "callee": "round", + "lineNumber": 25 + }, + { + "caller": "write_ratio_submission", + "callee": "len", + "lineNumber": 25 + }, + { + "caller": "write_ratio_submission", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 28 + }, + { + "caller": "write_ratio_submission", + "callee": "pd.DataFrame", + "lineNumber": 28 + }, + { + "caller": "write_ratio_submission", + "callee": "np.arange", + "lineNumber": 28 + }, + { + "caller": "write_ratio_submission", + "callee": "len", + "lineNumber": 28 + }, + { + "caller": "write_ratio_submission", + "callee": "int", + "lineNumber": 29 + }, + { + "caller": "write_ratio_submission", + "callee": "(pred != reference).sum", + "lineNumber": 29 + }, + { + "caller": "write_ratio_submission", + "callee": "str", + "lineNumber": 30 + }, + { + "caller": "write_ratio_submission", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "write_ratio_submission", + "callee": "pred.mean", + "lineNumber": 30 + }, + { + "caller": "main", + "callee": "OUT.mkdir", + "lineNumber": 34 + }, + { + "caller": "main", + "callee": "np.load(v).astype", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "score_paths.items", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "pd.read_csv(anchor_sub)[\"Predicted\"].to_numpy", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "pd.read_csv", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "anchor_sub.exists", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "rank01", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "scores.items", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "blends.items", + "lineNumber": 63 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "write_ratio_submission", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "score.astype", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).to_csv", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 67 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).to_string", + "lineNumber": 67 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 67 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 3, + "functionCount": 3, + "classCount": 0 + } + }, + { + "path": "code/generate_content_rich_submission.py", + "language": "python", + "fileCategory": "code", + "totalLines": 127, + "nonEmptyLines": 112, + "functions": [ + { + "name": "load_module", + "startLine": 14, + "endLine": 19, + "params": [ + "name", + "path" + ] + }, + { + "name": "make_subs", + "startLine": 22, + "endLine": 35, + "params": [ + "root", + "out_dir", + "score", + "ratios" + ] + }, + { + "name": "main", + "startLine": 38, + "endLine": 123, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 14, + "isDefault": false + }, + { + "name": "make_subs", + "line": 22, + "isDefault": false + }, + { + "name": "main", + "line": 38, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 15 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 16 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 18 + }, + { + "caller": "make_subs", + "callee": "np.load(root / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 23 + }, + { + "caller": "make_subs", + "callee": "np.load", + "lineNumber": 23 + }, + { + "caller": "make_subs", + "callee": "np.zeros", + "lineNumber": 25 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 25 + }, + { + "caller": "make_subs", + "callee": "np.argsort", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "round", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 29 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 29 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 29 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 29 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 30 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 30 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 30 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 30 + }, + { + "caller": "make_subs", + "callee": "(score >= 0.5).astype", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 34 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 34 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 34 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 34 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 35 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 39 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 40 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 40 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 40 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 41 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 45 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 48 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 49 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 50 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 51 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 52 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 53 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 58 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 59 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "np.load(args.main_val_score_file).astype", + "lineNumber": 61 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 61 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 62 + }, + { + "caller": "main", + "callee": "val_builder.transform", + "lineNumber": 63 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(val_pairs_arr, main_val),\n Xh,\n post.negative_evidence_features(Xh, main_val),\n gen.topk_content_similarity_fast(root, val_pairs_arr, val_builder),\n ]\n ).astype", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 68 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, gen.variant_feature_matrix(post, [np.load(p).astype(np.float32) for p in selected])]).astype", + "lineNumber": 73 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 73 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 73 + }, + { + "caller": "main", + "callee": "np.load(p).astype", + "lineNumber": 73 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 73 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"extra_score_sources\" / f\"val_mf_bpr_s{args.seed}_d256.npy\").astype", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 77 + }, + { + "caller": "main", + "callee": "rich.content_rich_features", + "lineNumber": 78 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, Xc, Xm, Xrich_val]).astype", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "lgb.LGBMClassifier", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 93 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_test_scores\" / \"dyn202_l2d512_bpr_bigbatch_more\" / \"scores\" / \"test_vanilla_ensemble_mean.npy\").astype", + "lineNumber": 96 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 96 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 97 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 97 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 98 + }, + { + "caller": "main", + "callee": "test_builder.transform", + "lineNumber": 99 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(test_pairs, main_test),\n Xht,\n post.negative_evidence_features(Xht, main_test),\n gen.topk_content_similarity_fast(root, test_pairs, test_builder),\n ]\n ).astype", + "lineNumber": 100 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 100 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 102 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 104 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 105 + }, + { + "caller": "main", + "callee": "p.resolve().relative_to", + "lineNumber": 110 + }, + { + "caller": "main", + "callee": "p.resolve", + "lineNumber": 110 + }, + { + "caller": "main", + "callee": "rel.name.replace", + "lineNumber": 111 + }, + { + "caller": "main", + "callee": "test_scores.append", + "lineNumber": 112 + }, + { + "caller": "main", + "callee": "np.load(tp).astype", + "lineNumber": 112 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 112 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, gen.variant_feature_matrix(post, test_scores)]).astype", + "lineNumber": 113 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 113 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 113 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"extra_bprmf_submission\" / \"test_mf_bpr_dynamic_s202_d256_e220.npy\").astype", + "lineNumber": 115 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 115 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 116 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 117 + }, + { + "caller": "main", + "callee": "rich.content_rich_features", + "lineNumber": 118 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, Xct, Xmt, Xrich_test]).astype", + "lineNumber": 119 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 119 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 120 + }, + { + "caller": "main", + "callee": "clf.predict_proba(X_test)[:, 1].astype", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "make_subs", + "lineNumber": 123 + } + ], + "metrics": { + "importCount": 6, + "exportCount": 3, + "functionCount": 3, + "classCount": 0 + } + }, + { + "path": "code/generate_dot_submission.py", + "language": "python", + "fileCategory": "code", + "totalLines": 187, + "nonEmptyLines": 160, + "functions": [ + { + "name": "read_txt", + "startLine": 25, + "endLine": 26, + "params": [ + "path" + ] + }, + { + "name": "log_norm", + "startLine": 29, + "endLine": 31, + "params": [ + "x" + ] + }, + { + "name": "build", + "startLine": 69, + "endLine": 101, + "params": [ + "root", + "device" + ] + }, + { + "name": "predict_dot", + "startLine": 105, + "endLine": 113, + "params": [ + "model", + "data", + "pairs", + "batch_size" + ] + }, + { + "name": "rank01", + "startLine": 116, + "endLine": 120, + "params": [ + "x" + ] + }, + { + "name": "write", + "startLine": 123, + "endLine": 134, + "params": [ + "scores", + "known", + "out_dir", + "prefix", + "ratios" + ] + }, + { + "name": "main", + "startLine": 137, + "endLine": 183, + "params": [] + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "startLine": 34, + "endLine": 48, + "methods": [ + "forward" + ], + "properties": [] + }, + { + "name": "LightGCN", + "startLine": 51, + "endLine": 66, + "methods": [ + "__init__", + "encode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "read_txt", + "line": 25, + "isDefault": false + }, + { + "name": "log_norm", + "line": 29, + "isDefault": false + }, + { + "name": "LightGCNLayer", + "line": 34, + "isDefault": false + }, + { + "name": "LightGCN", + "line": 51, + "isDefault": false + }, + { + "name": "build", + "line": 69, + "isDefault": false + }, + { + "name": "predict_dot", + "line": 104, + "isDefault": false + }, + { + "name": "rank01", + "line": 116, + "isDefault": false + }, + { + "name": "write", + "line": 123, + "isDefault": false + }, + { + "name": "main", + "line": 137, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 26 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 30 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 31 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 31 + }, + { + "caller": "forward", + "callee": "sx.new_zeros", + "lineNumber": 43 + }, + { + "caller": "forward", + "callee": "x_dict[dt].size", + "lineNumber": 43 + }, + { + "caller": "forward", + "callee": "sx.size", + "lineNumber": 43 + }, + { + "caller": "forward", + "callee": "sx.new_zeros", + "lineNumber": 44 + }, + { + "caller": "forward", + "callee": "x_dict[dt].size", + "lineNumber": 44 + }, + { + "caller": "forward", + "callee": "agg.index_add_", + "lineNumber": 45 + }, + { + "caller": "forward", + "callee": "deg.index_add_", + "lineNumber": 46 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 46 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 46 + }, + { + "caller": "forward", + "callee": "agg_dict[dt].append", + "lineNumber": 47 + }, + { + "caller": "forward", + "callee": "deg.clamp", + "lineNumber": 47 + }, + { + "caller": "forward", + "callee": "sum", + "lineNumber": 48 + }, + { + "caller": "forward", + "callee": "len", + "lineNumber": 48 + }, + { + "caller": "forward", + "callee": "agg_dict.items", + "lineNumber": 48 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 53 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 53 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 54 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 55 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 56 + }, + { + "caller": "__init__", + "callee": "LightGCNLayer", + "lineNumber": 56 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 56 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 60 + }, + { + "caller": "encode", + "callee": "layer", + "lineNumber": 63 + }, + { + "caller": "encode", + "callee": "all_x.append", + "lineNumber": 64 + }, + { + "caller": "encode", + "callee": "len", + "lineNumber": 65 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 66 + }, + { + "caller": "build", + "callee": "read_txt", + "lineNumber": 71 + }, + { + "caller": "build", + "callee": "read_txt", + "lineNumber": 72 + }, + { + "caller": "build", + "callee": "read_txt", + "lineNumber": 73 + }, + { + "caller": "build", + "callee": "read_txt", + "lineNumber": 74 + }, + { + "caller": "build", + "callee": "(data_dir / \"feature.pkl\").open", + "lineNumber": 75 + }, + { + "caller": "build", + "callee": "pkl.load(f).numpy().astype", + "lineNumber": 76 + }, + { + "caller": "build", + "callee": "pkl.load(f).numpy", + "lineNumber": 76 + }, + { + "caller": "build", + "callee": "pkl.load", + "lineNumber": 76 + }, + { + "caller": "build", + "callee": "np.zeros", + "lineNumber": 78 + }, + { + "caller": "build", + "callee": "np.zeros", + "lineNumber": 79 + }, + { + "caller": "build", + "callee": "np.zeros", + "lineNumber": 80 + }, + { + "caller": "build", + "callee": "np.stack", + "lineNumber": 86 + }, + { + "caller": "build", + "callee": "log_norm", + "lineNumber": 86 + }, + { + "caller": "build", + "callee": "log_norm", + "lineNumber": 86 + }, + { + "caller": "build", + "callee": "log_norm", + "lineNumber": 86 + }, + { + "caller": "build", + "callee": "np.concatenate", + "lineNumber": 87 + }, + { + "caller": "build", + "callee": "paper_x.mean", + "lineNumber": 88 + }, + { + "caller": "build", + "callee": "paper_x.std", + "lineNumber": 88 + }, + { + "caller": "build", + "callee": "torch.as_tensor", + "lineNumber": 90 + }, + { + "caller": "build", + "callee": "np.array", + "lineNumber": 90 + }, + { + "caller": "build", + "callee": "torch.as_tensor", + "lineNumber": 91 + }, + { + "caller": "build", + "callee": "np.array", + "lineNumber": 91 + }, + { + "caller": "build", + "callee": "torch.as_tensor", + "lineNumber": 92 + }, + { + "caller": "build", + "callee": "np.array", + "lineNumber": 92 + }, + { + "caller": "build", + "callee": "HeteroData", + "lineNumber": 93 + }, + { + "caller": "build", + "callee": "torch.as_tensor", + "lineNumber": 96 + }, + { + "caller": "build", + "callee": "rt.t().contiguous", + "lineNumber": 97 + }, + { + "caller": "build", + "callee": "rt.t", + "lineNumber": 97 + }, + { + "caller": "build", + "callee": "rt[:, [1, 0]].t().contiguous", + "lineNumber": 98 + }, + { + "caller": "build", + "callee": "rt[:, [1, 0]].t", + "lineNumber": 98 + }, + { + "caller": "build", + "callee": "torch.cat([ct, ct[:, [1, 0]]], 0).t().contiguous", + "lineNumber": 99 + }, + { + "caller": "build", + "callee": "torch.cat([ct, ct[:, [1, 0]]], 0).t", + "lineNumber": 99 + }, + { + "caller": "build", + "callee": "torch.cat", + "lineNumber": 99 + }, + { + "caller": "build", + "callee": "torch.cat([co, co[:, [1, 0]]], 0).t().contiguous", + "lineNumber": 100 + }, + { + "caller": "build", + "callee": "torch.cat([co, co[:, [1, 0]]], 0).t", + "lineNumber": 100 + }, + { + "caller": "build", + "callee": "torch.cat", + "lineNumber": 100 + }, + { + "caller": "build", + "callee": "data.to", + "lineNumber": 101 + }, + { + "caller": "build", + "callee": "np.array", + "lineNumber": 101 + }, + { + "caller": "predict_dot", + "callee": "model.encode", + "lineNumber": 106 + }, + { + "caller": "predict_dot", + "callee": "z[\"author\"].detach().cpu().numpy", + "lineNumber": 107 + }, + { + "caller": "predict_dot", + "callee": "z[\"author\"].detach().cpu", + "lineNumber": 107 + }, + { + "caller": "predict_dot", + "callee": "z[\"author\"].detach", + "lineNumber": 107 + }, + { + "caller": "predict_dot", + "callee": "z[\"paper\"].detach().cpu().numpy", + "lineNumber": 108 + }, + { + "caller": "predict_dot", + "callee": "z[\"paper\"].detach().cpu", + "lineNumber": 108 + }, + { + "caller": "predict_dot", + "callee": "z[\"paper\"].detach", + "lineNumber": 108 + }, + { + "caller": "predict_dot", + "callee": "range", + "lineNumber": 110 + }, + { + "caller": "predict_dot", + "callee": "len", + "lineNumber": 110 + }, + { + "caller": "predict_dot", + "callee": "out.append", + "lineNumber": 112 + }, + { + "caller": "predict_dot", + "callee": "np.sum(a[b[:, 0]] * p[b[:, 1]], axis=1).astype", + "lineNumber": 112 + }, + { + "caller": "predict_dot", + "callee": "np.sum", + "lineNumber": 112 + }, + { + "caller": "predict_dot", + "callee": "np.concatenate", + "lineNumber": 113 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 117 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 118 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 118 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 119 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 119 + }, + { + "caller": "write", + "callee": "scores.copy", + "lineNumber": 124 + }, + { + "caller": "write", + "callee": "np.argsort", + "lineNumber": 126 + }, + { + "caller": "write", + "callee": "int", + "lineNumber": 128 + }, + { + "caller": "write", + "callee": "round", + "lineNumber": 128 + }, + { + "caller": "write", + "callee": "len", + "lineNumber": 128 + }, + { + "caller": "write", + "callee": "np.zeros", + "lineNumber": 129 + }, + { + "caller": "write", + "callee": "len", + "lineNumber": 129 + }, + { + "caller": "write", + "callee": "pd.DataFrame", + "lineNumber": 131 + }, + { + "caller": "write", + "callee": "np.arange", + "lineNumber": 131 + }, + { + "caller": "write", + "callee": "len", + "lineNumber": 131 + }, + { + "caller": "write", + "callee": "pred.astype", + "lineNumber": 131 + }, + { + "caller": "write", + "callee": "df.to_csv", + "lineNumber": 133 + }, + { + "caller": "write", + "callee": "print", + "lineNumber": 134 + }, + { + "caller": "write", + "callee": "int", + "lineNumber": 134 + }, + { + "caller": "write", + "callee": "pred.sum", + "lineNumber": 134 + }, + { + "caller": "write", + "callee": "float", + "lineNumber": 134 + }, + { + "caller": "write", + "callee": "pred.mean", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 142 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "torch.device", + "lineNumber": 145 + }, + { + "caller": "main", + "callee": "build", + "lineNumber": 146 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 147 + }, + { + "caller": "main", + "callee": "map", + "lineNumber": 147 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "tuple", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "score_dir.mkdir", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 162 + }, + { + "caller": "main", + "callee": "cache.exists", + "lineNumber": 167 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 168 + }, + { + "caller": "main", + "callee": "torch.load", + "lineNumber": 170 + }, + { + "caller": "main", + "callee": "LightGCN(6611, feat_dim, dim, 4).to", + "lineNumber": 172 + }, + { + "caller": "main", + "callee": "LightGCN", + "lineNumber": 172 + }, + { + "caller": "main", + "callee": "model.load_state_dict", + "lineNumber": 173 + }, + { + "caller": "main", + "callee": "predict_dot", + "lineNumber": 174 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 175 + }, + { + "caller": "main", + "callee": "torch.cuda.empty_cache", + "lineNumber": 177 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "s.mean", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "s.std", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "scores.append", + "lineNumber": 179 + }, + { + "caller": "main", + "callee": "np.mean", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "s.mean", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "s.std", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "np.mean", + "lineNumber": 181 + }, + { + "caller": "main", + "callee": "rank01", + "lineNumber": 181 + }, + { + "caller": "main", + "callee": "write", + "lineNumber": 182 + }, + { + "caller": "main", + "callee": "write", + "lineNumber": 183 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 9, + "functionCount": 7, + "classCount": 2 + } + }, + { + "path": "code/generate_ens6_submission.py", + "language": "python", + "fileCategory": "code", + "totalLines": 263, + "nonEmptyLines": 216, + "functions": [ + { + "name": "read_txt", + "startLine": 42, + "endLine": 47, + "params": [ + "path" + ] + }, + { + "name": "log_norm", + "startLine": 50, + "endLine": 52, + "params": [ + "x" + ] + }, + { + "name": "cos_sim", + "startLine": 104, + "endLine": 105, + "params": [ + "a", + "b", + "eps" + ] + }, + { + "name": "build_features", + "startLine": 108, + "endLine": 150, + "params": [ + "data_dir", + "num_authors", + "num_papers" + ] + }, + { + "name": "build_data", + "startLine": 153, + "endLine": 176, + "params": [ + "parts", + "num_authors", + "num_papers", + "device" + ] + }, + { + "name": "predict", + "startLine": 180, + "endLine": 190, + "params": [ + "model", + "data", + "pairs", + "batch_size" + ] + }, + { + "name": "main", + "startLine": 193, + "endLine": 258, + "params": [] + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "startLine": 55, + "endLine": 77, + "methods": [ + "forward" + ], + "properties": [] + }, + { + "name": "LightGCN", + "startLine": 80, + "endLine": 101, + "methods": [ + "__init__", + "encode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "read_txt", + "line": 42, + "isDefault": false + }, + { + "name": "log_norm", + "line": 50, + "isDefault": false + }, + { + "name": "LightGCNLayer", + "line": 55, + "isDefault": false + }, + { + "name": "LightGCN", + "line": 80, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 104, + "isDefault": false + }, + { + "name": "build_features", + "line": 108, + "isDefault": false + }, + { + "name": "build_data", + "line": 153, + "isDefault": false + }, + { + "name": "predict", + "line": 179, + "isDefault": false + }, + { + "name": "main", + "line": 193, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 44 + }, + { + "caller": "read_txt", + "callee": "rows.append", + "lineNumber": 46 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 46 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 46 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 46 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 46 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 51 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 52 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 52 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 64 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 64 + }, + { + "caller": "forward", + "callee": "src_x.size", + "lineNumber": 64 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 65 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 65 + }, + { + "caller": "forward", + "callee": "agg.index_add_", + "lineNumber": 66 + }, + { + "caller": "forward", + "callee": "deg.index_add_", + "lineNumber": 67 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 70 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 70 + }, + { + "caller": "forward", + "callee": "agg_dict[dst_type].append", + "lineNumber": 72 + }, + { + "caller": "forward", + "callee": "deg.clamp", + "lineNumber": 72 + }, + { + "caller": "forward", + "callee": "sum", + "lineNumber": 75 + }, + { + "caller": "forward", + "callee": "len", + "lineNumber": 75 + }, + { + "caller": "forward", + "callee": "agg_dict.items", + "lineNumber": 76 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 82 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 82 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 83 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 84 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 85 + }, + { + "caller": "__init__", + "callee": "LightGCNLayer", + "lineNumber": 85 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 85 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 91 + }, + { + "caller": "encode", + "callee": "layer", + "lineNumber": 95 + }, + { + "caller": "encode", + "callee": "all_layers.append", + "lineNumber": 96 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 99 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 105 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 105 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 105 + }, + { + "caller": "build_features", + "callee": "read_txt", + "lineNumber": 109 + }, + { + "caller": "build_features", + "callee": "read_txt", + "lineNumber": 110 + }, + { + "caller": "build_features", + "callee": "read_txt", + "lineNumber": 111 + }, + { + "caller": "build_features", + "callee": "read_txt", + "lineNumber": 112 + }, + { + "caller": "build_features", + "callee": "(data_dir / \"feature.pkl\").open", + "lineNumber": 114 + }, + { + "caller": "build_features", + "callee": "pkl.load", + "lineNumber": 115 + }, + { + "caller": "build_features", + "callee": "np.zeros", + "lineNumber": 117 + }, + { + "caller": "build_features", + "callee": "np.zeros", + "lineNumber": 118 + }, + { + "caller": "build_features", + "callee": "np.zeros", + "lineNumber": 119 + }, + { + "caller": "build_features", + "callee": "paper_feature.numpy().astype", + "lineNumber": 127 + }, + { + "caller": "build_features", + "callee": "paper_feature.numpy", + "lineNumber": 127 + }, + { + "caller": "build_features", + "callee": "np.stack", + "lineNumber": 128 + }, + { + "caller": "build_features", + "callee": "log_norm", + "lineNumber": 129 + }, + { + "caller": "build_features", + "callee": "log_norm", + "lineNumber": 129 + }, + { + "caller": "build_features", + "callee": "log_norm", + "lineNumber": 129 + }, + { + "caller": "build_features", + "callee": "np.concatenate", + "lineNumber": 132 + }, + { + "caller": "build_features", + "callee": "paper_feat_aug.mean", + "lineNumber": 133 + }, + { + "caller": "build_features", + "callee": "paper_feat_aug.std", + "lineNumber": 134 + }, + { + "caller": "build_features", + "callee": "pd.DataFrame", + "lineNumber": 137 + }, + { + "caller": "build_features", + "callee": "pd.DataFrame", + "lineNumber": 138 + }, + { + "caller": "build_features", + "callee": "pd.DataFrame", + "lineNumber": 139 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 154 + }, + { + "caller": "build_data", + "callee": "parts[\"ref_edges\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 155 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 157 + }, + { + "caller": "build_data", + "callee": "parts[\"cite_edges\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 158 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 160 + }, + { + "caller": "build_data", + "callee": "parts[\"coauthor_edges\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 161 + }, + { + "caller": "build_data", + "callee": "HeteroData", + "lineNumber": 164 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 167 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t().contiguous", + "lineNumber": 168 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t", + "lineNumber": 168 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t().contiguous", + "lineNumber": 169 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t", + "lineNumber": 169 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [cite_tensor, cite_tensor[:, [1, 0]]], dim=0\n ).t().contiguous", + "lineNumber": 170 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [cite_tensor, cite_tensor[:, [1, 0]]], dim=0\n ).t", + "lineNumber": 170 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 170 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0\n ).t().contiguous", + "lineNumber": 173 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0\n ).t", + "lineNumber": 173 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 173 + }, + { + "caller": "build_data", + "callee": "data.to", + "lineNumber": 176 + }, + { + "caller": "predict", + "callee": "model.eval", + "lineNumber": 181 + }, + { + "caller": "predict", + "callee": "model.encode", + "lineNumber": 182 + }, + { + "caller": "predict", + "callee": "z_dict[\"author\"].cpu().numpy", + "lineNumber": 183 + }, + { + "caller": "predict", + "callee": "z_dict[\"author\"].cpu", + "lineNumber": 183 + }, + { + "caller": "predict", + "callee": "z_dict[\"paper\"].cpu().numpy", + "lineNumber": 184 + }, + { + "caller": "predict", + "callee": "z_dict[\"paper\"].cpu", + "lineNumber": 184 + }, + { + "caller": "predict", + "callee": "range", + "lineNumber": 186 + }, + { + "caller": "predict", + "callee": "len", + "lineNumber": 186 + }, + { + "caller": "predict", + "callee": "min", + "lineNumber": 187 + }, + { + "caller": "predict", + "callee": "len", + "lineNumber": 187 + }, + { + "caller": "predict", + "callee": "scores.append", + "lineNumber": 189 + }, + { + "caller": "predict", + "callee": "cos_sim", + "lineNumber": 189 + }, + { + "caller": "predict", + "callee": "np.concatenate", + "lineNumber": 190 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 194 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 195 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 195 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 195 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 196 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 197 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 198 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 199 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 199 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 200 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 201 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 207 + }, + { + "caller": "main", + "callee": "output_dir.mkdir", + "lineNumber": 213 + }, + { + "caller": "main", + "callee": "torch.device", + "lineNumber": 215 + }, + { + "caller": "main", + "callee": "build_features", + "lineNumber": 219 + }, + { + "caller": "main", + "callee": "build_data", + "lineNumber": 220 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 221 + }, + { + "caller": "main", + "callee": "LightGCN(num_authors, parts[\"paper_feat_aug\"].shape[1], embed_dim).to", + "lineNumber": 235 + }, + { + "caller": "main", + "callee": "LightGCN", + "lineNumber": 235 + }, + { + "caller": "main", + "callee": "torch.load", + "lineNumber": 236 + }, + { + "caller": "main", + "callee": "model.load_state_dict", + "lineNumber": 237 + }, + { + "caller": "main", + "callee": "predict", + "lineNumber": 238 + }, + { + "caller": "main", + "callee": "all_scores.append", + "lineNumber": 239 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 240 + }, + { + "caller": "main", + "callee": "scores.mean", + "lineNumber": 240 + }, + { + "caller": "main", + "callee": "scores.std", + "lineNumber": 240 + }, + { + "caller": "main", + "callee": "np.mean", + "lineNumber": 243 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 244 + }, + { + "caller": "main", + "callee": "map", + "lineNumber": 244 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 245 + }, + { + "caller": "main", + "callee": "tuple", + "lineNumber": 245 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 247 + }, + { + "caller": "main", + "callee": "known_mask.sum", + "lineNumber": 247 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 247 + }, + { + "caller": "main", + "callee": "(ensemble >= threshold).astype", + "lineNumber": 250 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 252 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 252 + }, + { + "caller": "main", + "callee": "enumerate", + "lineNumber": 252 + }, + { + "caller": "main", + "callee": "out.to_csv", + "lineNumber": 257 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 258 + }, + { + "caller": "main", + "callee": "preds.sum", + "lineNumber": 258 + }, + { + "caller": "main", + "callee": "preds.mean", + "lineNumber": 258 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 9, + "functionCount": 7, + "classCount": 2 + } + }, + { + "path": "code/generate_extra_bprmf_submission.py", + "language": "python", + "fileCategory": "code", + "totalLines": 174, + "nonEmptyLines": 156, + "functions": [ + { + "name": "load_module", + "startLine": 16, + "endLine": 21, + "params": [ + "name", + "path" + ] + }, + { + "name": "train_mf_test_scores", + "startLine": 24, + "endLine": 65, + "params": [ + "extra", + "root", + "train_refs", + "test_pairs", + "out_dir", + "device", + "seed", + "dim", + "epochs" + ] + }, + { + "name": "make_subs", + "startLine": 68, + "endLine": 81, + "params": [ + "root", + "out_dir", + "score", + "ratios" + ] + }, + { + "name": "main", + "startLine": 84, + "endLine": 170, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 16, + "isDefault": false + }, + { + "name": "train_mf_test_scores", + "line": 24, + "isDefault": false + }, + { + "name": "make_subs", + "line": 68, + "isDefault": false + }, + { + "name": "main", + "line": 84, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 17 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 18 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 20 + }, + { + "caller": "train_mf_test_scores", + "callee": "out_path.exists", + "lineNumber": 26 + }, + { + "caller": "train_mf_test_scores", + "callee": "np.load", + "lineNumber": 27 + }, + { + "caller": "train_mf_test_scores", + "callee": "torch.manual_seed", + "lineNumber": 28 + }, + { + "caller": "train_mf_test_scores", + "callee": "np.random.seed", + "lineNumber": 29 + }, + { + "caller": "train_mf_test_scores", + "callee": "np.random.default_rng", + "lineNumber": 30 + }, + { + "caller": "train_mf_test_scores", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 31 + }, + { + "caller": "train_mf_test_scores", + "callee": "set", + "lineNumber": 32 + }, + { + "caller": "train_mf_test_scores", + "callee": "map", + "lineNumber": 32 + }, + { + "caller": "train_mf_test_scores", + "callee": "train.tolist", + "lineNumber": 32 + }, + { + "caller": "train_mf_test_scores", + "callee": "extra.MF(6611, 79937, dim).to", + "lineNumber": 33 + }, + { + "caller": "train_mf_test_scores", + "callee": "extra.MF", + "lineNumber": 33 + }, + { + "caller": "train_mf_test_scores", + "callee": "torch.device", + "lineNumber": 33 + }, + { + "caller": "train_mf_test_scores", + "callee": "torch.optim.AdamW", + "lineNumber": 34 + }, + { + "caller": "train_mf_test_scores", + "callee": "model.parameters", + "lineNumber": 34 + }, + { + "caller": "train_mf_test_scores", + "callee": "torch.as_tensor", + "lineNumber": 35 + }, + { + "caller": "train_mf_test_scores", + "callee": "range", + "lineNumber": 37 + }, + { + "caller": "train_mf_test_scores", + "callee": "torch.randint", + "lineNumber": 38 + }, + { + "caller": "train_mf_test_scores", + "callee": "train_t.size", + "lineNumber": 38 + }, + { + "caller": "train_mf_test_scores", + "callee": "np.empty", + "lineNumber": 40 + }, + { + "caller": "train_mf_test_scores", + "callee": "pos[:, 0].detach().cpu().numpy", + "lineNumber": 41 + }, + { + "caller": "train_mf_test_scores", + "callee": "pos[:, 0].detach().cpu", + "lineNumber": 41 + }, + { + "caller": "train_mf_test_scores", + "callee": "pos[:, 0].detach", + "lineNumber": 41 + }, + { + "caller": "train_mf_test_scores", + "callee": "rng.integers", + "lineNumber": 44 + }, + { + "caller": "train_mf_test_scores", + "callee": "zip", + "lineNumber": 45 + }, + { + "caller": "train_mf_test_scores", + "callee": "int", + "lineNumber": 46 + }, + { + "caller": "train_mf_test_scores", + "callee": "int", + "lineNumber": 46 + }, + { + "caller": "train_mf_test_scores", + "callee": "torch.as_tensor", + "lineNumber": 51 + }, + { + "caller": "train_mf_test_scores", + "callee": "F.logsigmoid(model.score(pos) - model.score(neg)).mean", + "lineNumber": 52 + }, + { + "caller": "train_mf_test_scores", + "callee": "F.logsigmoid", + "lineNumber": 52 + }, + { + "caller": "train_mf_test_scores", + "callee": "model.score", + "lineNumber": 52 + }, + { + "caller": "train_mf_test_scores", + "callee": "model.score", + "lineNumber": 52 + }, + { + "caller": "train_mf_test_scores", + "callee": "opt.zero_grad", + "lineNumber": 53 + }, + { + "caller": "train_mf_test_scores", + "callee": "loss.backward", + "lineNumber": 54 + }, + { + "caller": "train_mf_test_scores", + "callee": "opt.step", + "lineNumber": 55 + }, + { + "caller": "train_mf_test_scores", + "callee": "print", + "lineNumber": 57 + }, + { + "caller": "train_mf_test_scores", + "callee": "loss.item", + "lineNumber": 57 + }, + { + "caller": "train_mf_test_scores", + "callee": "torch.as_tensor", + "lineNumber": 58 + }, + { + "caller": "train_mf_test_scores", + "callee": "torch.no_grad", + "lineNumber": 60 + }, + { + "caller": "train_mf_test_scores", + "callee": "range", + "lineNumber": 61 + }, + { + "caller": "train_mf_test_scores", + "callee": "len", + "lineNumber": 61 + }, + { + "caller": "train_mf_test_scores", + "callee": "scores.append", + "lineNumber": 62 + }, + { + "caller": "train_mf_test_scores", + "callee": "model.score(test_t[st : st + 131072]).detach().cpu().numpy", + "lineNumber": 62 + }, + { + "caller": "train_mf_test_scores", + "callee": "model.score(test_t[st : st + 131072]).detach().cpu", + "lineNumber": 62 + }, + { + "caller": "train_mf_test_scores", + "callee": "model.score(test_t[st : st + 131072]).detach", + "lineNumber": 62 + }, + { + "caller": "train_mf_test_scores", + "callee": "model.score", + "lineNumber": 62 + }, + { + "caller": "train_mf_test_scores", + "callee": "np.concatenate(scores).astype", + "lineNumber": 63 + }, + { + "caller": "train_mf_test_scores", + "callee": "np.concatenate", + "lineNumber": 63 + }, + { + "caller": "train_mf_test_scores", + "callee": "np.save", + "lineNumber": 64 + }, + { + "caller": "make_subs", + "callee": "np.load(root / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 69 + }, + { + "caller": "make_subs", + "callee": "np.load", + "lineNumber": 69 + }, + { + "caller": "make_subs", + "callee": "np.zeros", + "lineNumber": 71 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 71 + }, + { + "caller": "make_subs", + "callee": "np.argsort", + "lineNumber": 72 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 72 + }, + { + "caller": "make_subs", + "callee": "round", + "lineNumber": 72 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 72 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 75 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 75 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 75 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 75 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 76 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 76 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 76 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 76 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 76 + }, + { + "caller": "make_subs", + "callee": "(score >= 0.5).astype", + "lineNumber": 77 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 80 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 80 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 80 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 80 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 81 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 81 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 81 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 81 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 88 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 89 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 89 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 91 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 92 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 93 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 97 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 98 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 99 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 100 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 101 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 104 + }, + { + "caller": "main", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 106 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 107 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 108 + }, + { + "caller": "main", + "callee": "np.load(args.main_val_score_file).astype", + "lineNumber": 109 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 109 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 111 + }, + { + "caller": "main", + "callee": "val_builder.transform", + "lineNumber": 112 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(val_pairs_arr, main_val),\n Xh,\n post.negative_evidence_features(Xh, main_val),\n gen.topk_content_similarity_fast(root, val_pairs_arr, val_builder),\n ]\n ).astype", + "lineNumber": 113 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 113 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 115 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 117 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 118 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, gen.variant_feature_matrix(post, [np.load(p).astype(np.float32) for p in selected])]).astype", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "np.load(p).astype", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"extra_score_sources\" / f\"val_mf_bpr_s{args.seed}_d{args.mf_dim}.npy\").astype", + "lineNumber": 124 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 124 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 126 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, Xc, Xm]).astype", + "lineNumber": 127 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 127 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 128 + }, + { + "caller": "main", + "callee": "lgb.LGBMClassifier", + "lineNumber": 129 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_test_scores\" / \"dyn202_l2d512_bpr_bigbatch_more\" / \"scores\" / \"test_vanilla_ensemble_mean.npy\").astype", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 145 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 145 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 146 + }, + { + "caller": "main", + "callee": "test_builder.transform", + "lineNumber": 147 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(test_pairs, main_test),\n Xht,\n post.negative_evidence_features(Xht, main_test),\n gen.topk_content_similarity_fast(root, test_pairs, test_builder),\n ]\n ).astype", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 150 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 152 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 153 + }, + { + "caller": "main", + "callee": "p.resolve().relative_to", + "lineNumber": 158 + }, + { + "caller": "main", + "callee": "p.resolve", + "lineNumber": 158 + }, + { + "caller": "main", + "callee": "rel.name.replace", + "lineNumber": 159 + }, + { + "caller": "main", + "callee": "test_scores.append", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "np.load(tp).astype", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, gen.variant_feature_matrix(post, test_scores)]).astype", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 162 + }, + { + "caller": "main", + "callee": "train_mf_test_scores", + "lineNumber": 163 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 164 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, Xct, Xmt]).astype", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 167 + }, + { + "caller": "main", + "callee": "clf.predict_proba(X_test)[:, 1].astype", + "lineNumber": 168 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 168 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 169 + }, + { + "caller": "main", + "callee": "make_subs", + "lineNumber": 170 + } + ], + "metrics": { + "importCount": 5, + "exportCount": 4, + "functionCount": 4, + "classCount": 0 + } + }, + { + "path": "code/generate_large_ensemble_submission.py", + "language": "python", + "fileCategory": "code", + "totalLines": 342, + "nonEmptyLines": 290, + "functions": [ + { + "name": "read_txt", + "startLine": 34, + "endLine": 39, + "params": [ + "path" + ] + }, + { + "name": "log_norm", + "startLine": 42, + "endLine": 44, + "params": [ + "x" + ] + }, + { + "name": "cos_sim", + "startLine": 96, + "endLine": 97, + "params": [ + "a", + "b", + "eps" + ] + }, + { + "name": "build_features", + "startLine": 100, + "endLine": 136, + "params": [ + "data_dir", + "num_papers" + ] + }, + { + "name": "build_data", + "startLine": 139, + "endLine": 162, + "params": [ + "parts", + "num_authors", + "num_papers", + "device" + ] + }, + { + "name": "predict", + "startLine": 166, + "endLine": 176, + "params": [ + "model", + "data", + "pairs", + "batch_size" + ] + }, + { + "name": "checkpoint_weight", + "startLine": 179, + "endLine": 194, + "params": [ + "path" + ] + }, + { + "name": "percent_rank", + "startLine": 197, + "endLine": 201, + "params": [ + "x" + ] + }, + { + "name": "write_threshold_submissions", + "startLine": 204, + "endLine": 222, + "params": [ + "scores", + "known_mask", + "output_dir", + "prefix", + "thresholds" + ] + }, + { + "name": "write_top_ratio_submissions", + "startLine": 225, + "endLine": 246, + "params": [ + "scores", + "known_mask", + "output_dir", + "prefix", + "ratios" + ] + }, + { + "name": "main", + "startLine": 249, + "endLine": 338, + "params": [] + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "startLine": 47, + "endLine": 69, + "methods": [ + "forward" + ], + "properties": [] + }, + { + "name": "LightGCN", + "startLine": 72, + "endLine": 93, + "methods": [ + "__init__", + "encode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "read_txt", + "line": 34, + "isDefault": false + }, + { + "name": "log_norm", + "line": 42, + "isDefault": false + }, + { + "name": "LightGCNLayer", + "line": 47, + "isDefault": false + }, + { + "name": "LightGCN", + "line": 72, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 96, + "isDefault": false + }, + { + "name": "build_features", + "line": 100, + "isDefault": false + }, + { + "name": "build_data", + "line": 139, + "isDefault": false + }, + { + "name": "predict", + "line": 165, + "isDefault": false + }, + { + "name": "checkpoint_weight", + "line": 179, + "isDefault": false + }, + { + "name": "percent_rank", + "line": 197, + "isDefault": false + }, + { + "name": "write_threshold_submissions", + "line": 204, + "isDefault": false + }, + { + "name": "write_top_ratio_submissions", + "line": 225, + "isDefault": false + }, + { + "name": "main", + "line": 249, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 36 + }, + { + "caller": "read_txt", + "callee": "rows.append", + "lineNumber": 38 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 38 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 38 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 38 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 38 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 43 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 44 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 44 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 56 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 56 + }, + { + "caller": "forward", + "callee": "src_x.size", + "lineNumber": 56 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 57 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 57 + }, + { + "caller": "forward", + "callee": "agg.index_add_", + "lineNumber": 58 + }, + { + "caller": "forward", + "callee": "deg.index_add_", + "lineNumber": 59 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 62 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 62 + }, + { + "caller": "forward", + "callee": "agg_dict[dst_type].append", + "lineNumber": 64 + }, + { + "caller": "forward", + "callee": "deg.clamp", + "lineNumber": 64 + }, + { + "caller": "forward", + "callee": "sum", + "lineNumber": 67 + }, + { + "caller": "forward", + "callee": "len", + "lineNumber": 67 + }, + { + "caller": "forward", + "callee": "agg_dict.items", + "lineNumber": 68 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 74 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 74 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 75 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 76 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 77 + }, + { + "caller": "__init__", + "callee": "LightGCNLayer", + "lineNumber": 77 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 77 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 83 + }, + { + "caller": "encode", + "callee": "layer", + "lineNumber": 87 + }, + { + "caller": "encode", + "callee": "all_layers.append", + "lineNumber": 88 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 91 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 97 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 97 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 97 + }, + { + "caller": "build_features", + "callee": "read_txt", + "lineNumber": 101 + }, + { + "caller": "build_features", + "callee": "read_txt", + "lineNumber": 102 + }, + { + "caller": "build_features", + "callee": "read_txt", + "lineNumber": 103 + }, + { + "caller": "build_features", + "callee": "read_txt", + "lineNumber": 104 + }, + { + "caller": "build_features", + "callee": "(data_dir / \"feature.pkl\").open", + "lineNumber": 106 + }, + { + "caller": "build_features", + "callee": "pkl.load", + "lineNumber": 107 + }, + { + "caller": "build_features", + "callee": "np.zeros", + "lineNumber": 109 + }, + { + "caller": "build_features", + "callee": "np.zeros", + "lineNumber": 110 + }, + { + "caller": "build_features", + "callee": "np.zeros", + "lineNumber": 111 + }, + { + "caller": "build_features", + "callee": "paper_feature.numpy().astype", + "lineNumber": 119 + }, + { + "caller": "build_features", + "callee": "paper_feature.numpy", + "lineNumber": 119 + }, + { + "caller": "build_features", + "callee": "np.stack", + "lineNumber": 120 + }, + { + "caller": "build_features", + "callee": "log_norm", + "lineNumber": 121 + }, + { + "caller": "build_features", + "callee": "log_norm", + "lineNumber": 121 + }, + { + "caller": "build_features", + "callee": "log_norm", + "lineNumber": 121 + }, + { + "caller": "build_features", + "callee": "np.concatenate", + "lineNumber": 124 + }, + { + "caller": "build_features", + "callee": "paper_feat_aug.mean", + "lineNumber": 125 + }, + { + "caller": "build_features", + "callee": "paper_feat_aug.std", + "lineNumber": 126 + }, + { + "caller": "build_features", + "callee": "pd.DataFrame", + "lineNumber": 130 + }, + { + "caller": "build_features", + "callee": "pd.DataFrame", + "lineNumber": 133 + }, + { + "caller": "build_features", + "callee": "pd.DataFrame", + "lineNumber": 135 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 140 + }, + { + "caller": "build_data", + "callee": "parts[\"ref_edges\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 141 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 143 + }, + { + "caller": "build_data", + "callee": "parts[\"citation\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 144 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 146 + }, + { + "caller": "build_data", + "callee": "parts[\"coauthor\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 147 + }, + { + "caller": "build_data", + "callee": "HeteroData", + "lineNumber": 150 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 153 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t().contiguous", + "lineNumber": 154 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t", + "lineNumber": 154 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t().contiguous", + "lineNumber": 155 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t", + "lineNumber": 155 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [cite_tensor, cite_tensor[:, [1, 0]]], dim=0\n ).t().contiguous", + "lineNumber": 156 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [cite_tensor, cite_tensor[:, [1, 0]]], dim=0\n ).t", + "lineNumber": 156 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 156 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0\n ).t().contiguous", + "lineNumber": 159 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0\n ).t", + "lineNumber": 159 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 159 + }, + { + "caller": "build_data", + "callee": "data.to", + "lineNumber": 162 + }, + { + "caller": "predict", + "callee": "model.eval", + "lineNumber": 167 + }, + { + "caller": "predict", + "callee": "model.encode", + "lineNumber": 168 + }, + { + "caller": "predict", + "callee": "z_dict[\"author\"].cpu().numpy", + "lineNumber": 169 + }, + { + "caller": "predict", + "callee": "z_dict[\"author\"].cpu", + "lineNumber": 169 + }, + { + "caller": "predict", + "callee": "z_dict[\"paper\"].cpu().numpy", + "lineNumber": 170 + }, + { + "caller": "predict", + "callee": "z_dict[\"paper\"].cpu", + "lineNumber": 170 + }, + { + "caller": "predict", + "callee": "range", + "lineNumber": 172 + }, + { + "caller": "predict", + "callee": "len", + "lineNumber": 172 + }, + { + "caller": "predict", + "callee": "min", + "lineNumber": 173 + }, + { + "caller": "predict", + "callee": "len", + "lineNumber": 173 + }, + { + "caller": "predict", + "callee": "scores.append", + "lineNumber": 175 + }, + { + "caller": "predict", + "callee": "cos_sim(author_z[batch[:, 0]], paper_z[batch[:, 1]]).astype", + "lineNumber": 175 + }, + { + "caller": "predict", + "callee": "cos_sim", + "lineNumber": 175 + }, + { + "caller": "predict", + "callee": "np.concatenate", + "lineNumber": 176 + }, + { + "caller": "checkpoint_weight", + "callee": "name.startswith", + "lineNumber": 190 + }, + { + "caller": "checkpoint_weight", + "callee": "name.startswith", + "lineNumber": 192 + }, + { + "caller": "percent_rank", + "callee": "np.argsort", + "lineNumber": 198 + }, + { + "caller": "percent_rank", + "callee": "np.empty_like", + "lineNumber": 199 + }, + { + "caller": "percent_rank", + "callee": "np.linspace", + "lineNumber": 200 + }, + { + "caller": "percent_rank", + "callee": "len", + "lineNumber": 200 + }, + { + "caller": "write_threshold_submissions", + "callee": "scores.copy", + "lineNumber": 211 + }, + { + "caller": "write_threshold_submissions", + "callee": "(forced >= threshold).astype", + "lineNumber": 214 + }, + { + "caller": "write_threshold_submissions", + "callee": "pd.DataFrame", + "lineNumber": 215 + }, + { + "caller": "write_threshold_submissions", + "callee": "str", + "lineNumber": 216 + }, + { + "caller": "write_threshold_submissions", + "callee": "int", + "lineNumber": 216 + }, + { + "caller": "write_threshold_submissions", + "callee": "enumerate", + "lineNumber": 216 + }, + { + "caller": "write_threshold_submissions", + "callee": "out.to_csv", + "lineNumber": 221 + }, + { + "caller": "write_threshold_submissions", + "callee": "print", + "lineNumber": 222 + }, + { + "caller": "write_threshold_submissions", + "callee": "int", + "lineNumber": 222 + }, + { + "caller": "write_threshold_submissions", + "callee": "preds.sum", + "lineNumber": 222 + }, + { + "caller": "write_threshold_submissions", + "callee": "preds.mean", + "lineNumber": 222 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "scores.copy", + "lineNumber": 232 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "np.argsort", + "lineNumber": 234 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "int", + "lineNumber": 236 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "round", + "lineNumber": 236 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "len", + "lineNumber": 236 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "np.zeros", + "lineNumber": 237 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "len", + "lineNumber": 237 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "pd.DataFrame", + "lineNumber": 239 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "str", + "lineNumber": 240 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "int", + "lineNumber": 240 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "enumerate", + "lineNumber": 240 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "out.to_csv", + "lineNumber": 245 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "print", + "lineNumber": 246 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "int", + "lineNumber": 246 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "preds.sum", + "lineNumber": 246 + }, + { + "caller": "write_top_ratio_submissions", + "callee": "preds.mean", + "lineNumber": 246 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 250 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 252 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 252 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 253 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 254 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 255 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 261 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 267 + }, + { + "caller": "main", + "callee": "score_dir.mkdir", + "lineNumber": 274 + }, + { + "caller": "main", + "callee": "output_dir.mkdir", + "lineNumber": 275 + }, + { + "caller": "main", + "callee": "torch.device", + "lineNumber": 277 + }, + { + "caller": "main", + "callee": "build_features", + "lineNumber": 281 + }, + { + "caller": "main", + "callee": "build_data", + "lineNumber": 282 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 283 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 284 + }, + { + "caller": "main", + "callee": "map", + "lineNumber": 284 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 285 + }, + { + "caller": "main", + "callee": "tuple", + "lineNumber": 285 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "known_mask.sum", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "sorted", + "lineNumber": 288 + }, + { + "caller": "main", + "callee": "checkpoint_dir.glob", + "lineNumber": 288 + }, + { + "caller": "main", + "callee": "cache_path.exists", + "lineNumber": 293 + }, + { + "caller": "main", + "callee": "np.load(cache_path).astype", + "lineNumber": 294 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 294 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 295 + }, + { + "caller": "main", + "callee": "torch.load", + "lineNumber": 297 + }, + { + "caller": "main", + "callee": "LightGCN(num_authors, parts[\"paper_feat_aug\"].shape[1], embed_dim).to", + "lineNumber": 299 + }, + { + "caller": "main", + "callee": "LightGCN", + "lineNumber": 299 + }, + { + "caller": "main", + "callee": "model.load_state_dict", + "lineNumber": 300 + }, + { + "caller": "main", + "callee": "predict", + "lineNumber": 301 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 302 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 303 + }, + { + "caller": "main", + "callee": "torch.cuda.empty_cache", + "lineNumber": 306 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 307 + }, + { + "caller": "main", + "callee": "scores.mean", + "lineNumber": 307 + }, + { + "caller": "main", + "callee": "scores.std", + "lineNumber": 307 + }, + { + "caller": "main", + "callee": "checkpoint_weight", + "lineNumber": 307 + }, + { + "caller": "main", + "callee": "model_scores.append", + "lineNumber": 308 + }, + { + "caller": "main", + "callee": "weights.append", + "lineNumber": 309 + }, + { + "caller": "main", + "callee": "checkpoint_weight", + "lineNumber": 309 + }, + { + "caller": "main", + "callee": "np.vstack(model_scores).astype", + "lineNumber": 311 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 311 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 312 + }, + { + "caller": "main", + "callee": "score_stack.mean", + "lineNumber": 313 + }, + { + "caller": "main", + "callee": "np.average(score_stack, axis=0, weights=weights_np).astype", + "lineNumber": 314 + }, + { + "caller": "main", + "callee": "np.average", + "lineNumber": 314 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 316 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 317 + }, + { + "caller": "main", + "callee": "write_threshold_submissions", + "lineNumber": 319 + }, + { + "caller": "main", + "callee": "write_threshold_submissions", + "lineNumber": 320 + }, + { + "caller": "main", + "callee": "np.load(cached_dir / \"test_bpr_cos.npy\").astype", + "lineNumber": 326 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 326 + }, + { + "caller": "main", + "callee": "np.load(cached_dir / \"test_bpr_dot.npy\").astype", + "lineNumber": 327 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 327 + }, + { + "caller": "main", + "callee": "np.load(cached_dir / \"test_lgb_scores.npy\").astype", + "lineNumber": 328 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 328 + }, + { + "caller": "main", + "callee": "np.load(cached_dir / \"test_lgb_v2_scores.npy\").astype", + "lineNumber": 329 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 329 + }, + { + "caller": "main", + "callee": "percent_rank", + "lineNumber": 331 + }, + { + "caller": "main", + "callee": "percent_rank", + "lineNumber": 332 + }, + { + "caller": "main", + "callee": "percent_rank", + "lineNumber": 333 + }, + { + "caller": "main", + "callee": "percent_rank", + "lineNumber": 334 + }, + { + "caller": "main", + "callee": "percent_rank", + "lineNumber": 335 + }, + { + "caller": "main", + "callee": "rank_blend.astype", + "lineNumber": 336 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 337 + }, + { + "caller": "main", + "callee": "write_top_ratio_submissions", + "lineNumber": 338 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 13, + "functionCount": 11, + "classCount": 2 + } + }, + { + "path": "code/generate_node2vec_deepwalk_submission.py", + "language": "python", + "fileCategory": "code", + "totalLines": 146, + "nonEmptyLines": 129, + "functions": [ + { + "name": "load_module", + "startLine": 15, + "endLine": 20, + "params": [ + "name", + "path" + ] + }, + { + "name": "make_subs", + "startLine": 23, + "endLine": 37, + "params": [ + "root", + "out_dir", + "score", + "ratios", + "thresholds" + ] + }, + { + "name": "main", + "startLine": 40, + "endLine": 142, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 15, + "isDefault": false + }, + { + "name": "make_subs", + "line": 23, + "isDefault": false + }, + { + "name": "main", + "line": 40, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 16 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 17 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 19 + }, + { + "caller": "make_subs", + "callee": "np.load(root / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 24 + }, + { + "caller": "make_subs", + "callee": "np.load", + "lineNumber": 24 + }, + { + "caller": "make_subs", + "callee": "np.zeros", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "np.argsort", + "lineNumber": 27 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 27 + }, + { + "caller": "make_subs", + "callee": "round", + "lineNumber": 27 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 27 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 30 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 30 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 30 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 30 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "(score >= th).astype", + "lineNumber": 33 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 36 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 36 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 36 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 36 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 37 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 41 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 45 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 47 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 48 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 51 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 52 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 53 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 54 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 62 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 63 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "np.load(args.main_val_score_file).astype", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "val_builder.transform", + "lineNumber": 67 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(val_pairs_arr, main_val),\n Xh,\n post.negative_evidence_features(Xh, main_val),\n gen.topk_content_similarity_fast(root, val_pairs_arr, val_builder),\n ]\n ).astype", + "lineNumber": 68 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 68 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 70 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 73 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, gen.variant_feature_matrix(post, [np.load(p).astype(np.float32) for p in selected])]).astype", + "lineNumber": 77 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 77 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 77 + }, + { + "caller": "main", + "callee": "np.load(p).astype", + "lineNumber": 77 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 77 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 78 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"extra_score_sources\" / f\"val_mf_bpr_s{args.seed}_d256.npy\").astype", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "n2vmod.score_to_features", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "n2vmod.score_to_features", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, Xc, Xm]).astype", + "lineNumber": 82 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 82 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "val_pairs_arr[:,0].sum", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "val_pairs_arr[:,1].sum", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "val_pairs_arr[:,0].sum", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "val_pairs_arr[:,1].sum", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "n2vmod.score_to_features", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "n2vmod.score_to_features", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, Xcos, Xdot]).astype", + "lineNumber": 88 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 88 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "lgb.LGBMClassifier", + "lineNumber": 91 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 103 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 105 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 105 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_test_scores\" / \"dyn202_l2d512_bpr_bigbatch_more\" / \"scores\" / \"test_vanilla_ensemble_mean.npy\").astype", + "lineNumber": 106 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 106 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 107 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 107 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 108 + }, + { + "caller": "main", + "callee": "test_builder.transform", + "lineNumber": 109 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(test_pairs, main_test),\n Xht,\n post.negative_evidence_features(Xht, main_test),\n gen.topk_content_similarity_fast(root, test_pairs, test_builder),\n ]\n ).astype", + "lineNumber": 110 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 110 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 112 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 115 + }, + { + "caller": "main", + "callee": "p.resolve().relative_to", + "lineNumber": 120 + }, + { + "caller": "main", + "callee": "p.resolve", + "lineNumber": 120 + }, + { + "caller": "main", + "callee": "rel.name.replace", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "test_scores.append", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "np.load(tp).astype", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, gen.variant_feature_matrix(post, test_scores)]).astype", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 124 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"extra_bprmf_submission\" / \"test_mf_bpr_dynamic_s202_d256_e220.npy\").astype", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "n2vmod.score_to_features", + "lineNumber": 126 + }, + { + "caller": "main", + "callee": "n2vmod.score_to_features", + "lineNumber": 127 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, Xct, Xmt]).astype", + "lineNumber": 128 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 128 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "n2vmod.pair_scores", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "n2vmod.score_to_features", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "n2vmod.score_to_features", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, Xcos, Xdot]).astype", + "lineNumber": 137 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 137 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "clf.predict_proba(X_test)[:, 1].astype", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "make_subs", + "lineNumber": 142 + } + ], + "metrics": { + "importCount": 6, + "exportCount": 3, + "functionCount": 3, + "classCount": 0 + } + }, + { + "path": "code/generate_post95_submission.py", + "language": "python", + "fileCategory": "code", + "totalLines": 331, + "nonEmptyLines": 286, + "functions": [ + { + "name": "load_module", + "startLine": 17, + "endLine": 22, + "params": [ + "name", + "path" + ] + }, + { + "name": "read_txt", + "startLine": 25, + "endLine": 26, + "params": [ + "path" + ] + }, + { + "name": "infer_layers", + "startLine": 29, + "endLine": 39, + "params": [ + "path", + "state" + ] + }, + { + "name": "infer_mode", + "startLine": 42, + "endLine": 48, + "params": [ + "score_path" + ] + }, + { + "name": "score_cache_path", + "startLine": 51, + "endLine": 55, + "params": [ + "root", + "split_seed", + "val_score_path" + ] + }, + { + "name": "checkpoint_for_score", + "startLine": 58, + "endLine": 67, + "params": [ + "score_path" + ] + }, + { + "name": "ensemble_member_scores", + "startLine": 70, + "endLine": 76, + "params": [ + "score_path" + ] + }, + { + "name": "score_checkpoint_on_test", + "startLine": 80, + "endLine": 130, + "params": [ + "root", + "split_seed", + "module", + "parts", + "data_cache", + "test_pairs", + "val_score_path", + "device", + "batch_size" + ] + }, + { + "name": "score_val_path_on_test", + "startLine": 133, + "endLine": 157, + "params": [ + "root", + "split_seed", + "module", + "parts", + "data_cache", + "test_pairs", + "val_score_path", + "device", + "batch_size" + ] + }, + { + "name": "select_variant_val_scores", + "startLine": 160, + "endLine": 172, + "params": [ + "post95", + "root", + "split_seed", + "y", + "max_cols" + ] + }, + { + "name": "variant_feature_matrix", + "startLine": 175, + "endLine": 183, + "params": [ + "post95", + "raw_scores" + ] + }, + { + "name": "topk_content_similarity_fast", + "startLine": 186, + "endLine": 216, + "params": [ + "root", + "pairs", + "builder" + ] + }, + { + "name": "make_submissions", + "startLine": 219, + "endLine": 229, + "params": [ + "root", + "out_dir", + "pred_score", + "ratios" + ] + }, + { + "name": "main", + "startLine": 232, + "endLine": 327, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 17, + "isDefault": false + }, + { + "name": "read_txt", + "line": 25, + "isDefault": false + }, + { + "name": "infer_layers", + "line": 29, + "isDefault": false + }, + { + "name": "infer_mode", + "line": 42, + "isDefault": false + }, + { + "name": "score_cache_path", + "line": 51, + "isDefault": false + }, + { + "name": "checkpoint_for_score", + "line": 58, + "isDefault": false + }, + { + "name": "ensemble_member_scores", + "line": 70, + "isDefault": false + }, + { + "name": "score_checkpoint_on_test", + "line": 79, + "isDefault": false + }, + { + "name": "score_val_path_on_test", + "line": 133, + "isDefault": false + }, + { + "name": "select_variant_val_scores", + "line": 160, + "isDefault": false + }, + { + "name": "variant_feature_matrix", + "line": 175, + "isDefault": false + }, + { + "name": "topk_content_similarity_fast", + "line": 186, + "isDefault": false + }, + { + "name": "make_submissions", + "line": 219, + "isDefault": false + }, + { + "name": "main", + "line": 232, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 18 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 19 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 21 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 26 + }, + { + "caller": "infer_layers", + "callee": "int", + "lineNumber": 31 + }, + { + "caller": "infer_layers", + "callee": "re.search", + "lineNumber": 33 + }, + { + "caller": "infer_layers", + "callee": "int", + "lineNumber": 35 + }, + { + "caller": "infer_layers", + "callee": "match.group", + "lineNumber": 35 + }, + { + "caller": "infer_layers", + "callee": "re.search", + "lineNumber": 36 + }, + { + "caller": "infer_layers", + "callee": "int", + "lineNumber": 38 + }, + { + "caller": "infer_layers", + "callee": "match.group", + "lineNumber": 38 + }, + { + "caller": "score_cache_path", + "callee": "val_score_path.resolve", + "lineNumber": 52 + }, + { + "caller": "score_cache_path", + "callee": "val_score_path.relative_to", + "lineNumber": 53 + }, + { + "caller": "score_cache_path", + "callee": "rel.name.replace", + "lineNumber": 54 + }, + { + "caller": "checkpoint_for_score", + "callee": "score_path.resolve", + "lineNumber": 59 + }, + { + "caller": "checkpoint_for_score", + "callee": "score_path.stem.replace", + "lineNumber": 60 + }, + { + "caller": "checkpoint_for_score", + "callee": "stem.endswith", + "lineNumber": 61 + }, + { + "caller": "checkpoint_for_score", + "callee": "ValueError", + "lineNumber": 62 + }, + { + "caller": "checkpoint_for_score", + "callee": "stem.split", + "lineNumber": 63 + }, + { + "caller": "checkpoint_for_score", + "callee": "next", + "lineNumber": 65 + }, + { + "caller": "checkpoint_for_score", + "callee": "p.startswith", + "lineNumber": 65 + }, + { + "caller": "checkpoint_for_score", + "callee": "p[1:].isdigit", + "lineNumber": 65 + }, + { + "caller": "checkpoint_for_score", + "callee": "next", + "lineNumber": 66 + }, + { + "caller": "checkpoint_for_score", + "callee": "p.startswith", + "lineNumber": 66 + }, + { + "caller": "checkpoint_for_score", + "callee": "p[1:].isdigit", + "lineNumber": 66 + }, + { + "caller": "ensemble_member_scores", + "callee": "score_path.resolve", + "lineNumber": 71 + }, + { + "caller": "ensemble_member_scores", + "callee": "result_path.read_text().splitlines", + "lineNumber": 73 + }, + { + "caller": "ensemble_member_scores", + "callee": "result_path.read_text", + "lineNumber": 73 + }, + { + "caller": "ensemble_member_scores", + "callee": "next", + "lineNumber": 74 + }, + { + "caller": "ensemble_member_scores", + "callee": "line.startswith", + "lineNumber": 74 + }, + { + "caller": "ensemble_member_scores", + "callee": "x.strip", + "lineNumber": 75 + }, + { + "caller": "ensemble_member_scores", + "callee": "models_line.split(\"=\", 1)[1].split", + "lineNumber": 75 + }, + { + "caller": "ensemble_member_scores", + "callee": "models_line.split", + "lineNumber": 75 + }, + { + "caller": "ensemble_member_scores", + "callee": "x.strip", + "lineNumber": 75 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "score_cache_path", + "lineNumber": 91 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "out_path.exists", + "lineNumber": 92 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "np.load", + "lineNumber": 93 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "out_path.parent.mkdir", + "lineNumber": 94 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "checkpoint_for_score", + "lineNumber": 96 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "torch.load", + "lineNumber": 97 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "infer_layers", + "lineNumber": 99 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "module.build_data", + "lineNumber": 106 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "torch.device", + "lineNumber": 110 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "model_cls(6611, parts[\"paper_feat_aug\"].shape[1], embed_dim, layers).to", + "lineNumber": 115 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "model_cls", + "lineNumber": 115 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "torch.device", + "lineNumber": 115 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "model.load_state_dict", + "lineNumber": 116 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "module.predict_scores(\n model,\n data_cache[data_key],\n test_pairs,\n batch_size,\n mode=infer_mode(val_score_path),\n normalize_embeddings=False,\n ).astype", + "lineNumber": 117 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "module.predict_scores", + "lineNumber": 117 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "infer_mode", + "lineNumber": 122 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "np.save", + "lineNumber": 125 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "torch.cuda.is_available", + "lineNumber": 127 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "torch.cuda.empty_cache", + "lineNumber": 128 + }, + { + "caller": "score_checkpoint_on_test", + "callee": "print", + "lineNumber": 129 + }, + { + "caller": "score_val_path_on_test", + "callee": "score_cache_path", + "lineNumber": 144 + }, + { + "caller": "score_val_path_on_test", + "callee": "out_path.exists", + "lineNumber": 145 + }, + { + "caller": "score_val_path_on_test", + "callee": "np.load", + "lineNumber": 146 + }, + { + "caller": "score_val_path_on_test", + "callee": "val_score_path.name.endswith", + "lineNumber": 147 + }, + { + "caller": "score_val_path_on_test", + "callee": "score_val_path_on_test", + "lineNumber": 149 + }, + { + "caller": "score_val_path_on_test", + "callee": "ensemble_member_scores", + "lineNumber": 150 + }, + { + "caller": "score_val_path_on_test", + "callee": "out_path.parent.mkdir", + "lineNumber": 152 + }, + { + "caller": "score_val_path_on_test", + "callee": "np.mean(members, axis=0).astype", + "lineNumber": 153 + }, + { + "caller": "score_val_path_on_test", + "callee": "np.mean", + "lineNumber": 153 + }, + { + "caller": "score_val_path_on_test", + "callee": "np.save", + "lineNumber": 154 + }, + { + "caller": "score_val_path_on_test", + "callee": "print", + "lineNumber": 155 + }, + { + "caller": "score_val_path_on_test", + "callee": "score_checkpoint_on_test", + "lineNumber": 157 + }, + { + "caller": "select_variant_val_scores", + "callee": "sorted", + "lineNumber": 161 + }, + { + "caller": "select_variant_val_scores", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\").glob", + "lineNumber": 161 + }, + { + "caller": "select_variant_val_scores", + "callee": "str", + "lineNumber": 164 + }, + { + "caller": "select_variant_val_scores", + "callee": "str", + "lineNumber": 164 + }, + { + "caller": "select_variant_val_scores", + "callee": "str", + "lineNumber": 164 + }, + { + "caller": "select_variant_val_scores", + "callee": "str", + "lineNumber": 164 + }, + { + "caller": "select_variant_val_scores", + "callee": "str", + "lineNumber": 164 + }, + { + "caller": "select_variant_val_scores", + "callee": "np.load(path).astype", + "lineNumber": 166 + }, + { + "caller": "select_variant_val_scores", + "callee": "np.load", + "lineNumber": 166 + }, + { + "caller": "select_variant_val_scores", + "callee": "len", + "lineNumber": 167 + }, + { + "caller": "select_variant_val_scores", + "callee": "len", + "lineNumber": 167 + }, + { + "caller": "select_variant_val_scores", + "callee": "np.std", + "lineNumber": 167 + }, + { + "caller": "select_variant_val_scores", + "callee": "post95.best_f1", + "lineNumber": 169 + }, + { + "caller": "select_variant_val_scores", + "callee": "rows.append", + "lineNumber": 170 + }, + { + "caller": "select_variant_val_scores", + "callee": "rows.sort", + "lineNumber": 171 + }, + { + "caller": "variant_feature_matrix", + "callee": "np.zeros", + "lineNumber": 177 + }, + { + "caller": "variant_feature_matrix", + "callee": "cols.extend", + "lineNumber": 180 + }, + { + "caller": "variant_feature_matrix", + "callee": "post95.zscore", + "lineNumber": 180 + }, + { + "caller": "variant_feature_matrix", + "callee": "post95.rank01", + "lineNumber": 180 + }, + { + "caller": "variant_feature_matrix", + "callee": "np.vstack", + "lineNumber": 181 + }, + { + "caller": "variant_feature_matrix", + "callee": "cols.extend", + "lineNumber": 182 + }, + { + "caller": "variant_feature_matrix", + "callee": "post95.zscore", + "lineNumber": 182 + }, + { + "caller": "variant_feature_matrix", + "callee": "raw.mean", + "lineNumber": 182 + }, + { + "caller": "variant_feature_matrix", + "callee": "post95.zscore", + "lineNumber": 182 + }, + { + "caller": "variant_feature_matrix", + "callee": "raw.std", + "lineNumber": 182 + }, + { + "caller": "variant_feature_matrix", + "callee": "post95.rank01", + "lineNumber": 182 + }, + { + "caller": "variant_feature_matrix", + "callee": "raw.mean", + "lineNumber": 182 + }, + { + "caller": "variant_feature_matrix", + "callee": "np.column_stack(cols).astype", + "lineNumber": 183 + }, + { + "caller": "variant_feature_matrix", + "callee": "np.column_stack", + "lineNumber": 183 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "cache.mkdir", + "lineNumber": 188 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "len", + "lineNumber": 189 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "int", + "lineNumber": 189 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "pairs[:,0].sum", + "lineNumber": 189 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "int", + "lineNumber": 189 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "pairs[:,1].sum", + "lineNumber": 189 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "path.exists", + "lineNumber": 191 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "np.load", + "lineNumber": 192 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "(root / \"data_and_docs\" / \"feature.pkl\").open", + "lineNumber": 194 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "pkl.load(f).numpy().astype", + "lineNumber": 195 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "pkl.load(f).numpy", + "lineNumber": 195 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "pkl.load", + "lineNumber": 195 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "np.linalg.norm", + "lineNumber": 196 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "np.zeros", + "lineNumber": 198 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "len", + "lineNumber": 198 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "np.argsort", + "lineNumber": 199 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "np.flatnonzero", + "lineNumber": 201 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "len", + "lineNumber": 201 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "zip", + "lineNumber": 202 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "int", + "lineNumber": 204 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "np.asarray", + "lineNumber": 205 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "list", + "lineNumber": 205 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "len", + "lineNumber": 206 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "pairs[idx, 1].astype", + "lineNumber": 208 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "sims.max", + "lineNumber": 210 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "min", + "lineNumber": 212 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "np.partition", + "lineNumber": 213 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "top.mean", + "lineNumber": 214 + }, + { + "caller": "topk_content_similarity_fast", + "callee": "np.save", + "lineNumber": 215 + }, + { + "caller": "make_submissions", + "callee": "np.load(root / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 220 + }, + { + "caller": "make_submissions", + "callee": "np.load", + "lineNumber": 220 + }, + { + "caller": "make_submissions", + "callee": "int", + "lineNumber": 222 + }, + { + "caller": "make_submissions", + "callee": "round", + "lineNumber": 222 + }, + { + "caller": "make_submissions", + "callee": "len", + "lineNumber": 222 + }, + { + "caller": "make_submissions", + "callee": "np.zeros", + "lineNumber": 223 + }, + { + "caller": "make_submissions", + "callee": "len", + "lineNumber": 223 + }, + { + "caller": "make_submissions", + "callee": "np.argsort", + "lineNumber": 224 + }, + { + "caller": "make_submissions", + "callee": "pd.DataFrame", + "lineNumber": 226 + }, + { + "caller": "make_submissions", + "callee": "np.arange", + "lineNumber": 226 + }, + { + "caller": "make_submissions", + "callee": "len", + "lineNumber": 226 + }, + { + "caller": "make_submissions", + "callee": "sub.to_csv", + "lineNumber": 228 + }, + { + "caller": "make_submissions", + "callee": "print", + "lineNumber": 229 + }, + { + "caller": "make_submissions", + "callee": "int", + "lineNumber": 229 + }, + { + "caller": "make_submissions", + "callee": "pred.sum", + "lineNumber": 229 + }, + { + "caller": "make_submissions", + "callee": "pred.mean", + "lineNumber": 229 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 235 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 236 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 237 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 237 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 238 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 239 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 240 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 241 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 242 + }, + { + "caller": "main", + "callee": "args.main_val_score_file.resolve", + "lineNumber": 245 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 246 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 247 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 248 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "lgcn_mod.make_notebook_style_split", + "lineNumber": 253 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 254 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 255 + }, + { + "caller": "main", + "callee": "np.load(args.main_val_score_file).astype", + "lineNumber": 256 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 256 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 258 + }, + { + "caller": "main", + "callee": "stack_mod.ExplicitGraphFeatures", + "lineNumber": 259 + }, + { + "caller": "main", + "callee": "val_builder.transform", + "lineNumber": 260 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack_mod.add_rank_features(val_pairs_arr, main_val_score),\n X_val_hand,\n post95.negative_evidence_features(X_val_hand, main_val_score),\n topk_content_similarity_fast(root, val_pairs_arr, val_builder),\n ]\n ).astype", + "lineNumber": 261 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 261 + }, + { + "caller": "main", + "callee": "stack_mod.add_rank_features", + "lineNumber": 263 + }, + { + "caller": "main", + "callee": "post95.negative_evidence_features", + "lineNumber": 265 + }, + { + "caller": "main", + "callee": "topk_content_similarity_fast", + "lineNumber": 266 + }, + { + "caller": "main", + "callee": "select_variant_val_scores", + "lineNumber": 270 + }, + { + "caller": "main", + "callee": "(out_dir / \"selected_variant_val_scores.txt\").write_text", + "lineNumber": 271 + }, + { + "caller": "main", + "callee": "\"\\n\".join", + "lineNumber": 271 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 271 + }, + { + "caller": "main", + "callee": "variant_feature_matrix", + "lineNumber": 272 + }, + { + "caller": "main", + "callee": "np.load(p).astype", + "lineNumber": 272 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 272 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, X_val_var]).astype", + "lineNumber": 273 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 273 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 274 + }, + { + "caller": "main", + "callee": "lgb.LGBMClassifier", + "lineNumber": 276 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 288 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 290 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 291 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 291 + }, + { + "caller": "main", + "callee": "lgcn_mod.build_parts", + "lineNumber": 292 + }, + { + "caller": "main", + "callee": "score_val_path_on_test", + "lineNumber": 294 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 305 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 305 + }, + { + "caller": "main", + "callee": "stack_mod.ExplicitGraphFeatures", + "lineNumber": 306 + }, + { + "caller": "main", + "callee": "test_builder.transform", + "lineNumber": 307 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack_mod.add_rank_features(test_pairs, main_test_score),\n X_test_hand,\n post95.negative_evidence_features(X_test_hand, main_test_score),\n topk_content_similarity_fast(root, test_pairs, test_builder),\n ]\n ).astype", + "lineNumber": 308 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 308 + }, + { + "caller": "main", + "callee": "stack_mod.add_rank_features", + "lineNumber": 310 + }, + { + "caller": "main", + "callee": "post95.negative_evidence_features", + "lineNumber": 312 + }, + { + "caller": "main", + "callee": "topk_content_similarity_fast", + "lineNumber": 313 + }, + { + "caller": "main", + "callee": "score_val_path_on_test", + "lineNumber": 318 + }, + { + "caller": "main", + "callee": "variant_feature_matrix", + "lineNumber": 321 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, X_test_var]).astype", + "lineNumber": 322 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 322 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 323 + }, + { + "caller": "main", + "callee": "clf.predict_proba(X_test)[:, 1].astype", + "lineNumber": 325 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 325 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 326 + }, + { + "caller": "main", + "callee": "make_submissions", + "lineNumber": 327 + } + ], + "metrics": { + "importCount": 3, + "exportCount": 14, + "functionCount": 14, + "classCount": 0 + } + }, + { + "path": "code/generate_randomwalk_ensemble_submission.py", + "language": "python", + "fileCategory": "code", + "totalLines": 159, + "nonEmptyLines": 142, + "functions": [ + { + "name": "load_module", + "startLine": 16, + "endLine": 22, + "params": [ + "name", + "path" + ] + }, + { + "name": "make_subs", + "startLine": 25, + "endLine": 47, + "params": [ + "root", + "out_dir", + "version", + "score", + "ratios", + "thresholds" + ] + }, + { + "name": "aggregate", + "startLine": 50, + "endLine": 69, + "params": [ + "blocks" + ] + }, + { + "name": "main", + "startLine": 72, + "endLine": 155, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 16, + "isDefault": false + }, + { + "name": "make_subs", + "line": 25, + "isDefault": false + }, + { + "name": "aggregate", + "line": 50, + "isDefault": false + }, + { + "name": "main", + "line": 72, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 17 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 18 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 21 + }, + { + "caller": "make_subs", + "callee": "np.load(root / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "np.load", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "pd.read_csv(current_path)[\"Predicted\"].to_numpy", + "lineNumber": 28 + }, + { + "caller": "make_subs", + "callee": "pd.read_csv", + "lineNumber": 28 + }, + { + "caller": "make_subs", + "callee": "current_path.exists", + "lineNumber": 28 + }, + { + "caller": "make_subs", + "callee": "np.zeros", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "np.argsort", + "lineNumber": 32 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 32 + }, + { + "caller": "make_subs", + "callee": "round", + "lineNumber": 32 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 32 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 36 + }, + { + "caller": "make_subs", + "callee": "(pred != current).sum", + "lineNumber": 36 + }, + { + "caller": "make_subs", + "callee": "rows.append", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "str", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "(score >= th).astype", + "lineNumber": 40 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 43 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 43 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 43 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 43 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 44 + }, + { + "caller": "make_subs", + "callee": "(pred != current).sum", + "lineNumber": 44 + }, + { + "caller": "make_subs", + "callee": "rows.append", + "lineNumber": 45 + }, + { + "caller": "make_subs", + "callee": "str", + "lineNumber": 45 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 45 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 45 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame(rows).to_csv", + "lineNumber": 47 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 47 + }, + { + "caller": "aggregate", + "callee": "np.vstack", + "lineNumber": 51 + }, + { + "caller": "aggregate", + "callee": "np.vstack", + "lineNumber": 52 + }, + { + "caller": "aggregate", + "callee": "np.vstack", + "lineNumber": 53 + }, + { + "caller": "aggregate", + "callee": "(rank_stack >= 0.5).sum(axis=0).astype", + "lineNumber": 54 + }, + { + "caller": "aggregate", + "callee": "(rank_stack >= 0.5).sum", + "lineNumber": 54 + }, + { + "caller": "aggregate", + "callee": "np.column_stack(\n [\n cos_stack.mean(axis=0),\n cos_stack.std(axis=0),\n cos_stack.max(axis=0),\n cos_stack.min(axis=0),\n dot_stack.mean(axis=0),\n dot_stack.std(axis=0),\n rank_stack.mean(axis=0),\n rank_stack.std(axis=0),\n rank_stack.max(axis=0),\n rank_stack.min(axis=0),\n agree,\n ]\n ).astype", + "lineNumber": 55 + }, + { + "caller": "aggregate", + "callee": "np.column_stack", + "lineNumber": 55 + }, + { + "caller": "aggregate", + "callee": "cos_stack.mean", + "lineNumber": 57 + }, + { + "caller": "aggregate", + "callee": "cos_stack.std", + "lineNumber": 58 + }, + { + "caller": "aggregate", + "callee": "cos_stack.max", + "lineNumber": 59 + }, + { + "caller": "aggregate", + "callee": "cos_stack.min", + "lineNumber": 60 + }, + { + "caller": "aggregate", + "callee": "dot_stack.mean", + "lineNumber": 61 + }, + { + "caller": "aggregate", + "callee": "dot_stack.std", + "lineNumber": 62 + }, + { + "caller": "aggregate", + "callee": "rank_stack.mean", + "lineNumber": 63 + }, + { + "caller": "aggregate", + "callee": "rank_stack.std", + "lineNumber": 64 + }, + { + "caller": "aggregate", + "callee": "rank_stack.max", + "lineNumber": 65 + }, + { + "caller": "aggregate", + "callee": "rank_stack.min", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 73 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 77 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 78 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 83 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 88 + }, + { + "caller": "main", + "callee": "rw.small_configs", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "rw.graph_configs", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "rw.extra_configs", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "\"_\".join", + "lineNumber": 91 + }, + { + "caller": "main", + "callee": "v.replace(\"_d128_l\", \"l\").replace", + "lineNumber": 91 + }, + { + "caller": "main", + "callee": "v.replace", + "lineNumber": 91 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "rw.build_base_features", + "lineNumber": 96 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 100 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 100 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 101 + }, + { + "caller": "main", + "callee": "val_blocks.append", + "lineNumber": 102 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, *val_blocks, aggregate(val_blocks)]).astype", + "lineNumber": 103 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 103 + }, + { + "caller": "main", + "callee": "aggregate", + "lineNumber": 103 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 104 + }, + { + "caller": "main", + "callee": "lgb.LGBMClassifier", + "lineNumber": 105 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 118 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 120 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 120 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_test_scores\" / \"dyn202_l2d512_bpr_bigbatch_more\" / \"scores\" / \"test_vanilla_ensemble_mean.npy\").astype", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "test_builder.transform", + "lineNumber": 124 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(test_pairs, main_test),\n Xht,\n post.negative_evidence_features(Xht, main_test),\n gen.topk_content_similarity_fast(root, test_pairs, test_builder),\n ]\n ).astype", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 127 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 129 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 130 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "p.resolve().relative_to", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "p.resolve", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "rel.name.replace", + "lineNumber": 137 + }, + { + "caller": "main", + "callee": "test_scores.append", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "np.load(tp).astype", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, gen.variant_feature_matrix(post, test_scores)]).astype", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"extra_bprmf_submission\" / \"test_mf_bpr_dynamic_s202_d256_e220.npy\").astype", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 142 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, Xct, Xmt]).astype", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 149 + }, + { + "caller": "main", + "callee": "test_blocks.append", + "lineNumber": 150 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, *test_blocks, aggregate(test_blocks)]).astype", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "aggregate", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 152 + }, + { + "caller": "main", + "callee": "clf.predict_proba(X_test)[:, 1].astype", + "lineNumber": 153 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 153 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 154 + }, + { + "caller": "main", + "callee": "make_subs", + "lineNumber": 155 + } + ], + "metrics": { + "importCount": 6, + "exportCount": 4, + "functionCount": 4, + "classCount": 0 + } + }, + { + "path": "code/generate_randomwalk_single_submission.py", + "language": "python", + "fileCategory": "code", + "totalLines": 147, + "nonEmptyLines": 131, + "functions": [ + { + "name": "load_module", + "startLine": 16, + "endLine": 22, + "params": [ + "name", + "path" + ] + }, + { + "name": "make_subs", + "startLine": 25, + "endLine": 47, + "params": [ + "root", + "out_dir", + "version", + "score", + "ratios", + "thresholds" + ] + }, + { + "name": "main", + "startLine": 50, + "endLine": 143, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 16, + "isDefault": false + }, + { + "name": "make_subs", + "line": 25, + "isDefault": false + }, + { + "name": "main", + "line": 50, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 17 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 18 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 21 + }, + { + "caller": "make_subs", + "callee": "np.load(root / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "np.load", + "lineNumber": 26 + }, + { + "caller": "make_subs", + "callee": "pd.read_csv(current_path)[\"Predicted\"].to_numpy", + "lineNumber": 28 + }, + { + "caller": "make_subs", + "callee": "pd.read_csv", + "lineNumber": 28 + }, + { + "caller": "make_subs", + "callee": "current_path.exists", + "lineNumber": 28 + }, + { + "caller": "make_subs", + "callee": "np.zeros", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 31 + }, + { + "caller": "make_subs", + "callee": "np.argsort", + "lineNumber": 32 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 32 + }, + { + "caller": "make_subs", + "callee": "round", + "lineNumber": 32 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 32 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 35 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 36 + }, + { + "caller": "make_subs", + "callee": "(pred != current).sum", + "lineNumber": 36 + }, + { + "caller": "make_subs", + "callee": "rows.append", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "str", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 37 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 38 + }, + { + "caller": "make_subs", + "callee": "(score >= th).astype", + "lineNumber": 40 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 43 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 43 + }, + { + "caller": "make_subs", + "callee": "np.arange", + "lineNumber": 43 + }, + { + "caller": "make_subs", + "callee": "len", + "lineNumber": 43 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 44 + }, + { + "caller": "make_subs", + "callee": "(pred != current).sum", + "lineNumber": 44 + }, + { + "caller": "make_subs", + "callee": "rows.append", + "lineNumber": 45 + }, + { + "caller": "make_subs", + "callee": "str", + "lineNumber": 45 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 45 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 45 + }, + { + "caller": "make_subs", + "callee": "print", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "int", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "pred.sum", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "float", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "pred.mean", + "lineNumber": 46 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame(rows).to_csv", + "lineNumber": 47 + }, + { + "caller": "make_subs", + "callee": "pd.DataFrame", + "lineNumber": 47 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 51 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 52 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 52 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 52 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 53 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 54 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 57 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 58 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 61 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 62 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 63 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 70 + }, + { + "caller": "main", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 73 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "np.load(args.main_val_score_file).astype", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "builder.transform", + "lineNumber": 77 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(pairs, main),\n Xh,\n post.negative_evidence_features(Xh, main),\n gen.topk_content_similarity_fast(root, pairs, builder),\n ]\n ).astype", + "lineNumber": 78 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 78 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 82 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 83 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, gen.variant_feature_matrix(post, [np.load(p).astype(np.float32) for p in selected])]).astype", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "np.load(p).astype", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 88 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"extra_score_sources\" / \"val_mf_bpr_s202_d256.npy\").astype", + "lineNumber": 89 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 89 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 91 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, Xc, Xm]).astype", + "lineNumber": 92 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 92 + }, + { + "caller": "main", + "callee": "next", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "rw.small_configs", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "rw.graph_configs", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "rw.extra_configs", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 96 + }, + { + "caller": "main", + "callee": "np.column_stack([X_val, block]).astype", + "lineNumber": 97 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 97 + }, + { + "caller": "main", + "callee": "lgb.LGBMClassifier", + "lineNumber": 98 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 111 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 112 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"post95_test_scores\" / \"dyn202_l2d512_bpr_bigbatch_more\" / \"scores\" / \"test_vanilla_ensemble_mean.npy\").astype", + "lineNumber": 115 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 115 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 116 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 116 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 117 + }, + { + "caller": "main", + "callee": "test_builder.transform", + "lineNumber": 118 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(test_pairs, main_test),\n Xht,\n post.negative_evidence_features(Xht, main_test),\n gen.topk_content_similarity_fast(root, test_pairs, test_builder),\n ]\n ).astype", + "lineNumber": 119 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 119 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 124 + }, + { + "caller": "main", + "callee": "p.resolve().relative_to", + "lineNumber": 129 + }, + { + "caller": "main", + "callee": "p.resolve", + "lineNumber": 129 + }, + { + "caller": "main", + "callee": "rel.name.replace", + "lineNumber": 130 + }, + { + "caller": "main", + "callee": "test_scores.append", + "lineNumber": 131 + }, + { + "caller": "main", + "callee": "np.load(tp).astype", + "lineNumber": 131 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 131 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, gen.variant_feature_matrix(post, test_scores)]).astype", + "lineNumber": 132 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 132 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 132 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{args.split_seed}\" / \"extra_bprmf_submission\" / \"test_mf_bpr_dynamic_s202_d256_e220.npy\").astype", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, Xct, Xmt]).astype", + "lineNumber": 137 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 137 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "np.column_stack([X_test, test_block]).astype", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "clf.predict_proba(X_test)[:, 1].astype", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 142 + }, + { + "caller": "main", + "callee": "make_subs", + "lineNumber": 143 + } + ], + "metrics": { + "importCount": 6, + "exportCount": 3, + "functionCount": 3, + "classCount": 0 + } + }, + { + "path": "code/high_order_graph_stack.py", + "language": "python", + "fileCategory": "code", + "totalLines": 351, + "nonEmptyLines": 307, + "functions": [ + { + "name": "load_module", + "startLine": 19, + "endLine": 25, + "params": [ + "name", + "path" + ] + }, + { + "name": "read_txt", + "startLine": 28, + "endLine": 29, + "params": [ + "path" + ] + }, + { + "name": "best_f1", + "startLine": 32, + "endLine": 36, + "params": [ + "y", + "s" + ] + }, + { + "name": "row_norm", + "startLine": 39, + "endLine": 44, + "params": [ + "mat" + ] + }, + { + "name": "topk_prune_rows", + "startLine": 47, + "endLine": 67, + "params": [ + "mat", + "k" + ] + }, + { + "name": "extract_scores", + "startLine": 70, + "endLine": 71, + "params": [ + "mat", + "pairs" + ] + }, + { + "name": "build_high_order", + "startLine": 74, + "endLine": 122, + "params": [ + "root", + "train_refs", + "pairs", + "tag", + "topk" + ] + }, + { + "name": "build_high_order_directed", + "startLine": 125, + "endLine": 176, + "params": [ + "root", + "train_refs", + "pairs", + "tag", + "topk" + ] + }, + { + "name": "fit_lgb_oof", + "startLine": 179, + "endLine": 198, + "params": [ + "X", + "y", + "seed", + "n_splits" + ] + }, + { + "name": "fit_full_predict", + "startLine": 201, + "endLine": 216, + "params": [ + "X", + "y", + "Xt", + "seed" + ] + }, + { + "name": "write_ratio_submission", + "startLine": 219, + "endLine": 229, + "params": [ + "path", + "score", + "ratio", + "known", + "anchor" + ] + }, + { + "name": "main", + "startLine": 232, + "endLine": 347, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 19, + "isDefault": false + }, + { + "name": "read_txt", + "line": 28, + "isDefault": false + }, + { + "name": "best_f1", + "line": 32, + "isDefault": false + }, + { + "name": "row_norm", + "line": 39, + "isDefault": false + }, + { + "name": "topk_prune_rows", + "line": 47, + "isDefault": false + }, + { + "name": "extract_scores", + "line": 70, + "isDefault": false + }, + { + "name": "build_high_order", + "line": 74, + "isDefault": false + }, + { + "name": "build_high_order_directed", + "line": 125, + "isDefault": false + }, + { + "name": "fit_lgb_oof", + "line": 179, + "isDefault": false + }, + { + "name": "fit_full_predict", + "line": 201, + "isDefault": false + }, + { + "name": "write_ratio_submission", + "line": 219, + "isDefault": false + }, + { + "name": "main", + "line": 232, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 20 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 21 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 24 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 29 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 29 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 29 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 29 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 29 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 35 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 35 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "row_norm", + "callee": "mat.tocsr().astype", + "lineNumber": 40 + }, + { + "caller": "row_norm", + "callee": "mat.tocsr", + "lineNumber": 40 + }, + { + "caller": "row_norm", + "callee": "np.asarray(mat.sum(axis=1)).ravel", + "lineNumber": 41 + }, + { + "caller": "row_norm", + "callee": "np.asarray", + "lineNumber": 41 + }, + { + "caller": "row_norm", + "callee": "mat.sum", + "lineNumber": 41 + }, + { + "caller": "row_norm", + "callee": "np.zeros_like", + "lineNumber": 42 + }, + { + "caller": "row_norm", + "callee": "sparse.diags(inv).dot(mat).tocsr", + "lineNumber": 44 + }, + { + "caller": "row_norm", + "callee": "sparse.diags(inv).dot", + "lineNumber": 44 + }, + { + "caller": "row_norm", + "callee": "sparse.diags", + "lineNumber": 44 + }, + { + "caller": "topk_prune_rows", + "callee": "mat.tocsr", + "lineNumber": 48 + }, + { + "caller": "topk_prune_rows", + "callee": "range", + "lineNumber": 54 + }, + { + "caller": "topk_prune_rows", + "callee": "len", + "lineNumber": 58 + }, + { + "caller": "topk_prune_rows", + "callee": "np.argpartition", + "lineNumber": 59 + }, + { + "caller": "topk_prune_rows", + "callee": "np.argsort", + "lineNumber": 60 + }, + { + "caller": "topk_prune_rows", + "callee": "data.append", + "lineNumber": 64 + }, + { + "caller": "topk_prune_rows", + "callee": "indices.append", + "lineNumber": 65 + }, + { + "caller": "topk_prune_rows", + "callee": "indptr.append", + "lineNumber": 66 + }, + { + "caller": "topk_prune_rows", + "callee": "len", + "lineNumber": 66 + }, + { + "caller": "topk_prune_rows", + "callee": "sparse.csr_matrix", + "lineNumber": 67 + }, + { + "caller": "topk_prune_rows", + "callee": "np.concatenate(data).astype", + "lineNumber": 67 + }, + { + "caller": "topk_prune_rows", + "callee": "np.concatenate", + "lineNumber": 67 + }, + { + "caller": "topk_prune_rows", + "callee": "np.concatenate(indices).astype", + "lineNumber": 67 + }, + { + "caller": "topk_prune_rows", + "callee": "np.concatenate", + "lineNumber": 67 + }, + { + "caller": "topk_prune_rows", + "callee": "np.asarray", + "lineNumber": 67 + }, + { + "caller": "extract_scores", + "callee": "np.asarray(mat[pairs[:, 0], pairs[:, 1]]).ravel().astype", + "lineNumber": 71 + }, + { + "caller": "extract_scores", + "callee": "np.asarray(mat[pairs[:, 0], pairs[:, 1]]).ravel", + "lineNumber": 71 + }, + { + "caller": "extract_scores", + "callee": "np.asarray", + "lineNumber": 71 + }, + { + "caller": "build_high_order", + "callee": "cache.mkdir", + "lineNumber": 76 + }, + { + "caller": "build_high_order", + "callee": "len", + "lineNumber": 77 + }, + { + "caller": "build_high_order", + "callee": "int", + "lineNumber": 77 + }, + { + "caller": "build_high_order", + "callee": "pairs[:,0].sum", + "lineNumber": 77 + }, + { + "caller": "build_high_order", + "callee": "int", + "lineNumber": 77 + }, + { + "caller": "build_high_order", + "callee": "pairs[:,1].sum", + "lineNumber": 77 + }, + { + "caller": "build_high_order", + "callee": "path.exists", + "lineNumber": 78 + }, + { + "caller": "build_high_order", + "callee": "np.load", + "lineNumber": 79 + }, + { + "caller": "build_high_order", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 81 + }, + { + "caller": "build_high_order", + "callee": "sparse.csr_matrix", + "lineNumber": 82 + }, + { + "caller": "build_high_order", + "callee": "np.ones", + "lineNumber": 82 + }, + { + "caller": "build_high_order", + "callee": "len", + "lineNumber": 82 + }, + { + "caller": "build_high_order", + "callee": "row_norm", + "lineNumber": 83 + }, + { + "caller": "build_high_order", + "callee": "np.array", + "lineNumber": 85 + }, + { + "caller": "build_high_order", + "callee": "read_txt", + "lineNumber": 85 + }, + { + "caller": "build_high_order", + "callee": "sparse.csr_matrix", + "lineNumber": 86 + }, + { + "caller": "build_high_order", + "callee": "np.ones", + "lineNumber": 86 + }, + { + "caller": "build_high_order", + "callee": "len", + "lineNumber": 86 + }, + { + "caller": "build_high_order", + "callee": "(pp + pp.T).astype", + "lineNumber": 87 + }, + { + "caller": "build_high_order", + "callee": "row_norm", + "lineNumber": 89 + }, + { + "caller": "build_high_order", + "callee": "np.array", + "lineNumber": 91 + }, + { + "caller": "build_high_order", + "callee": "read_txt", + "lineNumber": 91 + }, + { + "caller": "build_high_order", + "callee": "sparse.csr_matrix", + "lineNumber": 92 + }, + { + "caller": "build_high_order", + "callee": "np.ones", + "lineNumber": 92 + }, + { + "caller": "build_high_order", + "callee": "len", + "lineNumber": 92 + }, + { + "caller": "build_high_order", + "callee": "(aa + aa.T).astype", + "lineNumber": 93 + }, + { + "caller": "build_high_order", + "callee": "row_norm", + "lineNumber": 95 + }, + { + "caller": "build_high_order", + "callee": "np.asarray(ap.sum(axis=0)).ravel().astype", + "lineNumber": 97 + }, + { + "caller": "build_high_order", + "callee": "np.asarray(ap.sum(axis=0)).ravel", + "lineNumber": 97 + }, + { + "caller": "build_high_order", + "callee": "np.asarray", + "lineNumber": 97 + }, + { + "caller": "build_high_order", + "callee": "ap.sum", + "lineNumber": 97 + }, + { + "caller": "build_high_order", + "callee": "np.asarray(pp.sum(axis=0)).ravel().astype", + "lineNumber": 98 + }, + { + "caller": "build_high_order", + "callee": "np.asarray(pp.sum(axis=0)).ravel", + "lineNumber": 98 + }, + { + "caller": "build_high_order", + "callee": "np.asarray", + "lineNumber": 98 + }, + { + "caller": "build_high_order", + "callee": "pp.sum", + "lineNumber": 98 + }, + { + "caller": "build_high_order", + "callee": "np.log1p(paper_deg[pairs[:, 1]] + cite_deg[pairs[:, 1]] + 1.0).astype", + "lineNumber": 99 + }, + { + "caller": "build_high_order", + "callee": "np.log1p", + "lineNumber": 99 + }, + { + "caller": "build_high_order", + "callee": "apn.copy", + "lineNumber": 103 + }, + { + "caller": "build_high_order", + "callee": "range", + "lineNumber": 104 + }, + { + "caller": "build_high_order", + "callee": "topk_prune_rows", + "lineNumber": 105 + }, + { + "caller": "build_high_order", + "callee": "S.dot(ppn).tocsr", + "lineNumber": 105 + }, + { + "caller": "build_high_order", + "callee": "S.dot", + "lineNumber": 105 + }, + { + "caller": "build_high_order", + "callee": "extract_scores", + "lineNumber": 106 + }, + { + "caller": "build_high_order", + "callee": "cols.extend", + "lineNumber": 107 + }, + { + "caller": "build_high_order", + "callee": "np.log1p", + "lineNumber": 107 + }, + { + "caller": "build_high_order", + "callee": "names.extend", + "lineNumber": 108 + }, + { + "caller": "build_high_order", + "callee": "topk_prune_rows", + "lineNumber": 110 + }, + { + "caller": "build_high_order", + "callee": "aan.dot(apn).tocsr", + "lineNumber": 110 + }, + { + "caller": "build_high_order", + "callee": "aan.dot", + "lineNumber": 110 + }, + { + "caller": "build_high_order", + "callee": "range", + "lineNumber": 111 + }, + { + "caller": "build_high_order", + "callee": "topk_prune_rows", + "lineNumber": 113 + }, + { + "caller": "build_high_order", + "callee": "C.dot(ppn).tocsr", + "lineNumber": 113 + }, + { + "caller": "build_high_order", + "callee": "C.dot", + "lineNumber": 113 + }, + { + "caller": "build_high_order", + "callee": "extract_scores", + "lineNumber": 114 + }, + { + "caller": "build_high_order", + "callee": "cols.extend", + "lineNumber": 115 + }, + { + "caller": "build_high_order", + "callee": "np.log1p", + "lineNumber": 115 + }, + { + "caller": "build_high_order", + "callee": "names.extend", + "lineNumber": 116 + }, + { + "caller": "build_high_order", + "callee": "np.column_stack(cols).astype", + "lineNumber": 119 + }, + { + "caller": "build_high_order", + "callee": "np.column_stack", + "lineNumber": 119 + }, + { + "caller": "build_high_order", + "callee": "np.save", + "lineNumber": 120 + }, + { + "caller": "build_high_order", + "callee": "(cache / f\"high_order_{tag}_names.txt\").write_text", + "lineNumber": 121 + }, + { + "caller": "build_high_order", + "callee": "\"\\n\".join", + "lineNumber": 121 + }, + { + "caller": "build_high_order_directed", + "callee": "cache.mkdir", + "lineNumber": 127 + }, + { + "caller": "build_high_order_directed", + "callee": "len", + "lineNumber": 128 + }, + { + "caller": "build_high_order_directed", + "callee": "int", + "lineNumber": 128 + }, + { + "caller": "build_high_order_directed", + "callee": "pairs[:,0].sum", + "lineNumber": 128 + }, + { + "caller": "build_high_order_directed", + "callee": "int", + "lineNumber": 128 + }, + { + "caller": "build_high_order_directed", + "callee": "pairs[:,1].sum", + "lineNumber": 128 + }, + { + "caller": "build_high_order_directed", + "callee": "path.exists", + "lineNumber": 129 + }, + { + "caller": "build_high_order_directed", + "callee": "np.load", + "lineNumber": 130 + }, + { + "caller": "build_high_order_directed", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 132 + }, + { + "caller": "build_high_order_directed", + "callee": "sparse.csr_matrix", + "lineNumber": 133 + }, + { + "caller": "build_high_order_directed", + "callee": "np.ones", + "lineNumber": 133 + }, + { + "caller": "build_high_order_directed", + "callee": "len", + "lineNumber": 133 + }, + { + "caller": "build_high_order_directed", + "callee": "row_norm", + "lineNumber": 134 + }, + { + "caller": "build_high_order_directed", + "callee": "np.array", + "lineNumber": 135 + }, + { + "caller": "build_high_order_directed", + "callee": "read_txt", + "lineNumber": 135 + }, + { + "caller": "build_high_order_directed", + "callee": "sparse.csr_matrix", + "lineNumber": 136 + }, + { + "caller": "build_high_order_directed", + "callee": "np.ones", + "lineNumber": 136 + }, + { + "caller": "build_high_order_directed", + "callee": "len", + "lineNumber": 136 + }, + { + "caller": "build_high_order_directed", + "callee": "pp_fwd.T.tocsr", + "lineNumber": 137 + }, + { + "caller": "build_high_order_directed", + "callee": "(pp_fwd + pp_bwd).astype", + "lineNumber": 138 + }, + { + "caller": "build_high_order_directed", + "callee": "row_norm", + "lineNumber": 141 + }, + { + "caller": "build_high_order_directed", + "callee": "row_norm", + "lineNumber": 142 + }, + { + "caller": "build_high_order_directed", + "callee": "row_norm", + "lineNumber": 143 + }, + { + "caller": "build_high_order_directed", + "callee": "np.array", + "lineNumber": 146 + }, + { + "caller": "build_high_order_directed", + "callee": "read_txt", + "lineNumber": 146 + }, + { + "caller": "build_high_order_directed", + "callee": "sparse.csr_matrix", + "lineNumber": 147 + }, + { + "caller": "build_high_order_directed", + "callee": "np.ones", + "lineNumber": 147 + }, + { + "caller": "build_high_order_directed", + "callee": "len", + "lineNumber": 147 + }, + { + "caller": "build_high_order_directed", + "callee": "(aa + aa.T).astype", + "lineNumber": 148 + }, + { + "caller": "build_high_order_directed", + "callee": "row_norm", + "lineNumber": 150 + }, + { + "caller": "build_high_order_directed", + "callee": "np.asarray(ap.sum(axis=0)).ravel().astype", + "lineNumber": 151 + }, + { + "caller": "build_high_order_directed", + "callee": "np.asarray(ap.sum(axis=0)).ravel", + "lineNumber": 151 + }, + { + "caller": "build_high_order_directed", + "callee": "np.asarray", + "lineNumber": 151 + }, + { + "caller": "build_high_order_directed", + "callee": "ap.sum", + "lineNumber": 151 + }, + { + "caller": "build_high_order_directed", + "callee": "np.asarray(pp_undir.sum(axis=0)).ravel().astype", + "lineNumber": 152 + }, + { + "caller": "build_high_order_directed", + "callee": "np.asarray(pp_undir.sum(axis=0)).ravel", + "lineNumber": 152 + }, + { + "caller": "build_high_order_directed", + "callee": "np.asarray", + "lineNumber": 152 + }, + { + "caller": "build_high_order_directed", + "callee": "pp_undir.sum", + "lineNumber": 152 + }, + { + "caller": "build_high_order_directed", + "callee": "np.log1p(paper_deg[pairs[:, 1]] + cite_deg[pairs[:, 1]] + 1.0).astype", + "lineNumber": 153 + }, + { + "caller": "build_high_order_directed", + "callee": "np.log1p", + "lineNumber": 153 + }, + { + "caller": "build_high_order_directed", + "callee": "matrices.items", + "lineNumber": 157 + }, + { + "caller": "build_high_order_directed", + "callee": "apn.copy", + "lineNumber": 158 + }, + { + "caller": "build_high_order_directed", + "callee": "range", + "lineNumber": 160 + }, + { + "caller": "build_high_order_directed", + "callee": "topk_prune_rows", + "lineNumber": 161 + }, + { + "caller": "build_high_order_directed", + "callee": "S.dot(ppn).tocsr", + "lineNumber": 161 + }, + { + "caller": "build_high_order_directed", + "callee": "S.dot", + "lineNumber": 161 + }, + { + "caller": "build_high_order_directed", + "callee": "extract_scores", + "lineNumber": 162 + }, + { + "caller": "build_high_order_directed", + "callee": "cols.extend", + "lineNumber": 163 + }, + { + "caller": "build_high_order_directed", + "callee": "names.extend", + "lineNumber": 164 + }, + { + "caller": "build_high_order_directed", + "callee": "topk_prune_rows", + "lineNumber": 166 + }, + { + "caller": "build_high_order_directed", + "callee": "aan.dot(apn).tocsr", + "lineNumber": 166 + }, + { + "caller": "build_high_order_directed", + "callee": "aan.dot", + "lineNumber": 166 + }, + { + "caller": "build_high_order_directed", + "callee": "range", + "lineNumber": 167 + }, + { + "caller": "build_high_order_directed", + "callee": "topk_prune_rows", + "lineNumber": 169 + }, + { + "caller": "build_high_order_directed", + "callee": "C.dot(ppn).tocsr", + "lineNumber": 169 + }, + { + "caller": "build_high_order_directed", + "callee": "C.dot", + "lineNumber": 169 + }, + { + "caller": "build_high_order_directed", + "callee": "extract_scores", + "lineNumber": 170 + }, + { + "caller": "build_high_order_directed", + "callee": "cols.extend", + "lineNumber": 171 + }, + { + "caller": "build_high_order_directed", + "callee": "names.extend", + "lineNumber": 172 + }, + { + "caller": "build_high_order_directed", + "callee": "np.column_stack(cols).astype", + "lineNumber": 173 + }, + { + "caller": "build_high_order_directed", + "callee": "np.column_stack", + "lineNumber": 173 + }, + { + "caller": "build_high_order_directed", + "callee": "np.save", + "lineNumber": 174 + }, + { + "caller": "build_high_order_directed", + "callee": "(cache / f\"high_order_directed_{tag}_names.txt\").write_text", + "lineNumber": 175 + }, + { + "caller": "build_high_order_directed", + "callee": "\"\\n\".join", + "lineNumber": 175 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.zeros", + "lineNumber": 180 + }, + { + "caller": "fit_lgb_oof", + "callee": "len", + "lineNumber": 180 + }, + { + "caller": "fit_lgb_oof", + "callee": "StratifiedKFold", + "lineNumber": 181 + }, + { + "caller": "fit_lgb_oof", + "callee": "enumerate", + "lineNumber": 182 + }, + { + "caller": "fit_lgb_oof", + "callee": "skf.split", + "lineNumber": 182 + }, + { + "caller": "fit_lgb_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 183 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.fit", + "lineNumber": 196 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba(X[va])[:, 1].astype", + "lineNumber": 197 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba", + "lineNumber": 197 + }, + { + "caller": "fit_full_predict", + "callee": "lgb.LGBMClassifier", + "lineNumber": 202 + }, + { + "caller": "fit_full_predict", + "callee": "clf.fit", + "lineNumber": 215 + }, + { + "caller": "fit_full_predict", + "callee": "clf.predict_proba(Xt)[:, 1].astype", + "lineNumber": 216 + }, + { + "caller": "fit_full_predict", + "callee": "clf.predict_proba", + "lineNumber": 216 + }, + { + "caller": "write_ratio_submission", + "callee": "np.zeros", + "lineNumber": 220 + }, + { + "caller": "write_ratio_submission", + "callee": "len", + "lineNumber": 220 + }, + { + "caller": "write_ratio_submission", + "callee": "np.argsort", + "lineNumber": 221 + }, + { + "caller": "write_ratio_submission", + "callee": "int", + "lineNumber": 221 + }, + { + "caller": "write_ratio_submission", + "callee": "round", + "lineNumber": 221 + }, + { + "caller": "write_ratio_submission", + "callee": "len", + "lineNumber": 221 + }, + { + "caller": "write_ratio_submission", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 223 + }, + { + "caller": "write_ratio_submission", + "callee": "pd.DataFrame", + "lineNumber": 223 + }, + { + "caller": "write_ratio_submission", + "callee": "np.arange", + "lineNumber": 223 + }, + { + "caller": "write_ratio_submission", + "callee": "len", + "lineNumber": 223 + }, + { + "caller": "write_ratio_submission", + "callee": "str", + "lineNumber": 225 + }, + { + "caller": "write_ratio_submission", + "callee": "float", + "lineNumber": 226 + }, + { + "caller": "write_ratio_submission", + "callee": "float", + "lineNumber": 227 + }, + { + "caller": "write_ratio_submission", + "callee": "pred.mean", + "lineNumber": 227 + }, + { + "caller": "write_ratio_submission", + "callee": "int", + "lineNumber": 228 + }, + { + "caller": "write_ratio_submission", + "callee": "(pred != anchor).sum", + "lineNumber": 228 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 235 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 236 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 237 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 238 + }, + { + "caller": "main", + "callee": "ap.parse_args", + "lineNumber": 239 + }, + { + "caller": "main", + "callee": "args.package_root.resolve", + "lineNumber": 241 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 242 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 243 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 244 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 245 + }, + { + "caller": "main", + "callee": "rw.build_base_features", + "lineNumber": 247 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 248 + }, + { + "caller": "main", + "callee": "rich.content_rich_features", + "lineNumber": 249 + }, + { + "caller": "main", + "callee": "rw.small_configs", + "lineNumber": 260 + }, + { + "caller": "main", + "callee": "rw.graph_configs", + "lineNumber": 260 + }, + { + "caller": "main", + "callee": "rw.extra_configs", + "lineNumber": 260 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 265 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 265 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 266 + }, + { + "caller": "main", + "callee": "blocks.append", + "lineNumber": 267 + }, + { + "caller": "main", + "callee": "build_high_order", + "lineNumber": 268 + }, + { + "caller": "main", + "callee": "build_high_order_directed", + "lineNumber": 269 + }, + { + "caller": "main", + "callee": "out.mkdir", + "lineNumber": 271 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, X_rich, *blocks, ens.aggregate(blocks)]).astype", + "lineNumber": 275 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 275 + }, + { + "caller": "main", + "callee": "ens.aggregate", + "lineNumber": 275 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, X_rich, *blocks, ens.aggregate(blocks), X_high]).astype", + "lineNumber": 276 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 276 + }, + { + "caller": "main", + "callee": "ens.aggregate", + "lineNumber": 276 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, X_rich, *blocks, ens.aggregate(blocks), X_high, X_high_dir]).astype", + "lineNumber": 277 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 277 + }, + { + "caller": "main", + "callee": "ens.aggregate", + "lineNumber": 277 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, X_high]).astype", + "lineNumber": 278 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 278 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 280 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 281 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 281 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 282 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 283 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 284 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 285 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values(\"validation_f1\", ascending=False).to_csv", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 287 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values(\"validation_f1\", ascending=False).to_string", + "lineNumber": 287 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 287 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 287 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, X_rich, *blocks, ens.aggregate(blocks), X_high, X_high_dir]).astype", + "lineNumber": 292 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 292 + }, + { + "caller": "main", + "callee": "ens.aggregate", + "lineNumber": 292 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 293 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 294 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 295 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 296 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 296 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs/dynamic_seed202/post95_test_scores/dyn202_l2d512_bpr_bigbatch_more/scores/test_vanilla_ensemble_mean.npy\").astype", + "lineNumber": 297 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 297 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 298 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 298 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 299 + }, + { + "caller": "main", + "callee": "test_builder.transform", + "lineNumber": 300 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(test_pairs, main_test),\n Xht,\n post.negative_evidence_features(Xht, main_test),\n gen.topk_content_similarity_fast(root, test_pairs, test_builder),\n ]\n ).astype", + "lineNumber": 301 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 301 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 303 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 305 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 306 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 309 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 309 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs/dynamic_seed202/post95_submission/selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 309 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs/dynamic_seed202/post95_submission/selected_variant_val_scores.txt\").read_text", + "lineNumber": 309 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 309 + }, + { + "caller": "main", + "callee": "p.resolve().relative_to", + "lineNumber": 312 + }, + { + "caller": "main", + "callee": "p.resolve", + "lineNumber": 312 + }, + { + "caller": "main", + "callee": "rel.name.replace", + "lineNumber": 313 + }, + { + "caller": "main", + "callee": "test_scores.append", + "lineNumber": 314 + }, + { + "caller": "main", + "callee": "np.load(tp).astype", + "lineNumber": 314 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 314 + }, + { + "caller": "main", + "callee": "np.column_stack([Xt, gen.variant_feature_matrix(post, test_scores)]).astype", + "lineNumber": 315 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 315 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 315 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 316 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs/dynamic_seed202/extra_bprmf_submission/test_mf_bpr_dynamic_s202_d256_e220.npy\").astype", + "lineNumber": 317 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 317 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 318 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 319 + }, + { + "caller": "main", + "callee": "np.column_stack([Xt, Xct, Xmt, rich.content_rich_features(root, test_pairs, test_builder)]).astype", + "lineNumber": 320 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 320 + }, + { + "caller": "main", + "callee": "rich.content_rich_features", + "lineNumber": 320 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 324 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 324 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 325 + }, + { + "caller": "main", + "callee": "test_blocks.append", + "lineNumber": 326 + }, + { + "caller": "main", + "callee": "build_high_order", + "lineNumber": 327 + }, + { + "caller": "main", + "callee": "build_high_order_directed", + "lineNumber": 328 + }, + { + "caller": "main", + "callee": "np.column_stack([Xt, *test_blocks, ens.aggregate(test_blocks), X_high_test, X_high_dir_test]).astype", + "lineNumber": 329 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 329 + }, + { + "caller": "main", + "callee": "ens.aggregate", + "lineNumber": 329 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 330 + }, + { + "caller": "main", + "callee": "fit_full_predict", + "lineNumber": 331 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 332 + }, + { + "caller": "main", + "callee": "np.load(root / \"cached_scores/test_known_mask.npy\").astype", + "lineNumber": 333 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 333 + }, + { + "caller": "main", + "callee": "pd.read_csv(root / \"validation_runs/dynamic_seed202/node2vec_deepwalk_submission/submission_content_mf_deepwalk_node2vec_lgb_th0.480000.csv\")[\"Predicted\"].to_numpy", + "lineNumber": 334 + }, + { + "caller": "main", + "callee": "pd.read_csv", + "lineNumber": 334 + }, + { + "caller": "main", + "callee": "sub_dir.mkdir", + "lineNumber": 336 + }, + { + "caller": "main", + "callee": "max", + "lineNumber": 338 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 339 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 340 + }, + { + "caller": "main", + "callee": "(oof >= best_row[\"threshold\"]).mean", + "lineNumber": 340 + }, + { + "caller": "main", + "callee": "write_ratio_submission", + "lineNumber": 343 + }, + { + "caller": "main", + "callee": "row.update", + "lineNumber": 344 + }, + { + "caller": "main", + "callee": "sub_rows.append", + "lineNumber": 345 + }, + { + "caller": "main", + "callee": "pd.DataFrame(sub_rows).to_csv", + "lineNumber": 346 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 346 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 347 + }, + { + "caller": "main", + "callee": "pd.DataFrame(sub_rows).to_string", + "lineNumber": 347 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 347 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 12, + "functionCount": 12, + "classCount": 0 + } + }, + { + "path": "code/high_order_model_compare.py", + "language": "python", + "fileCategory": "code", + "totalLines": 166, + "nonEmptyLines": 151, + "functions": [ + { + "name": "load_module", + "startLine": 20, + "endLine": 26, + "params": [ + "name", + "path" + ] + }, + { + "name": "best_f1", + "startLine": 29, + "endLine": 33, + "params": [ + "y", + "s" + ] + }, + { + "name": "fit_oof", + "startLine": 36, + "endLine": 95, + "params": [ + "X", + "y", + "kind", + "seed", + "n_splits" + ] + }, + { + "name": "main", + "startLine": 98, + "endLine": 162, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 20, + "isDefault": false + }, + { + "name": "best_f1", + "line": 29, + "isDefault": false + }, + { + "name": "fit_oof", + "line": 36, + "isDefault": false + }, + { + "name": "main", + "line": 98, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 21 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 22 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 25 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "fit_oof", + "callee": "np.zeros", + "lineNumber": 37 + }, + { + "caller": "fit_oof", + "callee": "len", + "lineNumber": 37 + }, + { + "caller": "fit_oof", + "callee": "StratifiedKFold", + "lineNumber": 38 + }, + { + "caller": "fit_oof", + "callee": "enumerate", + "lineNumber": 39 + }, + { + "caller": "fit_oof", + "callee": "skf.split", + "lineNumber": 39 + }, + { + "caller": "fit_oof", + "callee": "xgb.XGBClassifier", + "lineNumber": 41 + }, + { + "caller": "fit_oof", + "callee": "xgb.XGBClassifier", + "lineNumber": 56 + }, + { + "caller": "fit_oof", + "callee": "ExtraTreesClassifier", + "lineNumber": 71 + }, + { + "caller": "fit_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 80 + }, + { + "caller": "fit_oof", + "callee": "clf.fit", + "lineNumber": 93 + }, + { + "caller": "fit_oof", + "callee": "clf.predict_proba(X[va])[:, 1].astype", + "lineNumber": 94 + }, + { + "caller": "fit_oof", + "callee": "clf.predict_proba", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 99 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 100 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 100 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 100 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 101 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 102 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 103 + }, + { + "caller": "main", + "callee": "ap.parse_args", + "lineNumber": 104 + }, + { + "caller": "main", + "callee": "args.package_root.resolve", + "lineNumber": 106 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 107 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 108 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 109 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 110 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 111 + }, + { + "caller": "main", + "callee": "rw.build_base_features", + "lineNumber": 113 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "rich.content_rich_features", + "lineNumber": 115 + }, + { + "caller": "main", + "callee": "rw.small_configs", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "rw.graph_configs", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "rw.extra_configs", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 130 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 130 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 131 + }, + { + "caller": "main", + "callee": "blocks.append", + "lineNumber": 132 + }, + { + "caller": "main", + "callee": "high.build_high_order", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "high.build_high_order_directed", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, X_rich, *blocks, ens.aggregate(blocks), X_high, X_high_dir]).astype", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "ens.aggregate", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "out.mkdir", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "fit_oof", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 145 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 147 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 149 + }, + { + "caller": "main", + "callee": "list", + "lineNumber": 150 + }, + { + "caller": "main", + "callee": "np.linspace", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 155 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 156 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 157 + }, + { + "caller": "main", + "callee": "np.mean", + "lineNumber": 158 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 159 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values(\"validation_f1\", ascending=False).to_csv", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 162 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values(\"validation_f1\", ascending=False).to_string", + "lineNumber": 162 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 162 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 162 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 4, + "functionCount": 4, + "classCount": 0 + } + }, + { + "path": "code/make_notebook_style_split.py", + "language": "python", + "fileCategory": "code", + "totalLines": 86, + "nonEmptyLines": 66, + "functions": [ + { + "name": "read_txt", + "startLine": 20, + "endLine": 25, + "params": [ + "path" + ] + }, + { + "name": "main", + "startLine": 28, + "endLine": 82, + "params": [] + } + ], + "exports": [ + { + "name": "read_txt", + "line": 20, + "isDefault": false + }, + { + "name": "main", + "line": 28, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 22 + }, + { + "caller": "read_txt", + "callee": "rows.append", + "lineNumber": 24 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 24 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 24 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 24 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 24 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 29 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 30 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 30 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 30 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 31 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 32 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 33 + }, + { + "caller": "main", + "callee": "split_dir.mkdir", + "lineNumber": 38 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 40 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 41 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 45 + }, + { + "caller": "main", + "callee": "ref_edges.set_index", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "ref_edges.index.astype", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 47 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 48 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 49 + }, + { + "caller": "main", + "callee": "pd.concat", + "lineNumber": 51 + }, + { + "caller": "main", + "callee": "pd.unique(node_tmp).astype", + "lineNumber": 52 + }, + { + "caller": "main", + "callee": "pd.unique", + "lineNumber": 52 + }, + { + "caller": "main", + "callee": "pd.concat", + "lineNumber": 53 + }, + { + "caller": "main", + "callee": "pd.unique(node_tmp).astype", + "lineNumber": 54 + }, + { + "caller": "main", + "callee": "pd.unique", + "lineNumber": 54 + }, + { + "caller": "main", + "callee": "ref_edges.sample", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "ref_edges[~ref_edges.index.isin(train_refs.index)].copy", + "lineNumber": 57 + }, + { + "caller": "main", + "callee": "ref_edges.index.isin", + "lineNumber": 57 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "map", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "ref_edges[[\"source\", \"target\"]].to_numpy().tolist", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "ref_edges[[\"source\", \"target\"]].to_numpy", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "np.random.default_rng", + "lineNumber": 62 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 63 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 63 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "rng.choice", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "rng.choice", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "neg_pairs.append", + "lineNumber": 67 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "pd.concat", + "lineNumber": 71 + }, + { + "caller": "main", + "callee": "val_pos.reset_index", + "lineNumber": 71 + }, + { + "caller": "main", + "callee": "val_pairs.sample(frac=1, random_state=args.seed, axis=0).reset_index", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "val_pairs.sample", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "train_refs[[\"source\", \"target\"]].to_csv", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\", \"label\"]].to_csv", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 78 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "val_pairs['label'].sum", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "(val_pairs['label'] == 0).sum", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 82 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 82 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 2, + "functionCount": 2, + "classCount": 0 + } + }, + { + "path": "code/node2vec_deepwalk_ablation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 257, + "nonEmptyLines": 219, + "functions": [ + { + "name": "load_module", + "startLine": 19, + "endLine": 24, + "params": [ + "name", + "path" + ] + }, + { + "name": "read_txt", + "startLine": 27, + "endLine": 28, + "params": [ + "path" + ] + }, + { + "name": "best_f1", + "startLine": 31, + "endLine": 36, + "params": [ + "y", + "s" + ] + }, + { + "name": "rank01", + "startLine": 39, + "endLine": 43, + "params": [ + "x" + ] + }, + { + "name": "zscore", + "startLine": 46, + "endLine": 47, + "params": [ + "x" + ] + }, + { + "name": "fit_lgb_oof", + "startLine": 50, + "endLine": 68, + "params": [ + "X", + "y", + "seed", + "n_splits" + ] + }, + { + "name": "score_to_features", + "startLine": 71, + "endLine": 84, + "params": [ + "scores", + "prefix", + "pairs" + ] + }, + { + "name": "build_graph", + "startLine": 87, + "endLine": 98, + "params": [ + "root", + "train_refs" + ] + }, + { + "name": "deepwalk_walks", + "startLine": 101, + "endLine": 119, + "params": [ + "G", + "walk_length", + "num_walks", + "seed" + ] + }, + { + "name": "train_deepwalk", + "startLine": 122, + "endLine": 138, + "params": [ + "G", + "out_path", + "dim", + "walk_length", + "num_walks", + "window", + "seed", + "workers" + ] + }, + { + "name": "train_node2vec", + "startLine": 141, + "endLine": 147, + "params": [ + "G", + "out_path", + "dim", + "walk_length", + "num_walks", + "window", + "p", + "q", + "seed", + "workers" + ] + }, + { + "name": "pair_scores", + "startLine": 150, + "endLine": 174, + "params": [ + "model", + "pairs", + "prefix", + "root", + "split_seed" + ] + }, + { + "name": "build_current_best_features", + "startLine": 177, + "endLine": 204, + "params": [ + "root", + "split_seed", + "main_score_file" + ] + }, + { + "name": "main", + "startLine": 207, + "endLine": 253, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 19, + "isDefault": false + }, + { + "name": "read_txt", + "line": 27, + "isDefault": false + }, + { + "name": "best_f1", + "line": 31, + "isDefault": false + }, + { + "name": "rank01", + "line": 39, + "isDefault": false + }, + { + "name": "zscore", + "line": 46, + "isDefault": false + }, + { + "name": "fit_lgb_oof", + "line": 50, + "isDefault": false + }, + { + "name": "score_to_features", + "line": 71, + "isDefault": false + }, + { + "name": "build_graph", + "line": 87, + "isDefault": false + }, + { + "name": "deepwalk_walks", + "line": 101, + "isDefault": false + }, + { + "name": "train_deepwalk", + "line": 122, + "isDefault": false + }, + { + "name": "train_node2vec", + "line": 141, + "isDefault": false + }, + { + "name": "pair_scores", + "line": 150, + "isDefault": false + }, + { + "name": "build_current_best_features", + "line": 177, + "isDefault": false + }, + { + "name": "main", + "line": 207, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 20 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 21 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 23 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 28 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 28 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 28 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 28 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 34 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 34 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 35 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 35 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 40 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 41 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 41 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 42 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 42 + }, + { + "caller": "zscore", + "callee": "((x - x.mean()) / (x.std() + 1e-8)).astype", + "lineNumber": 47 + }, + { + "caller": "zscore", + "callee": "x.mean", + "lineNumber": 47 + }, + { + "caller": "zscore", + "callee": "x.std", + "lineNumber": 47 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.zeros", + "lineNumber": 51 + }, + { + "caller": "fit_lgb_oof", + "callee": "len", + "lineNumber": 51 + }, + { + "caller": "fit_lgb_oof", + "callee": "StratifiedKFold", + "lineNumber": 52 + }, + { + "caller": "fit_lgb_oof", + "callee": "enumerate", + "lineNumber": 53 + }, + { + "caller": "fit_lgb_oof", + "callee": "skf.split", + "lineNumber": 53 + }, + { + "caller": "fit_lgb_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 54 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.fit", + "lineNumber": 66 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba", + "lineNumber": 67 + }, + { + "caller": "score_to_features", + "callee": "np.zeros", + "lineNumber": 72 + }, + { + "caller": "score_to_features", + "callee": "len", + "lineNumber": 72 + }, + { + "caller": "score_to_features", + "callee": "pd.DataFrame", + "lineNumber": 73 + }, + { + "caller": "score_to_features", + "callee": "np.arange", + "lineNumber": 73 + }, + { + "caller": "score_to_features", + "callee": "len", + "lineNumber": 73 + }, + { + "caller": "score_to_features", + "callee": "df.groupby", + "lineNumber": 74 + }, + { + "caller": "score_to_features", + "callee": "g[\"idx\"].to_numpy", + "lineNumber": 75 + }, + { + "caller": "score_to_features", + "callee": "np.argsort", + "lineNumber": 76 + }, + { + "caller": "score_to_features", + "callee": "g[\"score\"].to_numpy", + "lineNumber": 76 + }, + { + "caller": "score_to_features", + "callee": "np.linspace", + "lineNumber": 77 + }, + { + "caller": "score_to_features", + "callee": "len", + "lineNumber": 77 + }, + { + "caller": "score_to_features", + "callee": "len", + "lineNumber": 77 + }, + { + "caller": "score_to_features", + "callee": "np.array", + "lineNumber": 77 + }, + { + "caller": "score_to_features", + "callee": "np.column_stack([scores, zscore(scores), rank01(scores), author_rank]).astype", + "lineNumber": 79 + }, + { + "caller": "score_to_features", + "callee": "np.column_stack", + "lineNumber": 79 + }, + { + "caller": "score_to_features", + "callee": "zscore", + "lineNumber": 79 + }, + { + "caller": "score_to_features", + "callee": "rank01", + "lineNumber": 79 + }, + { + "caller": "build_graph", + "callee": "nx.Graph", + "lineNumber": 89 + }, + { + "caller": "build_graph", + "callee": "G.add_nodes_from", + "lineNumber": 90 + }, + { + "caller": "build_graph", + "callee": "range", + "lineNumber": 90 + }, + { + "caller": "build_graph", + "callee": "G.add_nodes_from", + "lineNumber": 91 + }, + { + "caller": "build_graph", + "callee": "range", + "lineNumber": 91 + }, + { + "caller": "build_graph", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 92 + }, + { + "caller": "build_graph", + "callee": "G.add_edge", + "lineNumber": 93 + }, + { + "caller": "build_graph", + "callee": "int", + "lineNumber": 93 + }, + { + "caller": "build_graph", + "callee": "int", + "lineNumber": 93 + }, + { + "caller": "build_graph", + "callee": "read_txt", + "lineNumber": 94 + }, + { + "caller": "build_graph", + "callee": "G.add_edge", + "lineNumber": 95 + }, + { + "caller": "build_graph", + "callee": "read_txt", + "lineNumber": 96 + }, + { + "caller": "build_graph", + "callee": "G.add_edge", + "lineNumber": 97 + }, + { + "caller": "deepwalk_walks", + "callee": "np.random.default_rng", + "lineNumber": 102 + }, + { + "caller": "deepwalk_walks", + "callee": "np.array", + "lineNumber": 103 + }, + { + "caller": "deepwalk_walks", + "callee": "list", + "lineNumber": 103 + }, + { + "caller": "deepwalk_walks", + "callee": "G.nodes", + "lineNumber": 103 + }, + { + "caller": "deepwalk_walks", + "callee": "list", + "lineNumber": 104 + }, + { + "caller": "deepwalk_walks", + "callee": "G.neighbors", + "lineNumber": 104 + }, + { + "caller": "deepwalk_walks", + "callee": "G.nodes", + "lineNumber": 104 + }, + { + "caller": "deepwalk_walks", + "callee": "range", + "lineNumber": 106 + }, + { + "caller": "deepwalk_walks", + "callee": "nodes.copy", + "lineNumber": 107 + }, + { + "caller": "deepwalk_walks", + "callee": "rng.shuffle", + "lineNumber": 108 + }, + { + "caller": "deepwalk_walks", + "callee": "range", + "lineNumber": 112 + }, + { + "caller": "deepwalk_walks", + "callee": "int", + "lineNumber": 116 + }, + { + "caller": "deepwalk_walks", + "callee": "rng.integers", + "lineNumber": 116 + }, + { + "caller": "deepwalk_walks", + "callee": "len", + "lineNumber": 116 + }, + { + "caller": "deepwalk_walks", + "callee": "walk.append", + "lineNumber": 117 + }, + { + "caller": "deepwalk_walks", + "callee": "walks.append", + "lineNumber": 118 + }, + { + "caller": "train_deepwalk", + "callee": "out_path.exists", + "lineNumber": 123 + }, + { + "caller": "train_deepwalk", + "callee": "Word2Vec.load", + "lineNumber": 124 + }, + { + "caller": "train_deepwalk", + "callee": "str", + "lineNumber": 124 + }, + { + "caller": "train_deepwalk", + "callee": "deepwalk_walks", + "lineNumber": 125 + }, + { + "caller": "train_deepwalk", + "callee": "Word2Vec", + "lineNumber": 126 + }, + { + "caller": "train_deepwalk", + "callee": "model.save", + "lineNumber": 137 + }, + { + "caller": "train_deepwalk", + "callee": "str", + "lineNumber": 137 + }, + { + "caller": "train_node2vec", + "callee": "out_path.exists", + "lineNumber": 142 + }, + { + "caller": "train_node2vec", + "callee": "Word2Vec.load", + "lineNumber": 143 + }, + { + "caller": "train_node2vec", + "callee": "str", + "lineNumber": 143 + }, + { + "caller": "train_node2vec", + "callee": "Node2Vec", + "lineNumber": 144 + }, + { + "caller": "train_node2vec", + "callee": "n2v.fit", + "lineNumber": 145 + }, + { + "caller": "train_node2vec", + "callee": "model.save", + "lineNumber": 146 + }, + { + "caller": "train_node2vec", + "callee": "str", + "lineNumber": 146 + }, + { + "caller": "pair_scores", + "callee": "cache.mkdir", + "lineNumber": 152 + }, + { + "caller": "pair_scores", + "callee": "len", + "lineNumber": 153 + }, + { + "caller": "pair_scores", + "callee": "int", + "lineNumber": 153 + }, + { + "caller": "pair_scores", + "callee": "pairs[:,0].sum", + "lineNumber": 153 + }, + { + "caller": "pair_scores", + "callee": "int", + "lineNumber": 153 + }, + { + "caller": "pair_scores", + "callee": "pairs[:,1].sum", + "lineNumber": 153 + }, + { + "caller": "pair_scores", + "callee": "len", + "lineNumber": 154 + }, + { + "caller": "pair_scores", + "callee": "int", + "lineNumber": 154 + }, + { + "caller": "pair_scores", + "callee": "pairs[:,0].sum", + "lineNumber": 154 + }, + { + "caller": "pair_scores", + "callee": "int", + "lineNumber": 154 + }, + { + "caller": "pair_scores", + "callee": "pairs[:,1].sum", + "lineNumber": 154 + }, + { + "caller": "pair_scores", + "callee": "path_cos.exists", + "lineNumber": 155 + }, + { + "caller": "pair_scores", + "callee": "path_dot.exists", + "lineNumber": 155 + }, + { + "caller": "pair_scores", + "callee": "np.load", + "lineNumber": 156 + }, + { + "caller": "pair_scores", + "callee": "np.load", + "lineNumber": 156 + }, + { + "caller": "pair_scores", + "callee": "np.zeros", + "lineNumber": 158 + }, + { + "caller": "pair_scores", + "callee": "np.zeros", + "lineNumber": 159 + }, + { + "caller": "pair_scores", + "callee": "range", + "lineNumber": 160 + }, + { + "caller": "pair_scores", + "callee": "range", + "lineNumber": 164 + }, + { + "caller": "pair_scores", + "callee": "np.sum(A * P, axis=1).astype", + "lineNumber": 170 + }, + { + "caller": "pair_scores", + "callee": "np.sum", + "lineNumber": 170 + }, + { + "caller": "pair_scores", + "callee": "(dot / ((np.linalg.norm(A, axis=1) + 1e-8) * (np.linalg.norm(P, axis=1) + 1e-8))).astype", + "lineNumber": 171 + }, + { + "caller": "pair_scores", + "callee": "np.linalg.norm", + "lineNumber": 171 + }, + { + "caller": "pair_scores", + "callee": "np.linalg.norm", + "lineNumber": 171 + }, + { + "caller": "pair_scores", + "callee": "np.save", + "lineNumber": 172 + }, + { + "caller": "pair_scores", + "callee": "np.save", + "lineNumber": 173 + }, + { + "caller": "build_current_best_features", + "callee": "load_module", + "lineNumber": 178 + }, + { + "caller": "build_current_best_features", + "callee": "load_module", + "lineNumber": 179 + }, + { + "caller": "build_current_best_features", + "callee": "load_module", + "lineNumber": 180 + }, + { + "caller": "build_current_best_features", + "callee": "load_module", + "lineNumber": 181 + }, + { + "caller": "build_current_best_features", + "callee": "load_module", + "lineNumber": 182 + }, + { + "caller": "build_current_best_features", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 183 + }, + { + "caller": "build_current_best_features", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 184 + }, + { + "caller": "build_current_best_features", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 185 + }, + { + "caller": "build_current_best_features", + "callee": "np.load(main_score_file).astype", + "lineNumber": 186 + }, + { + "caller": "build_current_best_features", + "callee": "np.load", + "lineNumber": 186 + }, + { + "caller": "build_current_best_features", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 187 + }, + { + "caller": "build_current_best_features", + "callee": "builder.transform", + "lineNumber": 188 + }, + { + "caller": "build_current_best_features", + "callee": "np.column_stack(\n [\n stack.add_rank_features(pairs, main),\n Xh,\n post.negative_evidence_features(Xh, main),\n gen.topk_content_similarity_fast(root, pairs, builder),\n ]\n ).astype", + "lineNumber": 189 + }, + { + "caller": "build_current_best_features", + "callee": "np.column_stack", + "lineNumber": 189 + }, + { + "caller": "build_current_best_features", + "callee": "stack.add_rank_features", + "lineNumber": 191 + }, + { + "caller": "build_current_best_features", + "callee": "post.negative_evidence_features", + "lineNumber": 193 + }, + { + "caller": "build_current_best_features", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 194 + }, + { + "caller": "build_current_best_features", + "callee": "Path", + "lineNumber": 197 + }, + { + "caller": "build_current_best_features", + "callee": "x.strip", + "lineNumber": 197 + }, + { + "caller": "build_current_best_features", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 197 + }, + { + "caller": "build_current_best_features", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 197 + }, + { + "caller": "build_current_best_features", + "callee": "x.strip", + "lineNumber": 197 + }, + { + "caller": "build_current_best_features", + "callee": "np.column_stack([X, gen.variant_feature_matrix(post, [np.load(p).astype(np.float32) for p in selected])]).astype", + "lineNumber": 198 + }, + { + "caller": "build_current_best_features", + "callee": "np.column_stack", + "lineNumber": 198 + }, + { + "caller": "build_current_best_features", + "callee": "gen.variant_feature_matrix", + "lineNumber": 198 + }, + { + "caller": "build_current_best_features", + "callee": "np.load(p).astype", + "lineNumber": 198 + }, + { + "caller": "build_current_best_features", + "callee": "np.load", + "lineNumber": 198 + }, + { + "caller": "build_current_best_features", + "callee": "extra.content_mean_score", + "lineNumber": 199 + }, + { + "caller": "build_current_best_features", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"extra_score_sources\" / \"val_mf_bpr_s202_d256.npy\").astype", + "lineNumber": 200 + }, + { + "caller": "build_current_best_features", + "callee": "np.load", + "lineNumber": 200 + }, + { + "caller": "build_current_best_features", + "callee": "score_to_features", + "lineNumber": 201 + }, + { + "caller": "build_current_best_features", + "callee": "score_to_features", + "lineNumber": 202 + }, + { + "caller": "build_current_best_features", + "callee": "np.column_stack([X, Xc, Xm]).astype", + "lineNumber": 203 + }, + { + "caller": "build_current_best_features", + "callee": "np.column_stack", + "lineNumber": 203 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 208 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 209 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 209 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 209 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 210 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 211 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 212 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 213 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 214 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 215 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 216 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 217 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 218 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 219 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 223 + }, + { + "caller": "main", + "callee": "build_current_best_features", + "lineNumber": 225 + }, + { + "caller": "main", + "callee": "build_graph", + "lineNumber": 226 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 227 + }, + { + "caller": "main", + "callee": "G.number_of_nodes", + "lineNumber": 227 + }, + { + "caller": "main", + "callee": "G.number_of_edges", + "lineNumber": 227 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 230 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 231 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 232 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "train_deepwalk", + "lineNumber": 237 + }, + { + "caller": "main", + "callee": "train_node2vec", + "lineNumber": 238 + }, + { + "caller": "main", + "callee": "pair_scores", + "lineNumber": 240 + }, + { + "caller": "main", + "callee": "score_to_features", + "lineNumber": 241 + }, + { + "caller": "main", + "callee": "score_to_features", + "lineNumber": 242 + }, + { + "caller": "main", + "callee": "np.column_stack([Xcos, Xdot]).astype", + "lineNumber": 243 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 243 + }, + { + "caller": "main", + "callee": "blocks.append", + "lineNumber": 244 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, *blocks]).astype", + "lineNumber": 245 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 245 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 246 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 246 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 247 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 248 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 249 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 252 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 253 + }, + { + "caller": "main", + "callee": "result.to_string", + "lineNumber": 253 + } + ], + "metrics": { + "importCount": 5, + "exportCount": 14, + "functionCount": 14, + "classCount": 0 + } + }, + { + "path": "code/post95_ablation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 321, + "nonEmptyLines": 280, + "functions": [ + { + "name": "load_module", + "startLine": 17, + "endLine": 22, + "params": [ + "name", + "path" + ] + }, + { + "name": "best_f1", + "startLine": 25, + "endLine": 30, + "params": [ + "y", + "s" + ] + }, + { + "name": "prf", + "startLine": 33, + "endLine": 40, + "params": [ + "y", + "pred" + ] + }, + { + "name": "rank01", + "startLine": 43, + "endLine": 47, + "params": [ + "x" + ] + }, + { + "name": "zscore", + "startLine": 50, + "endLine": 51, + "params": [ + "x" + ] + }, + { + "name": "fit_lgb_oof", + "startLine": 54, + "endLine": 72, + "params": [ + "X", + "y", + "seed", + "n_splits" + ] + }, + { + "name": "bucket_series", + "startLine": 75, + "endLine": 81, + "params": [ + "values", + "name", + "bins" + ] + }, + { + "name": "error_analysis", + "startLine": 84, + "endLine": 128, + "params": [ + "y", + "score", + "pred", + "pairs", + "X_hand", + "score_lgcn", + "author_internal_rank", + "out_dir" + ] + }, + { + "name": "group_threshold", + "startLine": 131, + "endLine": 142, + "params": [ + "y", + "score", + "groups" + ] + }, + { + "name": "author_quota_tuning", + "startLine": 145, + "endLine": 173, + "params": [ + "y", + "score", + "pairs", + "author_degree" + ] + }, + { + "name": "negative_evidence_features", + "startLine": 176, + "endLine": 192, + "params": [ + "X_hand", + "score_lgcn" + ] + }, + { + "name": "topk_content_similarity", + "startLine": 195, + "endLine": 217, + "params": [ + "root", + "pairs", + "builder" + ] + }, + { + "name": "load_lgcn_variant_scores", + "startLine": 220, + "endLine": 245, + "params": [ + "root", + "split_seed", + "y", + "max_cols" + ] + }, + { + "name": "main", + "startLine": 248, + "endLine": 317, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 17, + "isDefault": false + }, + { + "name": "best_f1", + "line": 25, + "isDefault": false + }, + { + "name": "prf", + "line": 33, + "isDefault": false + }, + { + "name": "rank01", + "line": 43, + "isDefault": false + }, + { + "name": "zscore", + "line": 50, + "isDefault": false + }, + { + "name": "fit_lgb_oof", + "line": 54, + "isDefault": false + }, + { + "name": "bucket_series", + "line": 75, + "isDefault": false + }, + { + "name": "error_analysis", + "line": 84, + "isDefault": false + }, + { + "name": "group_threshold", + "line": 131, + "isDefault": false + }, + { + "name": "author_quota_tuning", + "line": 145, + "isDefault": false + }, + { + "name": "negative_evidence_features", + "line": 176, + "isDefault": false + }, + { + "name": "topk_content_similarity", + "line": 195, + "isDefault": false + }, + { + "name": "load_lgcn_variant_scores", + "line": 220, + "isDefault": false + }, + { + "name": "main", + "line": 248, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 18 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 19 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 21 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 26 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 29 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 29 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 30 + }, + { + "caller": "prf", + "callee": "int", + "lineNumber": 34 + }, + { + "caller": "prf", + "callee": "((pred == 1) & (y == 1)).sum", + "lineNumber": 34 + }, + { + "caller": "prf", + "callee": "int", + "lineNumber": 35 + }, + { + "caller": "prf", + "callee": "((pred == 1) & (y == 0)).sum", + "lineNumber": 35 + }, + { + "caller": "prf", + "callee": "int", + "lineNumber": 36 + }, + { + "caller": "prf", + "callee": "((pred == 0) & (y == 1)).sum", + "lineNumber": 36 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 44 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 45 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 45 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 46 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 46 + }, + { + "caller": "zscore", + "callee": "((x - x.mean()) / (x.std() + 1e-8)).astype", + "lineNumber": 51 + }, + { + "caller": "zscore", + "callee": "x.mean", + "lineNumber": 51 + }, + { + "caller": "zscore", + "callee": "x.std", + "lineNumber": 51 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.zeros", + "lineNumber": 55 + }, + { + "caller": "fit_lgb_oof", + "callee": "len", + "lineNumber": 55 + }, + { + "caller": "fit_lgb_oof", + "callee": "StratifiedKFold", + "lineNumber": 56 + }, + { + "caller": "fit_lgb_oof", + "callee": "enumerate", + "lineNumber": 57 + }, + { + "caller": "fit_lgb_oof", + "callee": "skf.split", + "lineNumber": 57 + }, + { + "caller": "fit_lgb_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 58 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.fit", + "lineNumber": 70 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba", + "lineNumber": 71 + }, + { + "caller": "bucket_series", + "callee": "zip", + "lineNumber": 77 + }, + { + "caller": "bucket_series", + "callee": "np.isneginf", + "lineNumber": 78 + }, + { + "caller": "bucket_series", + "callee": "np.isposinf", + "lineNumber": 79 + }, + { + "caller": "bucket_series", + "callee": "labels.append", + "lineNumber": 80 + }, + { + "caller": "bucket_series", + "callee": "pd.cut", + "lineNumber": 81 + }, + { + "caller": "error_analysis", + "callee": "pd.Series(pairs[:, 0]).map(pd.Series(np.arange(len(pairs)), index=pairs[:, 0]).groupby(level=0).count()).to_numpy", + "lineNumber": 96 + }, + { + "caller": "error_analysis", + "callee": "pd.Series(pairs[:, 0]).map", + "lineNumber": 96 + }, + { + "caller": "error_analysis", + "callee": "pd.Series", + "lineNumber": 96 + }, + { + "caller": "error_analysis", + "callee": "pd.Series(np.arange(len(pairs)), index=pairs[:, 0]).groupby(level=0).count", + "lineNumber": 96 + }, + { + "caller": "error_analysis", + "callee": "pd.Series(np.arange(len(pairs)), index=pairs[:, 0]).groupby", + "lineNumber": 96 + }, + { + "caller": "error_analysis", + "callee": "pd.Series", + "lineNumber": 96 + }, + { + "caller": "error_analysis", + "callee": "np.arange", + "lineNumber": 96 + }, + { + "caller": "error_analysis", + "callee": "len", + "lineNumber": 96 + }, + { + "caller": "error_analysis", + "callee": "bucket_series", + "lineNumber": 98 + }, + { + "caller": "error_analysis", + "callee": "bucket_series", + "lineNumber": 99 + }, + { + "caller": "error_analysis", + "callee": "pd.qcut", + "lineNumber": 100 + }, + { + "caller": "error_analysis", + "callee": "bucket_series", + "lineNumber": 101 + }, + { + "caller": "error_analysis", + "callee": "bucket_series", + "lineNumber": 102 + }, + { + "caller": "error_analysis", + "callee": "author_rank.astype", + "lineNumber": 102 + }, + { + "caller": "error_analysis", + "callee": "buckets.items", + "lineNumber": 105 + }, + { + "caller": "error_analysis", + "callee": "pd.Series(cats).dropna().unique", + "lineNumber": 106 + }, + { + "caller": "error_analysis", + "callee": "pd.Series(cats).dropna", + "lineNumber": 106 + }, + { + "caller": "error_analysis", + "callee": "pd.Series", + "lineNumber": 106 + }, + { + "caller": "error_analysis", + "callee": "np.asarray", + "lineNumber": 107 + }, + { + "caller": "error_analysis", + "callee": "mask.sum", + "lineNumber": 108 + }, + { + "caller": "error_analysis", + "callee": "prf", + "lineNumber": 110 + }, + { + "caller": "error_analysis", + "callee": "rows.append", + "lineNumber": 111 + }, + { + "caller": "error_analysis", + "callee": "str", + "lineNumber": 114 + }, + { + "caller": "error_analysis", + "callee": "int", + "lineNumber": 115 + }, + { + "caller": "error_analysis", + "callee": "mask.sum", + "lineNumber": 115 + }, + { + "caller": "error_analysis", + "callee": "int", + "lineNumber": 116 + }, + { + "caller": "error_analysis", + "callee": "y[mask].sum", + "lineNumber": 116 + }, + { + "caller": "error_analysis", + "callee": "int", + "lineNumber": 117 + }, + { + "caller": "error_analysis", + "callee": "pred[mask].sum", + "lineNumber": 117 + }, + { + "caller": "error_analysis", + "callee": "pd.DataFrame", + "lineNumber": 125 + }, + { + "caller": "error_analysis", + "callee": "df.to_csv", + "lineNumber": 126 + }, + { + "caller": "error_analysis", + "callee": "print", + "lineNumber": 127 + }, + { + "caller": "error_analysis", + "callee": "print", + "lineNumber": 128 + }, + { + "caller": "error_analysis", + "callee": "df.to_string", + "lineNumber": 128 + }, + { + "caller": "group_threshold", + "callee": "np.zeros", + "lineNumber": 132 + }, + { + "caller": "group_threshold", + "callee": "len", + "lineNumber": 132 + }, + { + "caller": "group_threshold", + "callee": "pd.Series(groups).dropna().unique", + "lineNumber": 134 + }, + { + "caller": "group_threshold", + "callee": "pd.Series(groups).dropna", + "lineNumber": 134 + }, + { + "caller": "group_threshold", + "callee": "pd.Series", + "lineNumber": 134 + }, + { + "caller": "group_threshold", + "callee": "np.asarray", + "lineNumber": 135 + }, + { + "caller": "group_threshold", + "callee": "mask.sum", + "lineNumber": 136 + }, + { + "caller": "group_threshold", + "callee": "best_f1", + "lineNumber": 138 + }, + { + "caller": "group_threshold", + "callee": "(score[mask] >= th).astype", + "lineNumber": 139 + }, + { + "caller": "group_threshold", + "callee": "str", + "lineNumber": 140 + }, + { + "caller": "group_threshold", + "callee": "float", + "lineNumber": 140 + }, + { + "caller": "group_threshold", + "callee": "prf", + "lineNumber": 141 + }, + { + "caller": "author_quota_tuning", + "callee": "bucket_series", + "lineNumber": 146 + }, + { + "caller": "author_quota_tuning", + "callee": "np.linspace", + "lineNumber": 148 + }, + { + "caller": "author_quota_tuning", + "callee": "np.zeros", + "lineNumber": 149 + }, + { + "caller": "author_quota_tuning", + "callee": "len", + "lineNumber": 149 + }, + { + "caller": "author_quota_tuning", + "callee": "pd.DataFrame", + "lineNumber": 150 + }, + { + "caller": "author_quota_tuning", + "callee": "np.arange", + "lineNumber": 150 + }, + { + "caller": "author_quota_tuning", + "callee": "len", + "lineNumber": 150 + }, + { + "caller": "author_quota_tuning", + "callee": "df.groupby", + "lineNumber": 160 + }, + { + "caller": "author_quota_tuning", + "callee": "str", + "lineNumber": 161 + }, + { + "caller": "author_quota_tuning", + "callee": "min", + "lineNumber": 162 + }, + { + "caller": "author_quota_tuning", + "callee": "max", + "lineNumber": 162 + }, + { + "caller": "author_quota_tuning", + "callee": "bucket_adj.get", + "lineNumber": 162 + }, + { + "caller": "author_quota_tuning", + "callee": "int", + "lineNumber": 163 + }, + { + "caller": "author_quota_tuning", + "callee": "round", + "lineNumber": 163 + }, + { + "caller": "author_quota_tuning", + "callee": "len", + "lineNumber": 163 + }, + { + "caller": "author_quota_tuning", + "callee": "g[\"idx\"].to_numpy", + "lineNumber": 166 + }, + { + "caller": "author_quota_tuning", + "callee": "np.argsort", + "lineNumber": 167 + }, + { + "caller": "author_quota_tuning", + "callee": "g[\"score\"].to_numpy", + "lineNumber": 167 + }, + { + "caller": "author_quota_tuning", + "callee": "prf", + "lineNumber": 169 + }, + { + "caller": "author_quota_tuning", + "callee": "float", + "lineNumber": 170 + }, + { + "caller": "author_quota_tuning", + "callee": "float", + "lineNumber": 170 + }, + { + "caller": "author_quota_tuning", + "callee": "pred.mean", + "lineNumber": 170 + }, + { + "caller": "negative_evidence_features", + "callee": "(local_overlap > 0).astype", + "lineNumber": 179 + }, + { + "caller": "negative_evidence_features", + "callee": "rank01", + "lineNumber": 180 + }, + { + "caller": "negative_evidence_features", + "callee": "np.column_stack(\n [\n has_any,\n score_lgcn * has_any,\n score_lgcn * (1.0 - has_any),\n score_lgcn / np.log1p(paper_degree + 1.0),\n paper_pct,\n paper_degree * X_hand[:, 7],\n paper_degree * X_hand[:, 8],\n paper_degree * X_hand[:, 13],\n ]\n ).astype", + "lineNumber": 181 + }, + { + "caller": "negative_evidence_features", + "callee": "np.column_stack", + "lineNumber": 181 + }, + { + "caller": "negative_evidence_features", + "callee": "np.log1p", + "lineNumber": 186 + }, + { + "caller": "topk_content_similarity", + "callee": "cache.mkdir", + "lineNumber": 197 + }, + { + "caller": "topk_content_similarity", + "callee": "len", + "lineNumber": 198 + }, + { + "caller": "topk_content_similarity", + "callee": "int", + "lineNumber": 198 + }, + { + "caller": "topk_content_similarity", + "callee": "pairs[:,0].sum", + "lineNumber": 198 + }, + { + "caller": "topk_content_similarity", + "callee": "int", + "lineNumber": 198 + }, + { + "caller": "topk_content_similarity", + "callee": "pairs[:,1].sum", + "lineNumber": 198 + }, + { + "caller": "topk_content_similarity", + "callee": "path.exists", + "lineNumber": 200 + }, + { + "caller": "topk_content_similarity", + "callee": "np.load", + "lineNumber": 201 + }, + { + "caller": "topk_content_similarity", + "callee": "(root / \"data_and_docs\" / \"feature.pkl\").open", + "lineNumber": 202 + }, + { + "caller": "topk_content_similarity", + "callee": "pkl.load(f).numpy().astype", + "lineNumber": 203 + }, + { + "caller": "topk_content_similarity", + "callee": "pkl.load(f).numpy", + "lineNumber": 203 + }, + { + "caller": "topk_content_similarity", + "callee": "pkl.load", + "lineNumber": 203 + }, + { + "caller": "topk_content_similarity", + "callee": "np.linalg.norm", + "lineNumber": 204 + }, + { + "caller": "topk_content_similarity", + "callee": "np.zeros", + "lineNumber": 205 + }, + { + "caller": "topk_content_similarity", + "callee": "len", + "lineNumber": 205 + }, + { + "caller": "topk_content_similarity", + "callee": "enumerate", + "lineNumber": 206 + }, + { + "caller": "topk_content_similarity", + "callee": "list", + "lineNumber": 207 + }, + { + "caller": "topk_content_similarity", + "callee": "int", + "lineNumber": 207 + }, + { + "caller": "topk_content_similarity", + "callee": "np.asarray", + "lineNumber": 210 + }, + { + "caller": "topk_content_similarity", + "callee": "int", + "lineNumber": 210 + }, + { + "caller": "topk_content_similarity", + "callee": "sims.sort", + "lineNumber": 211 + }, + { + "caller": "topk_content_similarity", + "callee": "vals[: min(3, len(vals))].mean", + "lineNumber": 214 + }, + { + "caller": "topk_content_similarity", + "callee": "min", + "lineNumber": 214 + }, + { + "caller": "topk_content_similarity", + "callee": "len", + "lineNumber": 214 + }, + { + "caller": "topk_content_similarity", + "callee": "vals[: min(5, len(vals))].mean", + "lineNumber": 215 + }, + { + "caller": "topk_content_similarity", + "callee": "min", + "lineNumber": 215 + }, + { + "caller": "topk_content_similarity", + "callee": "len", + "lineNumber": 215 + }, + { + "caller": "topk_content_similarity", + "callee": "np.save", + "lineNumber": 216 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "sorted", + "lineNumber": 221 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\").glob", + "lineNumber": 221 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "str", + "lineNumber": 224 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "str", + "lineNumber": 224 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "str", + "lineNumber": 224 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "str", + "lineNumber": 224 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "str", + "lineNumber": 224 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "np.load(p).astype", + "lineNumber": 226 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "np.load", + "lineNumber": 226 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "len", + "lineNumber": 227 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "len", + "lineNumber": 227 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "np.std", + "lineNumber": 227 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "best_f1", + "lineNumber": 229 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "rows.append", + "lineNumber": 230 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "str", + "lineNumber": 230 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "rows.sort", + "lineNumber": 231 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "np.zeros", + "lineNumber": 234 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "len", + "lineNumber": 234 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "raw_stack.append", + "lineNumber": 239 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "cols.extend", + "lineNumber": 240 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "zscore", + "lineNumber": 240 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "rank01", + "lineNumber": 240 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "names.extend", + "lineNumber": 241 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "np.vstack", + "lineNumber": 242 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "cols.extend", + "lineNumber": 243 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "zscore", + "lineNumber": 243 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "raw.mean", + "lineNumber": 243 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "zscore", + "lineNumber": 243 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "raw.std", + "lineNumber": 243 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "rank01", + "lineNumber": 243 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "raw.mean", + "lineNumber": 243 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "names.extend", + "lineNumber": 244 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "np.column_stack(cols).astype", + "lineNumber": 245 + }, + { + "caller": "load_lgcn_variant_scores", + "callee": "np.column_stack", + "lineNumber": 245 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 249 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 250 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 250 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 250 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 252 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 253 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 254 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 255 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 258 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 259 + }, + { + "caller": "main", + "callee": "lgcn_mod.make_notebook_style_split", + "lineNumber": 260 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 261 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 262 + }, + { + "caller": "main", + "callee": "np.load(args.lgcn_score_file).astype", + "lineNumber": 263 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 263 + }, + { + "caller": "main", + "callee": "stack_mod.ExplicitGraphFeatures", + "lineNumber": 264 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 266 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 268 + }, + { + "caller": "main", + "callee": "builder.transform", + "lineNumber": 269 + }, + { + "caller": "main", + "callee": "stack_mod.add_rank_features", + "lineNumber": 270 + }, + { + "caller": "main", + "callee": "np.column_stack([X_rank, X_hand]).astype", + "lineNumber": 271 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 271 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 274 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 275 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 276 + }, + { + "caller": "main", + "callee": "(base_oof >= th).astype", + "lineNumber": 277 + }, + { + "caller": "main", + "callee": "error_analysis", + "lineNumber": 278 + }, + { + "caller": "main", + "callee": "bucket_series", + "lineNumber": 281 + }, + { + "caller": "main", + "callee": "pd.qcut", + "lineNumber": 282 + }, + { + "caller": "main", + "callee": "group_threshold", + "lineNumber": 284 + }, + { + "caller": "main", + "callee": "np.asarray", + "lineNumber": 284 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 285 + }, + { + "caller": "main", + "callee": "pd.Series(thresholds).to_csv", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "pd.Series", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "author_quota_tuning", + "lineNumber": 287 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 288 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 290 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, negative_evidence_features(X_hand, score_lgcn)]).astype", + "lineNumber": 291 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 291 + }, + { + "caller": "main", + "callee": "negative_evidence_features", + "lineNumber": 291 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 292 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 293 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 294 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 296 + }, + { + "caller": "main", + "callee": "np.column_stack([X_neg, topk_content_similarity(root, pairs, builder)]).astype", + "lineNumber": 297 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 297 + }, + { + "caller": "main", + "callee": "topk_content_similarity", + "lineNumber": 297 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 298 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 299 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 300 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 302 + }, + { + "caller": "main", + "callee": "load_lgcn_variant_scores", + "lineNumber": 303 + }, + { + "caller": "main", + "callee": "(out_dir / \"lgcn_variant_feature_names.txt\").write_text", + "lineNumber": 304 + }, + { + "caller": "main", + "callee": "\"\\n\".join", + "lineNumber": 304 + }, + { + "caller": "main", + "callee": "np.column_stack([X_sim, X_var]).astype", + "lineNumber": 305 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 305 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 306 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 307 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 308 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 310 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 310 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 311 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 312 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 313 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 314 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 315 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 316 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 317 + }, + { + "caller": "main", + "callee": "result.to_string", + "lineNumber": 317 + } + ], + "metrics": { + "importCount": 2, + "exportCount": 14, + "functionCount": 14, + "classCount": 0 + } + }, + { + "path": "code/randomwalk_ensemble_ablation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 61, + "nonEmptyLines": 50, + "functions": [ + { + "name": "main", + "startLine": 16, + "endLine": 57, + "params": [] + } + ], + "exports": [ + { + "name": "main", + "line": 16, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 17 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 18 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 18 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 18 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 19 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 20 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 21 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 22 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 23 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 24 + }, + { + "caller": "main", + "callee": "rw.small_configs", + "lineNumber": 28 + }, + { + "caller": "main", + "callee": "rw.graph_configs", + "lineNumber": 28 + }, + { + "caller": "main", + "callee": "rw.extra_configs", + "lineNumber": 28 + }, + { + "caller": "main", + "callee": "rw.build_base_features", + "lineNumber": 29 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 34 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 34 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 35 + }, + { + "caller": "main", + "callee": "blocks.append", + "lineNumber": 36 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, *blocks, aggregate(blocks)]).astype", + "lineNumber": 37 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 37 + }, + { + "caller": "main", + "callee": "aggregate", + "lineNumber": 37 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 38 + }, + { + "caller": "main", + "callee": "rw.fit_lgb_oof", + "lineNumber": 39 + }, + { + "caller": "main", + "callee": "rw.best_f1", + "lineNumber": 40 + }, + { + "caller": "main", + "callee": "\"_\".join", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "\",\".join", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 54 + }, + { + "caller": "main", + "callee": "pd.DataFrame([row]).to_csv", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "pd.DataFrame([row]).to_string", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 57 + } + ], + "metrics": { + "importCount": 2, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "code/randomwalk_one_ablation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 70, + "nonEmptyLines": 58, + "functions": [ + { + "name": "main", + "startLine": 14, + "endLine": 66, + "params": [] + } + ], + "exports": [ + { + "name": "main", + "line": 14, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 15 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 16 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 16 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 16 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 17 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 18 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 19 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 20 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 21 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 22 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 23 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 28 + }, + { + "caller": "main", + "callee": "model_dir.mkdir", + "lineNumber": 29 + }, + { + "caller": "main", + "callee": "rw.small_configs", + "lineNumber": 31 + }, + { + "caller": "main", + "callee": "rw.graph_configs", + "lineNumber": 31 + }, + { + "caller": "main", + "callee": "rw.extra_configs", + "lineNumber": 31 + }, + { + "caller": "main", + "callee": "SystemExit", + "lineNumber": 33 + }, + { + "caller": "main", + "callee": "sorted", + "lineNumber": 33 + }, + { + "caller": "main", + "callee": "rw.build_base_features", + "lineNumber": 36 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 37 + }, + { + "caller": "main", + "callee": "rw.build_graph", + "lineNumber": 38 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 39 + }, + { + "caller": "main", + "callee": "G.number_of_nodes", + "lineNumber": 39 + }, + { + "caller": "main", + "callee": "G.number_of_edges", + "lineNumber": 39 + }, + { + "caller": "main", + "callee": "rw.train_model", + "lineNumber": 40 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 41 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, block]).astype", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "rw.fit_lgb_oof", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "rw.best_f1", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 45 + }, + { + "caller": "main", + "callee": "pd.DataFrame([row]).to_csv", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "pd.DataFrame([row]).to_string", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 66 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "code/randomwalk_systematic_ablation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 446, + "nonEmptyLines": 398, + "functions": [ + { + "name": "load_module", + "startLine": 20, + "endLine": 25, + "params": [ + "name", + "path" + ] + }, + { + "name": "read_txt", + "startLine": 28, + "endLine": 29, + "params": [ + "path" + ] + }, + { + "name": "best_f1", + "startLine": 32, + "endLine": 37, + "params": [ + "y", + "s" + ] + }, + { + "name": "rank01", + "startLine": 40, + "endLine": 44, + "params": [ + "x" + ] + }, + { + "name": "zscore", + "startLine": 47, + "endLine": 48, + "params": [ + "x" + ] + }, + { + "name": "fit_lgb_oof", + "startLine": 51, + "endLine": 70, + "params": [ + "X", + "y", + "seed", + "n_splits" + ] + }, + { + "name": "small_configs", + "startLine": 87, + "endLine": 95, + "params": [] + }, + { + "name": "graph_configs", + "startLine": 98, + "endLine": 104, + "params": [] + }, + { + "name": "extra_configs", + "startLine": 107, + "endLine": 115, + "params": [] + }, + { + "name": "build_graph", + "startLine": 118, + "endLine": 136, + "params": [ + "root", + "train_refs", + "graph_type" + ] + }, + { + "name": "deepwalk_walks", + "startLine": 139, + "endLine": 157, + "params": [ + "G", + "walk_length", + "num_walks", + "seed" + ] + }, + { + "name": "train_model", + "startLine": 160, + "endLine": 191, + "params": [ + "G", + "cfg", + "out_dir", + "workers" + ] + }, + { + "name": "embedding_arrays", + "startLine": 194, + "endLine": 213, + "params": [ + "model", + "train_refs" + ] + }, + { + "name": "pair_feature_block", + "startLine": 216, + "endLine": 270, + "params": [ + "model", + "pairs", + "cfg", + "root", + "split_seed", + "train_refs" + ] + }, + { + "name": "build_base_features", + "startLine": 273, + "endLine": 300, + "params": [ + "root", + "split_seed", + "main_score_file" + ] + }, + { + "name": "train_full_predict", + "startLine": 303, + "endLine": 317, + "params": [ + "X", + "y", + "X_test", + "seed" + ] + }, + { + "name": "main", + "startLine": 320, + "endLine": 442, + "params": [] + } + ], + "classes": [ + { + "name": "RWConfig", + "startLine": 74, + "endLine": 84, + "methods": [], + "properties": [ + "version_name", + "graph_type", + "method", + "dim", + "walk_length", + "num_walks", + "window", + "p", + "q", + "seed" + ] + } + ], + "exports": [ + { + "name": "load_module", + "line": 20, + "isDefault": false + }, + { + "name": "read_txt", + "line": 28, + "isDefault": false + }, + { + "name": "best_f1", + "line": 32, + "isDefault": false + }, + { + "name": "rank01", + "line": 40, + "isDefault": false + }, + { + "name": "zscore", + "line": 47, + "isDefault": false + }, + { + "name": "fit_lgb_oof", + "line": 51, + "isDefault": false + }, + { + "name": "RWConfig", + "line": 73, + "isDefault": false + }, + { + "name": "small_configs", + "line": 87, + "isDefault": false + }, + { + "name": "graph_configs", + "line": 98, + "isDefault": false + }, + { + "name": "extra_configs", + "line": 107, + "isDefault": false + }, + { + "name": "build_graph", + "line": 118, + "isDefault": false + }, + { + "name": "deepwalk_walks", + "line": 139, + "isDefault": false + }, + { + "name": "train_model", + "line": 160, + "isDefault": false + }, + { + "name": "embedding_arrays", + "line": 194, + "isDefault": false + }, + { + "name": "pair_feature_block", + "line": 216, + "isDefault": false + }, + { + "name": "build_base_features", + "line": 273, + "isDefault": false + }, + { + "name": "train_full_predict", + "line": 303, + "isDefault": false + }, + { + "name": "main", + "line": 320, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 21 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 22 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 24 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 29 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 29 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 29 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 29 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 29 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 35 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 35 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 41 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 42 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 42 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 43 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 43 + }, + { + "caller": "zscore", + "callee": "((x - x.mean()) / (x.std() + 1e-8)).astype", + "lineNumber": 48 + }, + { + "caller": "zscore", + "callee": "x.mean", + "lineNumber": 48 + }, + { + "caller": "zscore", + "callee": "x.std", + "lineNumber": 48 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.zeros", + "lineNumber": 52 + }, + { + "caller": "fit_lgb_oof", + "callee": "len", + "lineNumber": 52 + }, + { + "caller": "fit_lgb_oof", + "callee": "StratifiedKFold", + "lineNumber": 53 + }, + { + "caller": "fit_lgb_oof", + "callee": "enumerate", + "lineNumber": 54 + }, + { + "caller": "fit_lgb_oof", + "callee": "skf.split", + "lineNumber": 54 + }, + { + "caller": "fit_lgb_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 55 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.fit", + "lineNumber": 68 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba", + "lineNumber": 69 + }, + { + "caller": "small_configs", + "callee": "RWConfig", + "lineNumber": 89 + }, + { + "caller": "small_configs", + "callee": "RWConfig", + "lineNumber": 90 + }, + { + "caller": "small_configs", + "callee": "RWConfig", + "lineNumber": 91 + }, + { + "caller": "small_configs", + "callee": "RWConfig", + "lineNumber": 92 + }, + { + "caller": "small_configs", + "callee": "RWConfig", + "lineNumber": 93 + }, + { + "caller": "small_configs", + "callee": "RWConfig", + "lineNumber": 94 + }, + { + "caller": "graph_configs", + "callee": "RWConfig", + "lineNumber": 100 + }, + { + "caller": "graph_configs", + "callee": "RWConfig", + "lineNumber": 101 + }, + { + "caller": "graph_configs", + "callee": "RWConfig", + "lineNumber": 102 + }, + { + "caller": "graph_configs", + "callee": "RWConfig", + "lineNumber": 103 + }, + { + "caller": "extra_configs", + "callee": "RWConfig", + "lineNumber": 109 + }, + { + "caller": "extra_configs", + "callee": "RWConfig", + "lineNumber": 110 + }, + { + "caller": "extra_configs", + "callee": "RWConfig", + "lineNumber": 111 + }, + { + "caller": "extra_configs", + "callee": "RWConfig", + "lineNumber": 112 + }, + { + "caller": "extra_configs", + "callee": "RWConfig", + "lineNumber": 113 + }, + { + "caller": "extra_configs", + "callee": "RWConfig", + "lineNumber": 114 + }, + { + "caller": "build_graph", + "callee": "nx.Graph", + "lineNumber": 120 + }, + { + "caller": "build_graph", + "callee": "G.add_nodes_from", + "lineNumber": 122 + }, + { + "caller": "build_graph", + "callee": "range", + "lineNumber": 122 + }, + { + "caller": "build_graph", + "callee": "G.add_nodes_from", + "lineNumber": 124 + }, + { + "caller": "build_graph", + "callee": "range", + "lineNumber": 124 + }, + { + "caller": "build_graph", + "callee": "G.add_nodes_from", + "lineNumber": 125 + }, + { + "caller": "build_graph", + "callee": "range", + "lineNumber": 125 + }, + { + "caller": "build_graph", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 128 + }, + { + "caller": "build_graph", + "callee": "G.add_edge", + "lineNumber": 129 + }, + { + "caller": "build_graph", + "callee": "int", + "lineNumber": 129 + }, + { + "caller": "build_graph", + "callee": "int", + "lineNumber": 129 + }, + { + "caller": "build_graph", + "callee": "read_txt", + "lineNumber": 131 + }, + { + "caller": "build_graph", + "callee": "G.add_edge", + "lineNumber": 132 + }, + { + "caller": "build_graph", + "callee": "read_txt", + "lineNumber": 134 + }, + { + "caller": "build_graph", + "callee": "G.add_edge", + "lineNumber": 135 + }, + { + "caller": "deepwalk_walks", + "callee": "np.random.default_rng", + "lineNumber": 140 + }, + { + "caller": "deepwalk_walks", + "callee": "np.array", + "lineNumber": 141 + }, + { + "caller": "deepwalk_walks", + "callee": "list", + "lineNumber": 141 + }, + { + "caller": "deepwalk_walks", + "callee": "G.nodes", + "lineNumber": 141 + }, + { + "caller": "deepwalk_walks", + "callee": "list", + "lineNumber": 142 + }, + { + "caller": "deepwalk_walks", + "callee": "G.neighbors", + "lineNumber": 142 + }, + { + "caller": "deepwalk_walks", + "callee": "G.nodes", + "lineNumber": 142 + }, + { + "caller": "deepwalk_walks", + "callee": "range", + "lineNumber": 144 + }, + { + "caller": "deepwalk_walks", + "callee": "nodes.copy", + "lineNumber": 145 + }, + { + "caller": "deepwalk_walks", + "callee": "rng.shuffle", + "lineNumber": 146 + }, + { + "caller": "deepwalk_walks", + "callee": "range", + "lineNumber": 150 + }, + { + "caller": "deepwalk_walks", + "callee": "int", + "lineNumber": 154 + }, + { + "caller": "deepwalk_walks", + "callee": "rng.integers", + "lineNumber": 154 + }, + { + "caller": "deepwalk_walks", + "callee": "len", + "lineNumber": 154 + }, + { + "caller": "deepwalk_walks", + "callee": "walk.append", + "lineNumber": 155 + }, + { + "caller": "deepwalk_walks", + "callee": "walks.append", + "lineNumber": 156 + }, + { + "caller": "train_model", + "callee": "model_path.exists", + "lineNumber": 162 + }, + { + "caller": "train_model", + "callee": "Word2Vec.load", + "lineNumber": 163 + }, + { + "caller": "train_model", + "callee": "str", + "lineNumber": 163 + }, + { + "caller": "train_model", + "callee": "deepwalk_walks", + "lineNumber": 165 + }, + { + "caller": "train_model", + "callee": "Word2Vec", + "lineNumber": 166 + }, + { + "caller": "train_model", + "callee": "Node2Vec", + "lineNumber": 178 + }, + { + "caller": "train_model", + "callee": "float", + "lineNumber": 183 + }, + { + "caller": "train_model", + "callee": "float", + "lineNumber": 184 + }, + { + "caller": "train_model", + "callee": "n2v.fit", + "lineNumber": 189 + }, + { + "caller": "train_model", + "callee": "model.save", + "lineNumber": 190 + }, + { + "caller": "train_model", + "callee": "str", + "lineNumber": 190 + }, + { + "caller": "embedding_arrays", + "callee": "np.zeros", + "lineNumber": 196 + }, + { + "caller": "embedding_arrays", + "callee": "np.zeros", + "lineNumber": 197 + }, + { + "caller": "embedding_arrays", + "callee": "range", + "lineNumber": 198 + }, + { + "caller": "embedding_arrays", + "callee": "range", + "lineNumber": 202 + }, + { + "caller": "embedding_arrays", + "callee": "np.any", + "lineNumber": 206 + }, + { + "caller": "embedding_arrays", + "callee": "np.abs(avec).sum", + "lineNumber": 206 + }, + { + "caller": "embedding_arrays", + "callee": "np.abs", + "lineNumber": 206 + }, + { + "caller": "embedding_arrays", + "callee": "range", + "lineNumber": 207 + }, + { + "caller": "embedding_arrays", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 208 + }, + { + "caller": "embedding_arrays", + "callee": "author_papers[int(a)].append", + "lineNumber": 209 + }, + { + "caller": "embedding_arrays", + "callee": "int", + "lineNumber": 209 + }, + { + "caller": "embedding_arrays", + "callee": "int", + "lineNumber": 209 + }, + { + "caller": "embedding_arrays", + "callee": "enumerate", + "lineNumber": 210 + }, + { + "caller": "embedding_arrays", + "callee": "pvec[np.asarray(hist, dtype=np.int64)].mean", + "lineNumber": 212 + }, + { + "caller": "embedding_arrays", + "callee": "np.asarray", + "lineNumber": 212 + }, + { + "caller": "pair_feature_block", + "callee": "cache_dir.mkdir", + "lineNumber": 225 + }, + { + "caller": "pair_feature_block", + "callee": "len", + "lineNumber": 226 + }, + { + "caller": "pair_feature_block", + "callee": "int", + "lineNumber": 226 + }, + { + "caller": "pair_feature_block", + "callee": "pairs[:,0].sum", + "lineNumber": 226 + }, + { + "caller": "pair_feature_block", + "callee": "int", + "lineNumber": 226 + }, + { + "caller": "pair_feature_block", + "callee": "pairs[:,1].sum", + "lineNumber": 226 + }, + { + "caller": "pair_feature_block", + "callee": "path.exists", + "lineNumber": 242 + }, + { + "caller": "pair_feature_block", + "callee": "np.load(path)[\"X\"].astype", + "lineNumber": 243 + }, + { + "caller": "pair_feature_block", + "callee": "np.load", + "lineNumber": 243 + }, + { + "caller": "pair_feature_block", + "callee": "embedding_arrays", + "lineNumber": 245 + }, + { + "caller": "pair_feature_block", + "callee": "np.sum(A * P, axis=1).astype", + "lineNumber": 248 + }, + { + "caller": "pair_feature_block", + "callee": "np.sum", + "lineNumber": 248 + }, + { + "caller": "pair_feature_block", + "callee": "(dot / ((np.linalg.norm(A, axis=1) + 1e-8) * (np.linalg.norm(P, axis=1) + 1e-8))).astype", + "lineNumber": 249 + }, + { + "caller": "pair_feature_block", + "callee": "np.linalg.norm", + "lineNumber": 249 + }, + { + "caller": "pair_feature_block", + "callee": "np.linalg.norm", + "lineNumber": 249 + }, + { + "caller": "pair_feature_block", + "callee": "np.mean(A * P, axis=1).astype", + "lineNumber": 250 + }, + { + "caller": "pair_feature_block", + "callee": "np.mean", + "lineNumber": 250 + }, + { + "caller": "pair_feature_block", + "callee": "np.mean(np.abs(A - P), axis=1).astype", + "lineNumber": 251 + }, + { + "caller": "pair_feature_block", + "callee": "np.mean", + "lineNumber": 251 + }, + { + "caller": "pair_feature_block", + "callee": "np.abs", + "lineNumber": 251 + }, + { + "caller": "pair_feature_block", + "callee": "np.sqrt(np.sum((A - P) ** 2, axis=1)).astype", + "lineNumber": 252 + }, + { + "caller": "pair_feature_block", + "callee": "np.sqrt", + "lineNumber": 252 + }, + { + "caller": "pair_feature_block", + "callee": "np.sum", + "lineNumber": 252 + }, + { + "caller": "pair_feature_block", + "callee": "np.zeros", + "lineNumber": 253 + }, + { + "caller": "pair_feature_block", + "callee": "len", + "lineNumber": 253 + }, + { + "caller": "pair_feature_block", + "callee": "np.zeros", + "lineNumber": 254 + }, + { + "caller": "pair_feature_block", + "callee": "len", + "lineNumber": 254 + }, + { + "caller": "pair_feature_block", + "callee": "np.zeros", + "lineNumber": 255 + }, + { + "caller": "pair_feature_block", + "callee": "len", + "lineNumber": 255 + }, + { + "caller": "pair_feature_block", + "callee": "np.zeros", + "lineNumber": 256 + }, + { + "caller": "pair_feature_block", + "callee": "len", + "lineNumber": 256 + }, + { + "caller": "pair_feature_block", + "callee": "pd.DataFrame", + "lineNumber": 257 + }, + { + "caller": "pair_feature_block", + "callee": "np.arange", + "lineNumber": 257 + }, + { + "caller": "pair_feature_block", + "callee": "len", + "lineNumber": 257 + }, + { + "caller": "pair_feature_block", + "callee": "df.groupby", + "lineNumber": 258 + }, + { + "caller": "pair_feature_block", + "callee": "g[\"idx\"].to_numpy", + "lineNumber": 259 + }, + { + "caller": "pair_feature_block", + "callee": "len", + "lineNumber": 260 + }, + { + "caller": "pair_feature_block", + "callee": "np.linspace", + "lineNumber": 261 + }, + { + "caller": "pair_feature_block", + "callee": "np.array", + "lineNumber": 261 + }, + { + "caller": "pair_feature_block", + "callee": "np.argsort", + "lineNumber": 262 + }, + { + "caller": "pair_feature_block", + "callee": "g[\"dot\"].to_numpy", + "lineNumber": 262 + }, + { + "caller": "pair_feature_block", + "callee": "np.argsort", + "lineNumber": 263 + }, + { + "caller": "pair_feature_block", + "callee": "g[\"cos\"].to_numpy", + "lineNumber": 263 + }, + { + "caller": "pair_feature_block", + "callee": "np.arange", + "lineNumber": 264 + }, + { + "caller": "pair_feature_block", + "callee": "np.arange", + "lineNumber": 265 + }, + { + "caller": "pair_feature_block", + "callee": "np.column_stack([dot, cos, had, absdiff, l2, rank01(dot), rank01(cos), dot_ar, cos_ar, dot_pct, cos_pct]).astype", + "lineNumber": 268 + }, + { + "caller": "pair_feature_block", + "callee": "np.column_stack", + "lineNumber": 268 + }, + { + "caller": "pair_feature_block", + "callee": "rank01", + "lineNumber": 268 + }, + { + "caller": "pair_feature_block", + "callee": "rank01", + "lineNumber": 268 + }, + { + "caller": "pair_feature_block", + "callee": "np.savez_compressed", + "lineNumber": 269 + }, + { + "caller": "build_base_features", + "callee": "load_module", + "lineNumber": 274 + }, + { + "caller": "build_base_features", + "callee": "load_module", + "lineNumber": 275 + }, + { + "caller": "build_base_features", + "callee": "load_module", + "lineNumber": 276 + }, + { + "caller": "build_base_features", + "callee": "load_module", + "lineNumber": 277 + }, + { + "caller": "build_base_features", + "callee": "load_module", + "lineNumber": 278 + }, + { + "caller": "build_base_features", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 279 + }, + { + "caller": "build_base_features", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 280 + }, + { + "caller": "build_base_features", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 281 + }, + { + "caller": "build_base_features", + "callee": "np.load(main_score_file).astype", + "lineNumber": 282 + }, + { + "caller": "build_base_features", + "callee": "np.load", + "lineNumber": 282 + }, + { + "caller": "build_base_features", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 283 + }, + { + "caller": "build_base_features", + "callee": "builder.transform", + "lineNumber": 284 + }, + { + "caller": "build_base_features", + "callee": "np.column_stack(\n [\n stack.add_rank_features(pairs, main),\n Xh,\n post.negative_evidence_features(Xh, main),\n gen.topk_content_similarity_fast(root, pairs, builder),\n ]\n ).astype", + "lineNumber": 285 + }, + { + "caller": "build_base_features", + "callee": "np.column_stack", + "lineNumber": 285 + }, + { + "caller": "build_base_features", + "callee": "stack.add_rank_features", + "lineNumber": 287 + }, + { + "caller": "build_base_features", + "callee": "post.negative_evidence_features", + "lineNumber": 289 + }, + { + "caller": "build_base_features", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 290 + }, + { + "caller": "build_base_features", + "callee": "Path", + "lineNumber": 293 + }, + { + "caller": "build_base_features", + "callee": "x.strip", + "lineNumber": 293 + }, + { + "caller": "build_base_features", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 293 + }, + { + "caller": "build_base_features", + "callee": "(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"post95_submission\" / \"selected_variant_val_scores.txt\").read_text", + "lineNumber": 293 + }, + { + "caller": "build_base_features", + "callee": "x.strip", + "lineNumber": 293 + }, + { + "caller": "build_base_features", + "callee": "np.column_stack([X, gen.variant_feature_matrix(post, [np.load(p).astype(np.float32) for p in selected])]).astype", + "lineNumber": 294 + }, + { + "caller": "build_base_features", + "callee": "np.column_stack", + "lineNumber": 294 + }, + { + "caller": "build_base_features", + "callee": "gen.variant_feature_matrix", + "lineNumber": 294 + }, + { + "caller": "build_base_features", + "callee": "np.load(p).astype", + "lineNumber": 294 + }, + { + "caller": "build_base_features", + "callee": "np.load", + "lineNumber": 294 + }, + { + "caller": "build_base_features", + "callee": "extra.content_mean_score", + "lineNumber": 295 + }, + { + "caller": "build_base_features", + "callee": "np.load(root / \"validation_runs\" / f\"dynamic_seed{split_seed}\" / \"extra_score_sources\" / \"val_mf_bpr_s202_d256.npy\").astype", + "lineNumber": 296 + }, + { + "caller": "build_base_features", + "callee": "np.load", + "lineNumber": 296 + }, + { + "caller": "build_base_features", + "callee": "extra.score_to_features", + "lineNumber": 297 + }, + { + "caller": "build_base_features", + "callee": "extra.score_to_features", + "lineNumber": 298 + }, + { + "caller": "build_base_features", + "callee": "np.column_stack([X, Xc, Xm]).astype", + "lineNumber": 299 + }, + { + "caller": "build_base_features", + "callee": "np.column_stack", + "lineNumber": 299 + }, + { + "caller": "train_full_predict", + "callee": "lgb.LGBMClassifier", + "lineNumber": 304 + }, + { + "caller": "train_full_predict", + "callee": "clf.fit", + "lineNumber": 316 + }, + { + "caller": "train_full_predict", + "callee": "clf.predict_proba(X_test)[:, 1].astype", + "lineNumber": 317 + }, + { + "caller": "train_full_predict", + "callee": "clf.predict_proba", + "lineNumber": 317 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 321 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 322 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 322 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 322 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 323 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 324 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 325 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 326 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 327 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 328 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 329 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 334 + }, + { + "caller": "main", + "callee": "model_dir.mkdir", + "lineNumber": 335 + }, + { + "caller": "main", + "callee": "build_base_features", + "lineNumber": 337 + }, + { + "caller": "main", + "callee": "small_configs", + "lineNumber": 338 + }, + { + "caller": "main", + "callee": "graph_configs", + "lineNumber": 338 + }, + { + "caller": "main", + "callee": "pd.read_csv(current_best)[\"Predicted\"].to_numpy", + "lineNumber": 341 + }, + { + "caller": "main", + "callee": "pd.read_csv", + "lineNumber": 341 + }, + { + "caller": "main", + "callee": "current_best.exists", + "lineNumber": 341 + }, + { + "caller": "main", + "callee": "np.load(root / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 342 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 342 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 343 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 343 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 350 + }, + { + "caller": "main", + "callee": "build_graph", + "lineNumber": 351 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 352 + }, + { + "caller": "main", + "callee": "G.number_of_nodes", + "lineNumber": 352 + }, + { + "caller": "main", + "callee": "G.number_of_edges", + "lineNumber": 352 + }, + { + "caller": "main", + "callee": "train_model", + "lineNumber": 353 + }, + { + "caller": "main", + "callee": "pair_feature_block", + "lineNumber": 354 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, block]).astype", + "lineNumber": 355 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 355 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 356 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 356 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 357 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 358 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 362 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 379 + }, + { + "caller": "main", + "callee": "feature_blocks.append", + "lineNumber": 384 + }, + { + "caller": "main", + "callee": "feature_names.append", + "lineNumber": 385 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 386 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 386 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 387 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 388 + }, + { + "caller": "main", + "callee": "result.to_string", + "lineNumber": 388 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 391 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 391 + }, + { + "caller": "main", + "callee": "result.index[: min(5, len(result))].to_list", + "lineNumber": 392 + }, + { + "caller": "main", + "callee": "min", + "lineNumber": 392 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 392 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 397 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 398 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 399 + }, + { + "caller": "main", + "callee": "(ar_stack >= 0.5).sum(axis=0).astype", + "lineNumber": 400 + }, + { + "caller": "main", + "callee": "(ar_stack >= 0.5).sum", + "lineNumber": 400 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n cos_stack.mean(axis=0),\n cos_stack.std(axis=0),\n cos_stack.max(axis=0),\n cos_stack.min(axis=0),\n dot_stack.mean(axis=0),\n dot_stack.std(axis=0),\n ar_stack.mean(axis=0),\n ar_stack.std(axis=0),\n ar_stack.max(axis=0),\n agree,\n ]\n ).astype", + "lineNumber": 401 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 401 + }, + { + "caller": "main", + "callee": "cos_stack.mean", + "lineNumber": 403 + }, + { + "caller": "main", + "callee": "cos_stack.std", + "lineNumber": 404 + }, + { + "caller": "main", + "callee": "cos_stack.max", + "lineNumber": 405 + }, + { + "caller": "main", + "callee": "cos_stack.min", + "lineNumber": 406 + }, + { + "caller": "main", + "callee": "dot_stack.mean", + "lineNumber": 407 + }, + { + "caller": "main", + "callee": "dot_stack.std", + "lineNumber": 408 + }, + { + "caller": "main", + "callee": "ar_stack.mean", + "lineNumber": 409 + }, + { + "caller": "main", + "callee": "ar_stack.std", + "lineNumber": 410 + }, + { + "caller": "main", + "callee": "ar_stack.max", + "lineNumber": 411 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, *blocks, agg]).astype", + "lineNumber": 415 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 415 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 416 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 417 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 418 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 420 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 435 + }, + { + "caller": "main", + "callee": "pd.concat([result, pd.DataFrame([ens_row])], ignore_index=True).sort_values", + "lineNumber": 439 + }, + { + "caller": "main", + "callee": "pd.concat", + "lineNumber": 439 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 439 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 440 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 441 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 442 + }, + { + "caller": "main", + "callee": "result.to_string", + "lineNumber": 442 + } + ], + "metrics": { + "importCount": 5, + "exportCount": 18, + "functionCount": 17, + "classCount": 1 + } + }, + { + "path": "code/rich_randomwalk_stack.py", + "language": "python", + "fileCategory": "code", + "totalLines": 189, + "nonEmptyLines": 167, + "functions": [ + { + "name": "load_module", + "startLine": 18, + "endLine": 24, + "params": [ + "name", + "path" + ] + }, + { + "name": "best_f1", + "startLine": 27, + "endLine": 32, + "params": [ + "y", + "s" + ] + }, + { + "name": "fit_lgb_oof", + "startLine": 35, + "endLine": 54, + "params": [ + "X", + "y", + "seed", + "n_splits", + "leaves" + ] + }, + { + "name": "fit_full_predict", + "startLine": 57, + "endLine": 72, + "params": [ + "X", + "y", + "Xt", + "seed", + "leaves" + ] + }, + { + "name": "write_sub", + "startLine": 75, + "endLine": 80, + "params": [ + "path", + "score", + "known", + "anchor", + "ratio" + ] + }, + { + "name": "main", + "startLine": 83, + "endLine": 185, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 18, + "isDefault": false + }, + { + "name": "best_f1", + "line": 27, + "isDefault": false + }, + { + "name": "fit_lgb_oof", + "line": 35, + "isDefault": false + }, + { + "name": "fit_full_predict", + "line": 57, + "isDefault": false + }, + { + "name": "write_sub", + "line": 75, + "isDefault": false + }, + { + "name": "main", + "line": 83, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 19 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 20 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 23 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 31 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 31 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 32 + }, + { + "caller": "fit_lgb_oof", + "callee": "np.zeros", + "lineNumber": 36 + }, + { + "caller": "fit_lgb_oof", + "callee": "len", + "lineNumber": 36 + }, + { + "caller": "fit_lgb_oof", + "callee": "StratifiedKFold", + "lineNumber": 37 + }, + { + "caller": "fit_lgb_oof", + "callee": "enumerate", + "lineNumber": 38 + }, + { + "caller": "fit_lgb_oof", + "callee": "skf.split", + "lineNumber": 38 + }, + { + "caller": "fit_lgb_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 39 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.fit", + "lineNumber": 52 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba(X[va])[:, 1].astype", + "lineNumber": 53 + }, + { + "caller": "fit_lgb_oof", + "callee": "clf.predict_proba", + "lineNumber": 53 + }, + { + "caller": "fit_full_predict", + "callee": "lgb.LGBMClassifier", + "lineNumber": 58 + }, + { + "caller": "fit_full_predict", + "callee": "clf.fit", + "lineNumber": 71 + }, + { + "caller": "fit_full_predict", + "callee": "clf.predict_proba(Xt)[:, 1].astype", + "lineNumber": 72 + }, + { + "caller": "fit_full_predict", + "callee": "clf.predict_proba", + "lineNumber": 72 + }, + { + "caller": "write_sub", + "callee": "np.zeros", + "lineNumber": 76 + }, + { + "caller": "write_sub", + "callee": "len", + "lineNumber": 76 + }, + { + "caller": "write_sub", + "callee": "np.argsort", + "lineNumber": 77 + }, + { + "caller": "write_sub", + "callee": "int", + "lineNumber": 77 + }, + { + "caller": "write_sub", + "callee": "round", + "lineNumber": 77 + }, + { + "caller": "write_sub", + "callee": "len", + "lineNumber": 77 + }, + { + "caller": "write_sub", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 79 + }, + { + "caller": "write_sub", + "callee": "pd.DataFrame", + "lineNumber": 79 + }, + { + "caller": "write_sub", + "callee": "np.arange", + "lineNumber": 79 + }, + { + "caller": "write_sub", + "callee": "len", + "lineNumber": 79 + }, + { + "caller": "write_sub", + "callee": "float", + "lineNumber": 80 + }, + { + "caller": "write_sub", + "callee": "pred.mean", + "lineNumber": 80 + }, + { + "caller": "write_sub", + "callee": "int", + "lineNumber": 80 + }, + { + "caller": "write_sub", + "callee": "(pred != anchor).sum", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 88 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 89 + }, + { + "caller": "main", + "callee": "ap.parse_args", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "args.package_root.resolve", + "lineNumber": 92 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 96 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 97 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 98 + }, + { + "caller": "main", + "callee": "out.mkdir", + "lineNumber": 102 + }, + { + "caller": "main", + "callee": "sub_dir.mkdir", + "lineNumber": 103 + }, + { + "caller": "main", + "callee": "rw.small_configs", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "rw.graph_configs", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "rw.extra_configs", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "rw.build_base_features", + "lineNumber": 116 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 117 + }, + { + "caller": "main", + "callee": "rich.content_rich_features", + "lineNumber": 118 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "blocks.append", + "lineNumber": 124 + }, + { + "caller": "main", + "callee": "np.column_stack([X_base, X_rich, *blocks, ens.aggregate(blocks)]).astype", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "ens.aggregate", + "lineNumber": 125 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 126 + }, + { + "caller": "main", + "callee": "fit_lgb_oof", + "lineNumber": 130 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 131 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 132 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 133 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values(\"validation_f1\", ascending=False).to_csv", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "max", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "best[\"stage\"].split", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs/dynamic_seed202/post95_test_scores/dyn202_l2d512_bpr_bigbatch_more/scores/test_vanilla_ensemble_mean.npy\").astype", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 142 + }, + { + "caller": "main", + "callee": "gen.read_txt", + "lineNumber": 142 + }, + { + "caller": "main", + "callee": "stack.ExplicitGraphFeatures", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "test_builder.transform", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 145 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 146 + }, + { + "caller": "main", + "callee": "np.column_stack(\n [\n stack.add_rank_features(test_pairs, main_test),\n Xht,\n post.negative_evidence_features(Xht, main_test),\n gen.topk_content_similarity_fast(root, test_pairs, test_builder),\n ]\n ).astype", + "lineNumber": 147 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 147 + }, + { + "caller": "main", + "callee": "stack.add_rank_features", + "lineNumber": 149 + }, + { + "caller": "main", + "callee": "post.negative_evidence_features", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "gen.topk_content_similarity_fast", + "lineNumber": 152 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 155 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 155 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs/dynamic_seed202/post95_submission/selected_variant_val_scores.txt\").read_text().splitlines", + "lineNumber": 155 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs/dynamic_seed202/post95_submission/selected_variant_val_scores.txt\").read_text", + "lineNumber": 155 + }, + { + "caller": "main", + "callee": "x.strip", + "lineNumber": 155 + }, + { + "caller": "main", + "callee": "p.resolve().relative_to", + "lineNumber": 158 + }, + { + "caller": "main", + "callee": "p.resolve", + "lineNumber": 158 + }, + { + "caller": "main", + "callee": "rel.name.replace", + "lineNumber": 159 + }, + { + "caller": "main", + "callee": "test_scores.append", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "np.load(tp).astype", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "np.column_stack([Xt, gen.variant_feature_matrix(post, test_scores)]).astype", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "gen.variant_feature_matrix", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "extra.content_mean_score", + "lineNumber": 162 + }, + { + "caller": "main", + "callee": "np.load(root / \"validation_runs/dynamic_seed202/extra_bprmf_submission/test_mf_bpr_dynamic_s202_d256_e220.npy\").astype", + "lineNumber": 163 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 163 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 164 + }, + { + "caller": "main", + "callee": "extra.score_to_features", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "np.column_stack([Xt, Xct, Xmt, rich.content_rich_features(root, test_pairs, test_builder)]).astype", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "rich.content_rich_features", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "Word2Vec.load", + "lineNumber": 170 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 170 + }, + { + "caller": "main", + "callee": "rw.pair_feature_block", + "lineNumber": 171 + }, + { + "caller": "main", + "callee": "test_blocks.append", + "lineNumber": 172 + }, + { + "caller": "main", + "callee": "np.column_stack([Xt, *test_blocks, ens.aggregate(test_blocks)]).astype", + "lineNumber": 173 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 173 + }, + { + "caller": "main", + "callee": "ens.aggregate", + "lineNumber": 173 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 174 + }, + { + "caller": "main", + "callee": "fit_full_predict", + "lineNumber": 175 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 176 + }, + { + "caller": "main", + "callee": "np.load(root / \"cached_scores/test_known_mask.npy\").astype", + "lineNumber": 177 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 177 + }, + { + "caller": "main", + "callee": "pd.read_csv(root / \"validation_runs/dynamic_seed202/node2vec_deepwalk_submission/submission_content_mf_deepwalk_node2vec_lgb_th0.480000.csv\")[\"Predicted\"].to_numpy", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "pd.read_csv", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "(np.load(out / f\"{best['stage']}_oof.npy\") >= best[\"threshold\"]).mean", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "write_sub", + "lineNumber": 182 + }, + { + "caller": "main", + "callee": "sub_rows.append", + "lineNumber": 183 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 183 + }, + { + "caller": "main", + "callee": "pd.DataFrame(sub_rows).to_csv", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "pd.DataFrame(sub_rows).to_string", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 185 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 6, + "functionCount": 6, + "classCount": 0 + } + }, + { + "path": "code/run_baseline.py", + "language": "python", + "fileCategory": "code", + "totalLines": 352, + "nonEmptyLines": 282, + "functions": [ + { + "name": "set_seed", + "startLine": 21, + "endLine": 26, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 41, + "endLine": 46, + "params": [ + "file" + ] + }, + { + "name": "sample_negative_edges", + "startLine": 249, + "endLine": 260, + "params": [ + "num_samples", + "num_authors", + "num_papers", + "existing_edges", + "device" + ] + }, + { + "name": "cos_sim", + "startLine": 311, + "endLine": 312, + "params": [ + "a", + "b", + "eps" + ] + } + ], + "classes": [ + { + "name": "HeteroMeanConv", + "startLine": 156, + "endLine": 206, + "methods": [ + "__init__", + "_key", + "reset_parameters", + "forward" + ], + "properties": [] + }, + { + "name": "HeteroRecommender", + "startLine": 209, + "endLine": 246, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 21, + "isDefault": false + }, + { + "name": "read_txt", + "line": 41, + "isDefault": false + }, + { + "name": "HeteroMeanConv", + "line": 156, + "isDefault": false + }, + { + "name": "HeteroRecommender", + "line": 209, + "isDefault": false + }, + { + "name": "sample_negative_edges", + "line": 249, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 311, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 22 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 23 + }, + { + "caller": "set_seed", + "callee": "torch.manual_seed", + "lineNumber": 24 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.is_available", + "lineNumber": 25 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.manual_seed_all", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "open", + "lineNumber": 43 + }, + { + "caller": "read_txt", + "callee": "res_list.append", + "lineNumber": 45 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 45 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 45 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 45 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 45 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 158 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 158 + }, + { + "caller": "__init__", + "callee": "list", + "lineNumber": 160 + }, + { + "caller": "__init__", + "callee": "list", + "lineNumber": 161 + }, + { + "caller": "__init__", + "callee": "nn.ModuleDict", + "lineNumber": 162 + }, + { + "caller": "__init__", + "callee": "self._key", + "lineNumber": 163 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 163 + }, + { + "caller": "__init__", + "callee": "nn.ModuleDict", + "lineNumber": 166 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 167 + }, + { + "caller": "_key", + "callee": "'__'.join", + "lineNumber": 173 + }, + { + "caller": "reset_parameters", + "callee": "self.rel_lins.values", + "lineNumber": 176 + }, + { + "caller": "reset_parameters", + "callee": "layer.reset_parameters", + "lineNumber": 177 + }, + { + "caller": "reset_parameters", + "callee": "self.self_lins.values", + "lineNumber": 178 + }, + { + "caller": "reset_parameters", + "callee": "layer.reset_parameters", + "lineNumber": 179 + }, + { + "caller": "forward", + "callee": "edge_index_dict.items", + "lineNumber": 188 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 192 + }, + { + "caller": "forward", + "callee": "src_x.size", + "lineNumber": 192 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 193 + }, + { + "caller": "forward", + "callee": "agg.index_add_", + "lineNumber": 194 + }, + { + "caller": "forward", + "callee": "deg.index_add_", + "lineNumber": 195 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 197 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 197 + }, + { + "caller": "forward", + "callee": "deg.clamp", + "lineNumber": 199 + }, + { + "caller": "forward", + "callee": "self._key", + "lineNumber": 200 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 211 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 211 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 212 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 213 + }, + { + "caller": "__init__", + "callee": "HeteroMeanConv", + "lineNumber": 216 + }, + { + "caller": "__init__", + "callee": "HeteroMeanConv", + "lineNumber": 221 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 226 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 229 + }, + { + "caller": "reset_parameters", + "callee": "self.paper_lin.reset_parameters", + "lineNumber": 230 + }, + { + "caller": "reset_parameters", + "callee": "self.conv1.reset_parameters", + "lineNumber": 231 + }, + { + "caller": "reset_parameters", + "callee": "self.conv2.reset_parameters", + "lineNumber": 232 + }, + { + "caller": "encode", + "callee": "self.paper_lin", + "lineNumber": 237 + }, + { + "caller": "encode", + "callee": "self.conv1", + "lineNumber": 239 + }, + { + "caller": "encode", + "callee": "F.relu", + "lineNumber": 240 + }, + { + "caller": "encode", + "callee": "x_dict.items", + "lineNumber": 240 + }, + { + "caller": "encode", + "callee": "self.conv2", + "lineNumber": 241 + }, + { + "caller": "decode", + "callee": "(z_dict['author'][src] * z_dict['paper'][dst]).sum", + "lineNumber": 246 + }, + { + "caller": "sample_negative_edges", + "callee": "len", + "lineNumber": 251 + }, + { + "caller": "sample_negative_edges", + "callee": "len", + "lineNumber": 252 + }, + { + "caller": "sample_negative_edges", + "callee": "torch.randint", + "lineNumber": 253 + }, + { + "caller": "sample_negative_edges", + "callee": "torch.randint", + "lineNumber": 254 + }, + { + "caller": "sample_negative_edges", + "callee": "zip", + "lineNumber": 255 + }, + { + "caller": "sample_negative_edges", + "callee": "src.tolist", + "lineNumber": 255 + }, + { + "caller": "sample_negative_edges", + "callee": "dst.tolist", + "lineNumber": 255 + }, + { + "caller": "sample_negative_edges", + "callee": "neg_edges.append", + "lineNumber": 257 + }, + { + "caller": "sample_negative_edges", + "callee": "len", + "lineNumber": 258 + }, + { + "caller": "sample_negative_edges", + "callee": "torch.tensor(neg_edges, dtype=torch.long, device=device).t().contiguous", + "lineNumber": 260 + }, + { + "caller": "sample_negative_edges", + "callee": "torch.tensor(neg_edges, dtype=torch.long, device=device).t", + "lineNumber": 260 + }, + { + "caller": "sample_negative_edges", + "callee": "torch.tensor", + "lineNumber": 260 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 312 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 312 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 312 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 6, + "functionCount": 4, + "classCount": 2 + } + }, + { + "path": "code/run_final.py", + "language": "python", + "fileCategory": "code", + "totalLines": 494, + "nonEmptyLines": 403, + "functions": [ + { + "name": "set_seed", + "startLine": 30, + "endLine": 35, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 42, + "endLine": 47, + "params": [ + "file" + ] + }, + { + "name": "log_norm", + "startLine": 91, + "endLine": 93, + "params": [ + "x" + ] + }, + { + "name": "build_data", + "startLine": 154, + "endLine": 177, + "params": [ + "ref_edges_use", + "num_a", + "num_p", + "paper_feat", + "device" + ] + }, + { + "name": "sample_hard_negatives", + "startLine": 269, + "endLine": 306, + "params": [ + "n_samples", + "existing_set", + "device" + ] + }, + { + "name": "cos_sim", + "startLine": 310, + "endLine": 311, + "params": [ + "a", + "b", + "eps" + ] + }, + { + "name": "evaluate", + "startLine": 315, + "endLine": 331, + "params": [ + "model", + "data", + "val_df" + ] + }, + { + "name": "predict_cos_batched", + "startLine": 335, + "endLine": 348, + "params": [ + "model", + "data", + "test_pairs", + "batch_size" + ] + }, + { + "name": "train_model", + "startLine": 352, + "endLine": 427, + "params": [ + "seed", + "embed_dim", + "num_layers", + "lr", + "num_epochs", + "use_full_data" + ] + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "startLine": 181, + "endLine": 220, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "LightGCNRecommender", + "startLine": 223, + "endLine": 265, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 30, + "isDefault": false + }, + { + "name": "read_txt", + "line": 42, + "isDefault": false + }, + { + "name": "log_norm", + "line": 91, + "isDefault": false + }, + { + "name": "build_data", + "line": 154, + "isDefault": false + }, + { + "name": "LightGCNLayer", + "line": 181, + "isDefault": false + }, + { + "name": "LightGCNRecommender", + "line": 223, + "isDefault": false + }, + { + "name": "sample_hard_negatives", + "line": 269, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 310, + "isDefault": false + }, + { + "name": "evaluate", + "line": 314, + "isDefault": false + }, + { + "name": "predict_cos_batched", + "line": 334, + "isDefault": false + }, + { + "name": "train_model", + "line": 352, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 31 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 32 + }, + { + "caller": "set_seed", + "callee": "torch.manual_seed", + "lineNumber": 33 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.is_available", + "lineNumber": 34 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.manual_seed_all", + "lineNumber": 35 + }, + { + "caller": "read_txt", + "callee": "open", + "lineNumber": 44 + }, + { + "caller": "read_txt", + "callee": "res_list.append", + "lineNumber": 46 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 46 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 46 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 46 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 46 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 92 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 93 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 93 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 156 + }, + { + "caller": "build_data", + "callee": "ref_edges_use[['source', 'target']].to_numpy", + "lineNumber": 157 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 158 + }, + { + "caller": "build_data", + "callee": "cite_edges[['source', 'target']].to_numpy", + "lineNumber": 159 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 160 + }, + { + "caller": "build_data", + "callee": "coauthor_edges[['source', 'target']].to_numpy", + "lineNumber": 161 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 163 + }, + { + "caller": "build_data", + "callee": "HeteroData", + "lineNumber": 165 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t().contiguous", + "lineNumber": 169 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t", + "lineNumber": 169 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t().contiguous", + "lineNumber": 170 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t", + "lineNumber": 170 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n cite_tensor, cite_tensor[:, [1, 0]],\n ], dim=0).t().contiguous", + "lineNumber": 171 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n cite_tensor, cite_tensor[:, [1, 0]],\n ], dim=0).t", + "lineNumber": 171 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 171 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n coauthor_tensor, coauthor_tensor[:, [1, 0]],\n ], dim=0).t().contiguous", + "lineNumber": 174 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n coauthor_tensor, coauthor_tensor[:, [1, 0]],\n ], dim=0).t", + "lineNumber": 174 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 174 + }, + { + "caller": "build_data", + "callee": "d.to", + "lineNumber": 177 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 185 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 185 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 207 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 207 + }, + { + "caller": "forward", + "callee": "src_x.size", + "lineNumber": 207 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 208 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 208 + }, + { + "caller": "forward", + "callee": "agg.index_add_", + "lineNumber": 209 + }, + { + "caller": "forward", + "callee": "deg.index_add_", + "lineNumber": 210 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 210 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 211 + }, + { + "caller": "forward", + "callee": "deg.clamp", + "lineNumber": 212 + }, + { + "caller": "forward", + "callee": "agg_dict[dst_type].append", + "lineNumber": 213 + }, + { + "caller": "forward", + "callee": "sum", + "lineNumber": 217 + }, + { + "caller": "forward", + "callee": "len", + "lineNumber": 217 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 227 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 227 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 228 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 229 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 231 + }, + { + "caller": "__init__", + "callee": "LightGCNLayer", + "lineNumber": 232 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 232 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 234 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 237 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 238 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.zeros_", + "lineNumber": 239 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 244 + }, + { + "caller": "encode", + "callee": "layer", + "lineNumber": 249 + }, + { + "caller": "encode", + "callee": "all_layers.append", + "lineNumber": 250 + }, + { + "caller": "encode", + "callee": "torch.tensor", + "lineNumber": 253 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 258 + }, + { + "caller": "encode", + "callee": "zip", + "lineNumber": 258 + }, + { + "caller": "decode", + "callee": "(z_dict['author'][src] * z_dict['paper'][dst]).sum", + "lineNumber": 265 + }, + { + "caller": "add_random", + "callee": "len", + "lineNumber": 274 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 275 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 276 + }, + { + "caller": "add_random", + "callee": "neg_list.append", + "lineNumber": 278 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 281 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 281 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 285 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 286 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 288 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 289 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 289 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 291 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 295 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 297 + }, + { + "caller": "sample_hard_negatives", + "callee": "coauthor_paper_pool.get", + "lineNumber": 298 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 300 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 300 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 302 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 304 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long,\n device=device).t().contiguous", + "lineNumber": 305 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long,\n device=device).t", + "lineNumber": 305 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor", + "lineNumber": 305 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 311 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 311 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 311 + }, + { + "caller": "evaluate", + "callee": "model.eval", + "lineNumber": 316 + }, + { + "caller": "evaluate", + "callee": "model.encode", + "lineNumber": 317 + }, + { + "caller": "evaluate", + "callee": "v.cpu", + "lineNumber": 318 + }, + { + "caller": "evaluate", + "callee": "z_dict.items", + "lineNumber": 318 + }, + { + "caller": "evaluate", + "callee": "val_df[['source', 'target']].to_numpy", + "lineNumber": 319 + }, + { + "caller": "evaluate", + "callee": "cos_sim", + "lineNumber": 320 + }, + { + "caller": "evaluate", + "callee": "z_cpu['author'][val_arr[:, 0]].numpy", + "lineNumber": 321 + }, + { + "caller": "evaluate", + "callee": "z_cpu['paper'][val_arr[:, 1]].numpy", + "lineNumber": 322 + }, + { + "caller": "evaluate", + "callee": "val_df['label'].to_numpy", + "lineNumber": 324 + }, + { + "caller": "evaluate", + "callee": "precision_recall_curve", + "lineNumber": 325 + }, + { + "caller": "evaluate", + "callee": "np.argmax", + "lineNumber": 327 + }, + { + "caller": "evaluate", + "callee": "len", + "lineNumber": 328 + }, + { + "caller": "evaluate", + "callee": "roc_auc_score", + "lineNumber": 330 + }, + { + "caller": "predict_cos_batched", + "callee": "model.eval", + "lineNumber": 336 + }, + { + "caller": "predict_cos_batched", + "callee": "model.encode", + "lineNumber": 337 + }, + { + "caller": "predict_cos_batched", + "callee": "v.cpu", + "lineNumber": 338 + }, + { + "caller": "predict_cos_batched", + "callee": "z_dict.items", + "lineNumber": 338 + }, + { + "caller": "predict_cos_batched", + "callee": "range", + "lineNumber": 340 + }, + { + "caller": "predict_cos_batched", + "callee": "len", + "lineNumber": 340 + }, + { + "caller": "predict_cos_batched", + "callee": "min", + "lineNumber": 341 + }, + { + "caller": "predict_cos_batched", + "callee": "len", + "lineNumber": 341 + }, + { + "caller": "predict_cos_batched", + "callee": "cos_sim", + "lineNumber": 343 + }, + { + "caller": "predict_cos_batched", + "callee": "z_cpu['author'][batch[:, 0]].numpy", + "lineNumber": 344 + }, + { + "caller": "predict_cos_batched", + "callee": "z_cpu['paper'][batch[:, 1]].numpy", + "lineNumber": 345 + }, + { + "caller": "predict_cos_batched", + "callee": "all_scores.append", + "lineNumber": 347 + }, + { + "caller": "predict_cos_batched", + "callee": "np.concatenate", + "lineNumber": 348 + }, + { + "caller": "train_model", + "callee": "set_seed", + "lineNumber": 354 + }, + { + "caller": "train_model", + "callee": "build_data", + "lineNumber": 361 + }, + { + "caller": "train_model", + "callee": "LightGCNRecommender(\n data_local.metadata(),\n paper_in_dim=paper_feat_aug.shape[1],\n embed_dim=embed_dim,\n num_layers=num_layers,\n ).to", + "lineNumber": 364 + }, + { + "caller": "train_model", + "callee": "LightGCNRecommender", + "lineNumber": 364 + }, + { + "caller": "train_model", + "callee": "data_local.metadata", + "lineNumber": 365 + }, + { + "caller": "train_model", + "callee": "torch.optim.Adam", + "lineNumber": 371 + }, + { + "caller": "train_model", + "callee": "model.parameters", + "lineNumber": 371 + }, + { + "caller": "train_model", + "callee": "set", + "lineNumber": 373 + }, + { + "caller": "train_model", + "callee": "map", + "lineNumber": 374 + }, + { + "caller": "train_model", + "callee": "train_edges[['source', 'target']].to_numpy().tolist", + "lineNumber": 374 + }, + { + "caller": "train_model", + "callee": "train_edges[['source', 'target']].to_numpy", + "lineNumber": 374 + }, + { + "caller": "train_model", + "callee": "min", + "lineNumber": 376 + }, + { + "caller": "train_model", + "callee": "pos_edge_index.size", + "lineNumber": 376 + }, + { + "caller": "train_model", + "callee": "range", + "lineNumber": 383 + }, + { + "caller": "train_model", + "callee": "model.train", + "lineNumber": 384 + }, + { + "caller": "train_model", + "callee": "torch.randperm", + "lineNumber": 386 + }, + { + "caller": "train_model", + "callee": "pos_edge_index.size", + "lineNumber": 386 + }, + { + "caller": "train_model", + "callee": "sample_hard_negatives", + "lineNumber": 388 + }, + { + "caller": "train_model", + "callee": "pos_batch.size", + "lineNumber": 389 + }, + { + "caller": "train_model", + "callee": "model.encode", + "lineNumber": 391 + }, + { + "caller": "train_model", + "callee": "model.decode", + "lineNumber": 392 + }, + { + "caller": "train_model", + "callee": "model.decode", + "lineNumber": 393 + }, + { + "caller": "train_model", + "callee": "pos_score.repeat_interleave", + "lineNumber": 396 + }, + { + "caller": "train_model", + "callee": "F.logsigmoid(pos_score - neg_score).mean", + "lineNumber": 397 + }, + { + "caller": "train_model", + "callee": "F.logsigmoid", + "lineNumber": 397 + }, + { + "caller": "train_model", + "callee": "optimizer.zero_grad", + "lineNumber": 399 + }, + { + "caller": "train_model", + "callee": "loss.backward", + "lineNumber": 400 + }, + { + "caller": "train_model", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 401 + }, + { + "caller": "train_model", + "callee": "model.parameters", + "lineNumber": 401 + }, + { + "caller": "train_model", + "callee": "optimizer.step", + "lineNumber": 402 + }, + { + "caller": "train_model", + "callee": "evaluate", + "lineNumber": 405 + }, + { + "caller": "train_model", + "callee": "v.cpu().clone", + "lineNumber": 408 + }, + { + "caller": "train_model", + "callee": "v.cpu", + "lineNumber": 408 + }, + { + "caller": "train_model", + "callee": "model.state_dict().items", + "lineNumber": 409 + }, + { + "caller": "train_model", + "callee": "model.state_dict", + "lineNumber": 409 + }, + { + "caller": "train_model", + "callee": "print", + "lineNumber": 417 + }, + { + "caller": "train_model", + "callee": "loss.item", + "lineNumber": 417 + }, + { + "caller": "train_model", + "callee": "print", + "lineNumber": 421 + }, + { + "caller": "train_model", + "callee": "model.load_state_dict", + "lineNumber": 425 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 11, + "functionCount": 9, + "classCount": 2 + } + }, + { + "path": "code/run_graph_features.py", + "language": "python", + "fileCategory": "code", + "totalLines": 315, + "nonEmptyLines": 251, + "functions": [ + { + "name": "set_seed", + "startLine": 20, + "endLine": 22, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 31, + "endLine": 36, + "params": [ + "file" + ] + }, + { + "name": "log1p_norm", + "startLine": 52, + "endLine": 54, + "params": [ + "x" + ] + }, + { + "name": "compute_features", + "startLine": 115, + "endLine": 178, + "params": [ + "pairs", + "batch_size" + ] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 20, + "isDefault": false + }, + { + "name": "read_txt", + "line": 31, + "isDefault": false + }, + { + "name": "log1p_norm", + "line": 52, + "isDefault": false + }, + { + "name": "compute_features", + "line": 115, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 21 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 22 + }, + { + "caller": "read_txt", + "callee": "open", + "lineNumber": 33 + }, + { + "caller": "read_txt", + "callee": "res_list.append", + "lineNumber": 35 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 35 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 35 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 35 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 35 + }, + { + "caller": "log1p_norm", + "callee": "np.log1p", + "lineNumber": 53 + }, + { + "caller": "log1p_norm", + "callee": "np.clip", + "lineNumber": 54 + }, + { + "caller": "log1p_norm", + "callee": "x.mean", + "lineNumber": 54 + }, + { + "caller": "log1p_norm", + "callee": "x.std", + "lineNumber": 54 + }, + { + "caller": "compute_features", + "callee": "len", + "lineNumber": 117 + }, + { + "caller": "compute_features", + "callee": "range", + "lineNumber": 120 + }, + { + "caller": "compute_features", + "callee": "min", + "lineNumber": 121 + }, + { + "caller": "compute_features", + "callee": "len", + "lineNumber": 125 + }, + { + "caller": "compute_features", + "callee": "np.zeros", + "lineNumber": 127 + }, + { + "caller": "compute_features", + "callee": "np.log1p", + "lineNumber": 140 + }, + { + "caller": "compute_features", + "callee": "np.log1p", + "lineNumber": 141 + }, + { + "caller": "compute_features", + "callee": "np.zeros", + "lineNumber": 148 + }, + { + "caller": "compute_features", + "callee": "range", + "lineNumber": 149 + }, + { + "caller": "compute_features", + "callee": "float", + "lineNumber": 150 + }, + { + "caller": "compute_features", + "callee": "coauthor_papers_set.get", + "lineNumber": 150 + }, + { + "caller": "compute_features", + "callee": "set", + "lineNumber": 150 + }, + { + "caller": "compute_features", + "callee": "np.array", + "lineNumber": 154 + }, + { + "caller": "compute_features", + "callee": "len", + "lineNumber": 154 + }, + { + "caller": "compute_features", + "callee": "coauthor_set.get", + "lineNumber": 154 + }, + { + "caller": "compute_features", + "callee": "set", + "lineNumber": 154 + }, + { + "caller": "compute_features", + "callee": "np.sum", + "lineNumber": 163 + }, + { + "caller": "compute_features", + "callee": "(author_deg[authors] <= 5).astype", + "lineNumber": 169 + }, + { + "caller": "compute_features", + "callee": "(paper_deg[papers] <= 3).astype", + "lineNumber": 170 + }, + { + "caller": "compute_features", + "callee": "np.abs", + "lineNumber": 174 + }, + { + "caller": "compute_features", + "callee": "all_feats.append", + "lineNumber": 176 + }, + { + "caller": "compute_features", + "callee": "np.vstack", + "lineNumber": 178 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 4, + "functionCount": 4, + "classCount": 0 + } + }, + { + "path": "code/run_improved.py", + "language": "python", + "fileCategory": "code", + "totalLines": 596, + "nonEmptyLines": 499, + "functions": [ + { + "name": "set_seed", + "startLine": 32, + "endLine": 37, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 44, + "endLine": 49, + "params": [ + "file" + ] + }, + { + "name": "log_norm", + "startLine": 103, + "endLine": 105, + "params": [ + "x" + ] + }, + { + "name": "sample_hard_negatives", + "startLine": 322, + "endLine": 368, + "params": [ + "pos_batch_size", + "num_authors", + "num_papers", + "existing_set", + "device", + "pos_src" + ] + }, + { + "name": "run_experiment", + "startLine": 372, + "endLine": 474, + "params": [ + "seed", + "hidden_dim", + "num_layers", + "lr", + "num_epochs", + "use_hard_neg" + ] + }, + { + "name": "evaluate", + "startLine": 478, + "endLine": 500, + "params": [ + "model", + "data", + "val_df", + "device" + ] + }, + { + "name": "predict_all", + "startLine": 524, + "endLine": 539, + "params": [ + "model", + "data", + "test_pairs", + "overlap_set", + "device" + ] + } + ], + "classes": [ + { + "name": "ResidualHeteroConv", + "startLine": 210, + "endLine": 249, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "MLPDecoder", + "startLine": 252, + "endLine": 273, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "ImprovedHeteroGNN", + "startLine": 276, + "endLine": 318, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 32, + "isDefault": false + }, + { + "name": "read_txt", + "line": 44, + "isDefault": false + }, + { + "name": "log_norm", + "line": 103, + "isDefault": false + }, + { + "name": "ResidualHeteroConv", + "line": 210, + "isDefault": false + }, + { + "name": "MLPDecoder", + "line": 252, + "isDefault": false + }, + { + "name": "ImprovedHeteroGNN", + "line": 276, + "isDefault": false + }, + { + "name": "sample_hard_negatives", + "line": 322, + "isDefault": false + }, + { + "name": "run_experiment", + "line": 372, + "isDefault": false + }, + { + "name": "evaluate", + "line": 477, + "isDefault": false + }, + { + "name": "predict_all", + "line": 523, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 33 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 34 + }, + { + "caller": "set_seed", + "callee": "torch.manual_seed", + "lineNumber": 35 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.is_available", + "lineNumber": 36 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.manual_seed_all", + "lineNumber": 37 + }, + { + "caller": "read_txt", + "callee": "open", + "lineNumber": 46 + }, + { + "caller": "read_txt", + "callee": "res_list.append", + "lineNumber": 48 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 48 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 48 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 48 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 48 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 104 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 105 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 105 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 213 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 213 + }, + { + "caller": "__init__", + "callee": "SAGEConv", + "lineNumber": 224 + }, + { + "caller": "__init__", + "callee": "HeteroConv", + "lineNumber": 227 + }, + { + "caller": "__init__", + "callee": "nn.ModuleDict", + "lineNumber": 228 + }, + { + "caller": "__init__", + "callee": "nn.LayerNorm", + "lineNumber": 229 + }, + { + "caller": "__init__", + "callee": "nn.Dropout", + "lineNumber": 231 + }, + { + "caller": "__init__", + "callee": "nn.ModuleDict", + "lineNumber": 234 + }, + { + "caller": "__init__", + "callee": "in_dims.get", + "lineNumber": 236 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 237 + }, + { + "caller": "forward", + "callee": "self.conv", + "lineNumber": 240 + }, + { + "caller": "forward", + "callee": "F.relu", + "lineNumber": 247 + }, + { + "caller": "forward", + "callee": "self.dropout", + "lineNumber": 248 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 255 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 255 + }, + { + "caller": "__init__", + "callee": "nn.Sequential", + "lineNumber": 256 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 257 + }, + { + "caller": "__init__", + "callee": "nn.BatchNorm1d", + "lineNumber": 258 + }, + { + "caller": "__init__", + "callee": "nn.ReLU", + "lineNumber": 259 + }, + { + "caller": "__init__", + "callee": "nn.Dropout", + "lineNumber": 260 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 261 + }, + { + "caller": "__init__", + "callee": "nn.BatchNorm1d", + "lineNumber": 262 + }, + { + "caller": "__init__", + "callee": "nn.ReLU", + "lineNumber": 263 + }, + { + "caller": "__init__", + "callee": "nn.Dropout", + "lineNumber": 264 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 265 + }, + { + "caller": "forward", + "callee": "torch.cat", + "lineNumber": 272 + }, + { + "caller": "forward", + "callee": "self.mlp(x).squeeze", + "lineNumber": 273 + }, + { + "caller": "forward", + "callee": "self.mlp", + "lineNumber": 273 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 279 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 279 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 281 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 282 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 285 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 286 + }, + { + "caller": "__init__", + "callee": "self.convs.append", + "lineNumber": 287 + }, + { + "caller": "__init__", + "callee": "ResidualHeteroConv", + "lineNumber": 287 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 292 + }, + { + "caller": "__init__", + "callee": "MLPDecoder", + "lineNumber": 293 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 294 + }, + { + "caller": "reset_parameters", + "callee": "self.modules", + "lineNumber": 297 + }, + { + "caller": "reset_parameters", + "callee": "isinstance", + "lineNumber": 298 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 299 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.zeros_", + "lineNumber": 301 + }, + { + "caller": "reset_parameters", + "callee": "isinstance", + "lineNumber": 302 + }, + { + "caller": "reset_parameters", + "callee": "m.reset_parameters", + "lineNumber": 303 + }, + { + "caller": "encode", + "callee": "self.author_proj", + "lineNumber": 307 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 308 + }, + { + "caller": "encode", + "callee": "conv", + "lineNumber": 311 + }, + { + "caller": "encode", + "callee": "self.post_lin", + "lineNumber": 313 + }, + { + "caller": "encode", + "callee": "self.post_lin", + "lineNumber": 314 + }, + { + "caller": "decode", + "callee": "self.decoder", + "lineNumber": 318 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 331 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 332 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 333 + }, + { + "caller": "sample_hard_negatives", + "callee": "zip", + "lineNumber": 334 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 336 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 337 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 342 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 344 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 345 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 345 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 347 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 351 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 353 + }, + { + "caller": "sample_hard_negatives", + "callee": "coauthor_paper_pool.get", + "lineNumber": 354 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 356 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 356 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 358 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 361 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 362 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 363 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 365 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:pos_batch_size], dtype=torch.long,\n device=device).t().contiguous", + "lineNumber": 367 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:pos_batch_size], dtype=torch.long,\n device=device).t", + "lineNumber": 367 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor", + "lineNumber": 367 + }, + { + "caller": "run_experiment", + "callee": "set_seed", + "lineNumber": 374 + }, + { + "caller": "run_experiment", + "callee": "ImprovedHeteroGNN(\n data.metadata(),\n author_in_dim=author_deg_dim,\n paper_in_dim=paper_feat_dim,\n hidden_dim=hidden_dim,\n num_layers=num_layers,\n out_dim=64,\n ).to", + "lineNumber": 375 + }, + { + "caller": "run_experiment", + "callee": "ImprovedHeteroGNN", + "lineNumber": 375 + }, + { + "caller": "run_experiment", + "callee": "data.metadata", + "lineNumber": 376 + }, + { + "caller": "run_experiment", + "callee": "model.named_parameters", + "lineNumber": 387 + }, + { + "caller": "run_experiment", + "callee": "no_decay_params.append", + "lineNumber": 389 + }, + { + "caller": "run_experiment", + "callee": "decay_params.append", + "lineNumber": 391 + }, + { + "caller": "run_experiment", + "callee": "torch.optim.AdamW", + "lineNumber": 393 + }, + { + "caller": "run_experiment", + "callee": "ReduceLROnPlateau", + "lineNumber": 398 + }, + { + "caller": "run_experiment", + "callee": "set", + "lineNumber": 402 + }, + { + "caller": "run_experiment", + "callee": "map", + "lineNumber": 402 + }, + { + "caller": "run_experiment", + "callee": "train_refs[['source', 'target']].to_numpy().tolist", + "lineNumber": 402 + }, + { + "caller": "run_experiment", + "callee": "train_refs[['source', 'target']].to_numpy", + "lineNumber": 402 + }, + { + "caller": "run_experiment", + "callee": "min", + "lineNumber": 404 + }, + { + "caller": "run_experiment", + "callee": "pos_edge_index.size", + "lineNumber": 404 + }, + { + "caller": "run_experiment", + "callee": "range", + "lineNumber": 409 + }, + { + "caller": "run_experiment", + "callee": "model.train", + "lineNumber": 410 + }, + { + "caller": "run_experiment", + "callee": "optimizer.zero_grad", + "lineNumber": 411 + }, + { + "caller": "run_experiment", + "callee": "torch.randperm", + "lineNumber": 414 + }, + { + "caller": "run_experiment", + "callee": "pos_edge_index.size", + "lineNumber": 414 + }, + { + "caller": "run_experiment", + "callee": "sample_hard_negatives", + "lineNumber": 418 + }, + { + "caller": "run_experiment", + "callee": "pos_batch.size", + "lineNumber": 419 + }, + { + "caller": "run_experiment", + "callee": "pos_batch[0].cpu().numpy", + "lineNumber": 421 + }, + { + "caller": "run_experiment", + "callee": "pos_batch[0].cpu", + "lineNumber": 421 + }, + { + "caller": "run_experiment", + "callee": "len", + "lineNumber": 426 + }, + { + "caller": "run_experiment", + "callee": "pos_batch.size", + "lineNumber": 426 + }, + { + "caller": "run_experiment", + "callee": "torch.randint", + "lineNumber": 427 + }, + { + "caller": "run_experiment", + "callee": "pos_batch.size", + "lineNumber": 427 + }, + { + "caller": "run_experiment", + "callee": "torch.randint", + "lineNumber": 428 + }, + { + "caller": "run_experiment", + "callee": "pos_batch.size", + "lineNumber": 428 + }, + { + "caller": "run_experiment", + "callee": "zip", + "lineNumber": 429 + }, + { + "caller": "run_experiment", + "callee": "s.tolist", + "lineNumber": 429 + }, + { + "caller": "run_experiment", + "callee": "d.tolist", + "lineNumber": 429 + }, + { + "caller": "run_experiment", + "callee": "neg_list.append", + "lineNumber": 431 + }, + { + "caller": "run_experiment", + "callee": "len", + "lineNumber": 432 + }, + { + "caller": "run_experiment", + "callee": "pos_batch.size", + "lineNumber": 432 + }, + { + "caller": "run_experiment", + "callee": "torch.tensor(neg_list, dtype=torch.long,\n device=device).t().contiguous", + "lineNumber": 434 + }, + { + "caller": "run_experiment", + "callee": "torch.tensor(neg_list, dtype=torch.long,\n device=device).t", + "lineNumber": 434 + }, + { + "caller": "run_experiment", + "callee": "torch.tensor", + "lineNumber": 434 + }, + { + "caller": "run_experiment", + "callee": "model.encode", + "lineNumber": 437 + }, + { + "caller": "run_experiment", + "callee": "model.decode", + "lineNumber": 438 + }, + { + "caller": "run_experiment", + "callee": "model.decode", + "lineNumber": 439 + }, + { + "caller": "run_experiment", + "callee": "torch.ones_like", + "lineNumber": 442 + }, + { + "caller": "run_experiment", + "callee": "torch.zeros_like", + "lineNumber": 443 + }, + { + "caller": "run_experiment", + "callee": "torch.cat", + "lineNumber": 444 + }, + { + "caller": "run_experiment", + "callee": "torch.cat", + "lineNumber": 445 + }, + { + "caller": "run_experiment", + "callee": "F.binary_cross_entropy_with_logits", + "lineNumber": 446 + }, + { + "caller": "run_experiment", + "callee": "loss.backward", + "lineNumber": 448 + }, + { + "caller": "run_experiment", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 449 + }, + { + "caller": "run_experiment", + "callee": "model.parameters", + "lineNumber": 449 + }, + { + "caller": "run_experiment", + "callee": "optimizer.step", + "lineNumber": 450 + }, + { + "caller": "run_experiment", + "callee": "evaluate", + "lineNumber": 454 + }, + { + "caller": "run_experiment", + "callee": "scheduler.step", + "lineNumber": 455 + }, + { + "caller": "run_experiment", + "callee": "v.cpu().clone", + "lineNumber": 459 + }, + { + "caller": "run_experiment", + "callee": "v.cpu", + "lineNumber": 459 + }, + { + "caller": "run_experiment", + "callee": "model.state_dict().items", + "lineNumber": 459 + }, + { + "caller": "run_experiment", + "callee": "model.state_dict", + "lineNumber": 459 + }, + { + "caller": "run_experiment", + "callee": "print", + "lineNumber": 465 + }, + { + "caller": "run_experiment", + "callee": "loss.item", + "lineNumber": 465 + }, + { + "caller": "run_experiment", + "callee": "print", + "lineNumber": 470 + }, + { + "caller": "run_experiment", + "callee": "model.load_state_dict", + "lineNumber": 473 + }, + { + "caller": "evaluate", + "callee": "model.eval", + "lineNumber": 479 + }, + { + "caller": "evaluate", + "callee": "model.encode", + "lineNumber": 480 + }, + { + "caller": "evaluate", + "callee": "val_df[['source', 'target']].to_numpy", + "lineNumber": 482 + }, + { + "caller": "evaluate", + "callee": "val_df['label'].to_numpy", + "lineNumber": 483 + }, + { + "caller": "evaluate", + "callee": "torch.as_tensor(val_arr, device=device).t", + "lineNumber": 485 + }, + { + "caller": "evaluate", + "callee": "torch.as_tensor", + "lineNumber": 485 + }, + { + "caller": "evaluate", + "callee": "model.decoder(\n z_dict['author'], z_dict['paper'],\n edge_idx,\n ).sigmoid().cpu().numpy", + "lineNumber": 486 + }, + { + "caller": "evaluate", + "callee": "model.decoder(\n z_dict['author'], z_dict['paper'],\n edge_idx,\n ).sigmoid().cpu", + "lineNumber": 486 + }, + { + "caller": "evaluate", + "callee": "model.decoder(\n z_dict['author'], z_dict['paper'],\n edge_idx,\n ).sigmoid", + "lineNumber": 486 + }, + { + "caller": "evaluate", + "callee": "model.decoder", + "lineNumber": 486 + }, + { + "caller": "evaluate", + "callee": "precision_recall_curve", + "lineNumber": 492 + }, + { + "caller": "evaluate", + "callee": "np.argmax", + "lineNumber": 494 + }, + { + "caller": "evaluate", + "callee": "len", + "lineNumber": 495 + }, + { + "caller": "evaluate", + "callee": "roc_auc_score", + "lineNumber": 497 + }, + { + "caller": "evaluate", + "callee": "model.train", + "lineNumber": 499 + }, + { + "caller": "predict_all", + "callee": "model.eval", + "lineNumber": 525 + }, + { + "caller": "predict_all", + "callee": "model.encode", + "lineNumber": 526 + }, + { + "caller": "predict_all", + "callee": "len", + "lineNumber": 530 + }, + { + "caller": "predict_all", + "callee": "range", + "lineNumber": 531 + }, + { + "caller": "predict_all", + "callee": "min", + "lineNumber": 532 + }, + { + "caller": "predict_all", + "callee": "torch.as_tensor(test_pairs[start:end], device=device).t", + "lineNumber": 533 + }, + { + "caller": "predict_all", + "callee": "torch.as_tensor", + "lineNumber": 533 + }, + { + "caller": "predict_all", + "callee": "model.decoder(\n z_dict['author'], z_dict['paper'],\n edge_idx,\n ).sigmoid().cpu().numpy", + "lineNumber": 534 + }, + { + "caller": "predict_all", + "callee": "model.decoder(\n z_dict['author'], z_dict['paper'],\n edge_idx,\n ).sigmoid().cpu", + "lineNumber": 534 + }, + { + "caller": "predict_all", + "callee": "model.decoder(\n z_dict['author'], z_dict['paper'],\n edge_idx,\n ).sigmoid", + "lineNumber": 534 + }, + { + "caller": "predict_all", + "callee": "model.decoder", + "lineNumber": 534 + }, + { + "caller": "predict_all", + "callee": "all_scores.append", + "lineNumber": 538 + }, + { + "caller": "predict_all", + "callee": "np.concatenate", + "lineNumber": 539 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 10, + "functionCount": 7, + "classCount": 3 + } + }, + { + "path": "code/run_lgcn_final.py", + "language": "python", + "fileCategory": "code", + "totalLines": 308, + "nonEmptyLines": 252, + "functions": [ + { + "name": "set_seed", + "startLine": 19, + "endLine": 24, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 31, + "endLine": 36, + "params": [ + "file" + ] + }, + { + "name": "log_norm", + "startLine": 71, + "endLine": 73, + "params": [ + "x" + ] + }, + { + "name": "build_data", + "startLine": 109, + "endLine": 124, + "params": [ + "ref_edges_use" + ] + }, + { + "name": "sample_hard_negatives", + "startLine": 127, + "endLine": 156, + "params": [ + "n_samples" + ] + }, + { + "name": "cos_sim", + "startLine": 212, + "endLine": 213, + "params": [ + "a", + "b", + "eps" + ] + }, + { + "name": "predict_batched", + "startLine": 217, + "endLine": 228, + "params": [ + "model", + "data", + "pairs", + "batch_size" + ] + }, + { + "name": "train_lgcn", + "startLine": 232, + "endLine": 263, + "params": [ + "seed", + "embed_dim", + "num_layers", + "lr", + "epochs" + ] + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "startLine": 160, + "endLine": 180, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "LightGCN", + "startLine": 183, + "endLine": 209, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 19, + "isDefault": false + }, + { + "name": "read_txt", + "line": 31, + "isDefault": false + }, + { + "name": "log_norm", + "line": 71, + "isDefault": false + }, + { + "name": "build_data", + "line": 109, + "isDefault": false + }, + { + "name": "sample_hard_negatives", + "line": 127, + "isDefault": false + }, + { + "name": "LightGCNLayer", + "line": 160, + "isDefault": false + }, + { + "name": "LightGCN", + "line": 183, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 212, + "isDefault": false + }, + { + "name": "predict_batched", + "line": 216, + "isDefault": false + }, + { + "name": "train_lgcn", + "line": 232, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 20 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 21 + }, + { + "caller": "set_seed", + "callee": "torch.manual_seed", + "lineNumber": 22 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.is_available", + "lineNumber": 23 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.manual_seed_all", + "lineNumber": 24 + }, + { + "caller": "read_txt", + "callee": "open", + "lineNumber": 33 + }, + { + "caller": "read_txt", + "callee": "res_list.append", + "lineNumber": 35 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 35 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 35 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 35 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 35 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 72 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 73 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 73 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 110 + }, + { + "caller": "build_data", + "callee": "ref_edges_use[['source', 'target']].to_numpy", + "lineNumber": 110 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 111 + }, + { + "caller": "build_data", + "callee": "cite_edges[['source', 'target']].to_numpy", + "lineNumber": 111 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 112 + }, + { + "caller": "build_data", + "callee": "coauthor_edges[['source', 'target']].to_numpy", + "lineNumber": 112 + }, + { + "caller": "build_data", + "callee": "HeteroData", + "lineNumber": 114 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 117 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t().contiguous", + "lineNumber": 118 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t", + "lineNumber": 118 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t().contiguous", + "lineNumber": 119 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t", + "lineNumber": 119 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n cite_tensor, cite_tensor[:, [1, 0]]], dim=0).t().contiguous", + "lineNumber": 120 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n cite_tensor, cite_tensor[:, [1, 0]]], dim=0).t", + "lineNumber": 120 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 120 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0).t().contiguous", + "lineNumber": 122 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0).t", + "lineNumber": 122 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 122 + }, + { + "caller": "build_data", + "callee": "d.to", + "lineNumber": 124 + }, + { + "caller": "add_random", + "callee": "len", + "lineNumber": 132 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 133 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 134 + }, + { + "caller": "add_random", + "callee": "neg_list.append", + "lineNumber": 136 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 138 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 138 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 140 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 140 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 142 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 143 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 143 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 145 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 147 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 149 + }, + { + "caller": "sample_hard_negatives", + "callee": "coauthor_paper_pool.get", + "lineNumber": 150 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 152 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 152 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 154 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 155 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long, device=device).t().contiguous", + "lineNumber": 156 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long, device=device).t", + "lineNumber": 156 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor", + "lineNumber": 156 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 162 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 162 + }, + { + "caller": "forward", + "callee": "sx.new_zeros", + "lineNumber": 174 + }, + { + "caller": "forward", + "callee": "x_dict[dt].size", + "lineNumber": 174 + }, + { + "caller": "forward", + "callee": "sx.size", + "lineNumber": 174 + }, + { + "caller": "forward", + "callee": "sx.new_zeros", + "lineNumber": 175 + }, + { + "caller": "forward", + "callee": "x_dict[dt].size", + "lineNumber": 175 + }, + { + "caller": "forward", + "callee": "a.index_add_", + "lineNumber": 176 + }, + { + "caller": "forward", + "callee": "d.index_add_", + "lineNumber": 177 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 177 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 177 + }, + { + "caller": "forward", + "callee": "agg_dict[dt].append", + "lineNumber": 178 + }, + { + "caller": "forward", + "callee": "d.clamp", + "lineNumber": 178 + }, + { + "caller": "forward", + "callee": "sum", + "lineNumber": 179 + }, + { + "caller": "forward", + "callee": "len", + "lineNumber": 179 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 185 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 185 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 186 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 187 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 188 + }, + { + "caller": "__init__", + "callee": "LightGCNLayer", + "lineNumber": 188 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 188 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 190 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 193 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 194 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.zeros_", + "lineNumber": 195 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 199 + }, + { + "caller": "encode", + "callee": "layer", + "lineNumber": 202 + }, + { + "caller": "encode", + "callee": "all_layers.append", + "lineNumber": 203 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 205 + }, + { + "caller": "decode", + "callee": "(z_dict['author'][src] * z_dict['paper'][dst]).sum", + "lineNumber": 209 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 213 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 213 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 213 + }, + { + "caller": "predict_batched", + "callee": "model.eval", + "lineNumber": 218 + }, + { + "caller": "predict_batched", + "callee": "model.encode", + "lineNumber": 219 + }, + { + "caller": "predict_batched", + "callee": "v.cpu", + "lineNumber": 220 + }, + { + "caller": "predict_batched", + "callee": "z_dict.items", + "lineNumber": 220 + }, + { + "caller": "predict_batched", + "callee": "range", + "lineNumber": 222 + }, + { + "caller": "predict_batched", + "callee": "len", + "lineNumber": 222 + }, + { + "caller": "predict_batched", + "callee": "min", + "lineNumber": 223 + }, + { + "caller": "predict_batched", + "callee": "len", + "lineNumber": 223 + }, + { + "caller": "predict_batched", + "callee": "all_scores.append", + "lineNumber": 225 + }, + { + "caller": "predict_batched", + "callee": "cos_sim", + "lineNumber": 225 + }, + { + "caller": "predict_batched", + "callee": "z_cpu['author'][batch[:, 0]].numpy", + "lineNumber": 226 + }, + { + "caller": "predict_batched", + "callee": "z_cpu['paper'][batch[:, 1]].numpy", + "lineNumber": 227 + }, + { + "caller": "predict_batched", + "callee": "np.concatenate", + "lineNumber": 228 + }, + { + "caller": "train_lgcn", + "callee": "set_seed", + "lineNumber": 233 + }, + { + "caller": "train_lgcn", + "callee": "build_data", + "lineNumber": 234 + }, + { + "caller": "train_lgcn", + "callee": "LightGCN(embed_dim, num_layers).to", + "lineNumber": 235 + }, + { + "caller": "train_lgcn", + "callee": "LightGCN", + "lineNumber": 235 + }, + { + "caller": "train_lgcn", + "callee": "torch.optim.Adam", + "lineNumber": 236 + }, + { + "caller": "train_lgcn", + "callee": "model.parameters", + "lineNumber": 236 + }, + { + "caller": "train_lgcn", + "callee": "min", + "lineNumber": 238 + }, + { + "caller": "train_lgcn", + "callee": "pos_edges.size", + "lineNumber": 238 + }, + { + "caller": "train_lgcn", + "callee": "range", + "lineNumber": 240 + }, + { + "caller": "train_lgcn", + "callee": "model.train", + "lineNumber": 241 + }, + { + "caller": "train_lgcn", + "callee": "torch.randperm", + "lineNumber": 242 + }, + { + "caller": "train_lgcn", + "callee": "pos_edges.size", + "lineNumber": 242 + }, + { + "caller": "train_lgcn", + "callee": "sample_hard_negatives", + "lineNumber": 244 + }, + { + "caller": "train_lgcn", + "callee": "pos.size", + "lineNumber": 244 + }, + { + "caller": "train_lgcn", + "callee": "model.encode", + "lineNumber": 246 + }, + { + "caller": "train_lgcn", + "callee": "model.decode(z, pos).repeat_interleave", + "lineNumber": 247 + }, + { + "caller": "train_lgcn", + "callee": "model.decode", + "lineNumber": 247 + }, + { + "caller": "train_lgcn", + "callee": "model.decode", + "lineNumber": 248 + }, + { + "caller": "train_lgcn", + "callee": "F.logsigmoid(pos_s - neg_s).mean", + "lineNumber": 249 + }, + { + "caller": "train_lgcn", + "callee": "F.logsigmoid", + "lineNumber": 249 + }, + { + "caller": "train_lgcn", + "callee": "optimizer.zero_grad", + "lineNumber": 251 + }, + { + "caller": "train_lgcn", + "callee": "loss.backward", + "lineNumber": 252 + }, + { + "caller": "train_lgcn", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 253 + }, + { + "caller": "train_lgcn", + "callee": "model.parameters", + "lineNumber": 253 + }, + { + "caller": "train_lgcn", + "callee": "optimizer.step", + "lineNumber": 254 + }, + { + "caller": "train_lgcn", + "callee": "print", + "lineNumber": 257 + }, + { + "caller": "train_lgcn", + "callee": "loss.item", + "lineNumber": 257 + }, + { + "caller": "train_lgcn", + "callee": "torch.save", + "lineNumber": 261 + }, + { + "caller": "train_lgcn", + "callee": "model.state_dict", + "lineNumber": 261 + }, + { + "caller": "train_lgcn", + "callee": "print", + "lineNumber": 262 + }, + { + "caller": "train_lgcn", + "callee": "model.cpu", + "lineNumber": 263 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 10, + "functionCount": 8, + "classCount": 2 + } + }, + { + "path": "code/run_lgcn_v2.py", + "language": "python", + "fileCategory": "code", + "totalLines": 311, + "nonEmptyLines": 256, + "functions": [ + { + "name": "set_seed", + "startLine": 20, + "endLine": 25, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 32, + "endLine": 37, + "params": [ + "file" + ] + }, + { + "name": "log_norm", + "startLine": 70, + "endLine": 72, + "params": [ + "x" + ] + }, + { + "name": "build_data", + "startLine": 107, + "endLine": 121, + "params": [ + "ref_edges_use" + ] + }, + { + "name": "sample_hard_negatives", + "startLine": 124, + "endLine": 153, + "params": [ + "n_samples" + ] + }, + { + "name": "cos_sim", + "startLine": 213, + "endLine": 214, + "params": [ + "a", + "b", + "eps" + ] + }, + { + "name": "predict_cos", + "startLine": 218, + "endLine": 229, + "params": [ + "model", + "data", + "pairs", + "batch_size" + ] + }, + { + "name": "train", + "startLine": 233, + "endLine": 262, + "params": [ + "seed", + "embed_dim", + "num_layers", + "lr", + "epochs" + ] + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "startLine": 157, + "endLine": 177, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "LightGCN_Norm", + "startLine": 180, + "endLine": 210, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 20, + "isDefault": false + }, + { + "name": "read_txt", + "line": 32, + "isDefault": false + }, + { + "name": "log_norm", + "line": 70, + "isDefault": false + }, + { + "name": "build_data", + "line": 107, + "isDefault": false + }, + { + "name": "sample_hard_negatives", + "line": 124, + "isDefault": false + }, + { + "name": "LightGCNLayer", + "line": 157, + "isDefault": false + }, + { + "name": "LightGCN_Norm", + "line": 180, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 213, + "isDefault": false + }, + { + "name": "predict_cos", + "line": 217, + "isDefault": false + }, + { + "name": "train", + "line": 233, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 21 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 22 + }, + { + "caller": "set_seed", + "callee": "torch.manual_seed", + "lineNumber": 23 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.is_available", + "lineNumber": 24 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.manual_seed_all", + "lineNumber": 25 + }, + { + "caller": "read_txt", + "callee": "open", + "lineNumber": 34 + }, + { + "caller": "read_txt", + "callee": "res_list.append", + "lineNumber": 36 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 36 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 36 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 36 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 36 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 71 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 72 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 72 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 108 + }, + { + "caller": "build_data", + "callee": "ref_edges_use[['source', 'target']].to_numpy", + "lineNumber": 108 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 109 + }, + { + "caller": "build_data", + "callee": "cite_edges[['source', 'target']].to_numpy", + "lineNumber": 109 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 110 + }, + { + "caller": "build_data", + "callee": "coauthor_edges[['source', 'target']].to_numpy", + "lineNumber": 110 + }, + { + "caller": "build_data", + "callee": "HeteroData", + "lineNumber": 111 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 114 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t().contiguous", + "lineNumber": 115 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t", + "lineNumber": 115 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t().contiguous", + "lineNumber": 116 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t", + "lineNumber": 116 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n cite_tensor, cite_tensor[:, [1, 0]]], dim=0).t().contiguous", + "lineNumber": 117 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n cite_tensor, cite_tensor[:, [1, 0]]], dim=0).t", + "lineNumber": 117 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 117 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0).t().contiguous", + "lineNumber": 119 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0).t", + "lineNumber": 119 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 119 + }, + { + "caller": "build_data", + "callee": "d.to", + "lineNumber": 121 + }, + { + "caller": "add_random", + "callee": "len", + "lineNumber": 129 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 130 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 131 + }, + { + "caller": "add_random", + "callee": "neg_list.append", + "lineNumber": 133 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 135 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 135 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 137 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 137 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 139 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 140 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 140 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 142 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 144 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 146 + }, + { + "caller": "sample_hard_negatives", + "callee": "coauthor_paper_pool.get", + "lineNumber": 147 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 149 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 149 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 151 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 152 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long, device=device).t().contiguous", + "lineNumber": 153 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long, device=device).t", + "lineNumber": 153 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor", + "lineNumber": 153 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 159 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 159 + }, + { + "caller": "forward", + "callee": "sx.new_zeros", + "lineNumber": 171 + }, + { + "caller": "forward", + "callee": "x_dict[dt].size", + "lineNumber": 171 + }, + { + "caller": "forward", + "callee": "sx.size", + "lineNumber": 171 + }, + { + "caller": "forward", + "callee": "sx.new_zeros", + "lineNumber": 172 + }, + { + "caller": "forward", + "callee": "x_dict[dt].size", + "lineNumber": 172 + }, + { + "caller": "forward", + "callee": "a.index_add_", + "lineNumber": 173 + }, + { + "caller": "forward", + "callee": "d.index_add_", + "lineNumber": 174 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 174 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 174 + }, + { + "caller": "forward", + "callee": "agg_dict[dt].append", + "lineNumber": 175 + }, + { + "caller": "forward", + "callee": "d.clamp", + "lineNumber": 175 + }, + { + "caller": "forward", + "callee": "sum", + "lineNumber": 176 + }, + { + "caller": "forward", + "callee": "len", + "lineNumber": 176 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 183 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 183 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 184 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 185 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 186 + }, + { + "caller": "__init__", + "callee": "LightGCNLayer", + "lineNumber": 186 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 186 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 188 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 191 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 192 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.zeros_", + "lineNumber": 193 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 197 + }, + { + "caller": "encode", + "callee": "layer", + "lineNumber": 200 + }, + { + "caller": "encode", + "callee": "all_layers.append", + "lineNumber": 201 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 203 + }, + { + "caller": "encode", + "callee": "F.normalize", + "lineNumber": 205 + }, + { + "caller": "encode", + "callee": "result.items", + "lineNumber": 205 + }, + { + "caller": "decode", + "callee": "(z_dict['author'][src] * z_dict['paper'][dst]).sum", + "lineNumber": 210 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 214 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 214 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 214 + }, + { + "caller": "predict_cos", + "callee": "model.eval", + "lineNumber": 219 + }, + { + "caller": "predict_cos", + "callee": "model.encode", + "lineNumber": 220 + }, + { + "caller": "predict_cos", + "callee": "v.cpu", + "lineNumber": 221 + }, + { + "caller": "predict_cos", + "callee": "z_dict.items", + "lineNumber": 221 + }, + { + "caller": "predict_cos", + "callee": "range", + "lineNumber": 223 + }, + { + "caller": "predict_cos", + "callee": "len", + "lineNumber": 223 + }, + { + "caller": "predict_cos", + "callee": "min", + "lineNumber": 224 + }, + { + "caller": "predict_cos", + "callee": "len", + "lineNumber": 224 + }, + { + "caller": "predict_cos", + "callee": "all_scores.append", + "lineNumber": 226 + }, + { + "caller": "predict_cos", + "callee": "cos_sim", + "lineNumber": 226 + }, + { + "caller": "predict_cos", + "callee": "z_cpu['author'][batch[:, 0]].numpy", + "lineNumber": 227 + }, + { + "caller": "predict_cos", + "callee": "z_cpu['paper'][batch[:, 1]].numpy", + "lineNumber": 228 + }, + { + "caller": "predict_cos", + "callee": "np.concatenate", + "lineNumber": 229 + }, + { + "caller": "train", + "callee": "set_seed", + "lineNumber": 234 + }, + { + "caller": "train", + "callee": "build_data", + "lineNumber": 235 + }, + { + "caller": "train", + "callee": "LightGCN_Norm(embed_dim, num_layers).to", + "lineNumber": 236 + }, + { + "caller": "train", + "callee": "LightGCN_Norm", + "lineNumber": 236 + }, + { + "caller": "train", + "callee": "torch.optim.Adam", + "lineNumber": 237 + }, + { + "caller": "train", + "callee": "model.parameters", + "lineNumber": 237 + }, + { + "caller": "train", + "callee": "min", + "lineNumber": 239 + }, + { + "caller": "train", + "callee": "pos_edges.size", + "lineNumber": 239 + }, + { + "caller": "train", + "callee": "range", + "lineNumber": 241 + }, + { + "caller": "train", + "callee": "model.train", + "lineNumber": 242 + }, + { + "caller": "train", + "callee": "torch.randperm", + "lineNumber": 243 + }, + { + "caller": "train", + "callee": "pos_edges.size", + "lineNumber": 243 + }, + { + "caller": "train", + "callee": "sample_hard_negatives", + "lineNumber": 245 + }, + { + "caller": "train", + "callee": "pos.size", + "lineNumber": 245 + }, + { + "caller": "train", + "callee": "model.encode", + "lineNumber": 247 + }, + { + "caller": "train", + "callee": "model.decode(z, pos).repeat_interleave", + "lineNumber": 248 + }, + { + "caller": "train", + "callee": "model.decode", + "lineNumber": 248 + }, + { + "caller": "train", + "callee": "model.decode", + "lineNumber": 249 + }, + { + "caller": "train", + "callee": "F.logsigmoid(pos_s - neg_s).mean", + "lineNumber": 250 + }, + { + "caller": "train", + "callee": "F.logsigmoid", + "lineNumber": 250 + }, + { + "caller": "train", + "callee": "optimizer.zero_grad", + "lineNumber": 252 + }, + { + "caller": "train", + "callee": "loss.backward", + "lineNumber": 253 + }, + { + "caller": "train", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 254 + }, + { + "caller": "train", + "callee": "model.parameters", + "lineNumber": 254 + }, + { + "caller": "train", + "callee": "optimizer.step", + "lineNumber": 255 + }, + { + "caller": "train", + "callee": "print", + "lineNumber": 258 + }, + { + "caller": "train", + "callee": "loss.item", + "lineNumber": 258 + }, + { + "caller": "train", + "callee": "torch.save", + "lineNumber": 261 + }, + { + "caller": "train", + "callee": "model.state_dict", + "lineNumber": 261 + }, + { + "caller": "train", + "callee": "model.cpu", + "lineNumber": 262 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 10, + "functionCount": 8, + "classCount": 2 + } + }, + { + "path": "code/run_ultimate.py", + "language": "python", + "fileCategory": "code", + "totalLines": 450, + "nonEmptyLines": 368, + "functions": [ + { + "name": "set_seed", + "startLine": 27, + "endLine": 32, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 39, + "endLine": 44, + "params": [ + "file" + ] + }, + { + "name": "log_norm", + "startLine": 85, + "endLine": 87, + "params": [ + "x" + ] + }, + { + "name": "build_data", + "startLine": 119, + "endLine": 136, + "params": [ + "ref_edges_use" + ] + }, + { + "name": "sample_hard_negatives", + "startLine": 139, + "endLine": 168, + "params": [ + "n_samples" + ] + }, + { + "name": "cos_sim", + "startLine": 171, + "endLine": 172, + "params": [ + "a", + "b", + "eps" + ] + }, + { + "name": "predict_cos_batched", + "startLine": 302, + "endLine": 315, + "params": [ + "model", + "data", + "pairs", + "batch_size" + ] + }, + { + "name": "train_lightgcn", + "startLine": 319, + "endLine": 348, + "params": [ + "seed", + "embed_dim", + "num_layers", + "lr", + "num_epochs" + ] + }, + { + "name": "train_sage", + "startLine": 351, + "endLine": 380, + "params": [ + "seed", + "hidden_dim", + "num_layers", + "lr", + "num_epochs" + ] + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "startLine": 179, + "endLine": 208, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "LightGCNRecommender", + "startLine": 211, + "endLine": 242, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + }, + { + "name": "ResidualHeteroConv", + "startLine": 249, + "endLine": 269, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "SAGERecommender", + "startLine": 272, + "endLine": 297, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 27, + "isDefault": false + }, + { + "name": "read_txt", + "line": 39, + "isDefault": false + }, + { + "name": "log_norm", + "line": 85, + "isDefault": false + }, + { + "name": "build_data", + "line": 119, + "isDefault": false + }, + { + "name": "sample_hard_negatives", + "line": 139, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 171, + "isDefault": false + }, + { + "name": "LightGCNLayer", + "line": 179, + "isDefault": false + }, + { + "name": "LightGCNRecommender", + "line": 211, + "isDefault": false + }, + { + "name": "ResidualHeteroConv", + "line": 249, + "isDefault": false + }, + { + "name": "SAGERecommender", + "line": 272, + "isDefault": false + }, + { + "name": "predict_cos_batched", + "line": 301, + "isDefault": false + }, + { + "name": "train_lightgcn", + "line": 319, + "isDefault": false + }, + { + "name": "train_sage", + "line": 351, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 28 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 29 + }, + { + "caller": "set_seed", + "callee": "torch.manual_seed", + "lineNumber": 30 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.is_available", + "lineNumber": 31 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.manual_seed_all", + "lineNumber": 32 + }, + { + "caller": "read_txt", + "callee": "open", + "lineNumber": 41 + }, + { + "caller": "read_txt", + "callee": "res_list.append", + "lineNumber": 43 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 43 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 43 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 43 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 43 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 86 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 87 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 87 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 120 + }, + { + "caller": "build_data", + "callee": "ref_edges_use[['source', 'target']].to_numpy", + "lineNumber": 120 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 121 + }, + { + "caller": "build_data", + "callee": "cite_edges[['source', 'target']].to_numpy", + "lineNumber": 121 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 122 + }, + { + "caller": "build_data", + "callee": "coauthor_edges[['source', 'target']].to_numpy", + "lineNumber": 122 + }, + { + "caller": "build_data", + "callee": "HeteroData", + "lineNumber": 124 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 127 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t().contiguous", + "lineNumber": 128 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t", + "lineNumber": 128 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t().contiguous", + "lineNumber": 129 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t", + "lineNumber": 129 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n cite_tensor, cite_tensor[:, [1, 0]],\n ], dim=0).t().contiguous", + "lineNumber": 130 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n cite_tensor, cite_tensor[:, [1, 0]],\n ], dim=0).t", + "lineNumber": 130 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 130 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n coauthor_tensor, coauthor_tensor[:, [1, 0]],\n ], dim=0).t().contiguous", + "lineNumber": 133 + }, + { + "caller": "build_data", + "callee": "torch.cat([\n coauthor_tensor, coauthor_tensor[:, [1, 0]],\n ], dim=0).t", + "lineNumber": 133 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 133 + }, + { + "caller": "build_data", + "callee": "d.to", + "lineNumber": 136 + }, + { + "caller": "add_random", + "callee": "len", + "lineNumber": 144 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 145 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 146 + }, + { + "caller": "add_random", + "callee": "neg_list.append", + "lineNumber": 148 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 150 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 150 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 152 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 152 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 154 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 155 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 155 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 157 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 159 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 161 + }, + { + "caller": "sample_hard_negatives", + "callee": "coauthor_paper_pool.get", + "lineNumber": 162 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 164 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 164 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 166 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 167 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long, device=device).t().contiguous", + "lineNumber": 168 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long, device=device).t", + "lineNumber": 168 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor", + "lineNumber": 168 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 172 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 172 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 172 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 181 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 181 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 196 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 196 + }, + { + "caller": "forward", + "callee": "src_x.size", + "lineNumber": 196 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 197 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 197 + }, + { + "caller": "forward", + "callee": "agg.index_add_", + "lineNumber": 198 + }, + { + "caller": "forward", + "callee": "deg.index_add_", + "lineNumber": 199 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 199 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 200 + }, + { + "caller": "forward", + "callee": "deg.clamp", + "lineNumber": 201 + }, + { + "caller": "forward", + "callee": "agg_dict[dst_type].append", + "lineNumber": 202 + }, + { + "caller": "forward", + "callee": "sum", + "lineNumber": 205 + }, + { + "caller": "forward", + "callee": "len", + "lineNumber": 205 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 213 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 213 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 214 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 215 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 216 + }, + { + "caller": "__init__", + "callee": "LightGCNLayer", + "lineNumber": 216 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 216 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 218 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 221 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 222 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.zeros_", + "lineNumber": 223 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 228 + }, + { + "caller": "encode", + "callee": "layer", + "lineNumber": 232 + }, + { + "caller": "encode", + "callee": "all_layers.append", + "lineNumber": 233 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 236 + }, + { + "caller": "decode", + "callee": "(z_dict['author'][src] * z_dict['paper'][dst]).sum", + "lineNumber": 242 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 251 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 251 + }, + { + "caller": "__init__", + "callee": "SAGEConv", + "lineNumber": 256 + }, + { + "caller": "__init__", + "callee": "HeteroConv", + "lineNumber": 257 + }, + { + "caller": "__init__", + "callee": "nn.ModuleDict", + "lineNumber": 258 + }, + { + "caller": "__init__", + "callee": "nn.LayerNorm", + "lineNumber": 259 + }, + { + "caller": "__init__", + "callee": "nn.LayerNorm", + "lineNumber": 260 + }, + { + "caller": "__init__", + "callee": "nn.Dropout", + "lineNumber": 262 + }, + { + "caller": "forward", + "callee": "self.conv", + "lineNumber": 265 + }, + { + "caller": "forward", + "callee": "self.dropout", + "lineNumber": 267 + }, + { + "caller": "forward", + "callee": "F.relu", + "lineNumber": 267 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 274 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 274 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 275 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 276 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 277 + }, + { + "caller": "__init__", + "callee": "ResidualHeteroConv", + "lineNumber": 278 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 278 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 279 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 282 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 283 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.zeros_", + "lineNumber": 284 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 289 + }, + { + "caller": "encode", + "callee": "conv", + "lineNumber": 292 + }, + { + "caller": "decode", + "callee": "(z_dict['author'][src] * z_dict['paper'][dst]).sum", + "lineNumber": 297 + }, + { + "caller": "predict_cos_batched", + "callee": "model.eval", + "lineNumber": 303 + }, + { + "caller": "predict_cos_batched", + "callee": "model.encode", + "lineNumber": 304 + }, + { + "caller": "predict_cos_batched", + "callee": "v.cpu", + "lineNumber": 305 + }, + { + "caller": "predict_cos_batched", + "callee": "z_dict.items", + "lineNumber": 305 + }, + { + "caller": "predict_cos_batched", + "callee": "range", + "lineNumber": 307 + }, + { + "caller": "predict_cos_batched", + "callee": "len", + "lineNumber": 307 + }, + { + "caller": "predict_cos_batched", + "callee": "min", + "lineNumber": 308 + }, + { + "caller": "predict_cos_batched", + "callee": "len", + "lineNumber": 308 + }, + { + "caller": "predict_cos_batched", + "callee": "cos_sim", + "lineNumber": 310 + }, + { + "caller": "predict_cos_batched", + "callee": "z_cpu['author'][batch[:, 0]].numpy", + "lineNumber": 311 + }, + { + "caller": "predict_cos_batched", + "callee": "z_cpu['paper'][batch[:, 1]].numpy", + "lineNumber": 312 + }, + { + "caller": "predict_cos_batched", + "callee": "all_scores.append", + "lineNumber": 314 + }, + { + "caller": "predict_cos_batched", + "callee": "np.concatenate", + "lineNumber": 315 + }, + { + "caller": "train_lightgcn", + "callee": "set_seed", + "lineNumber": 321 + }, + { + "caller": "train_lightgcn", + "callee": "build_data", + "lineNumber": 322 + }, + { + "caller": "train_lightgcn", + "callee": "LightGCNRecommender(embed_dim, num_layers).to", + "lineNumber": 323 + }, + { + "caller": "train_lightgcn", + "callee": "LightGCNRecommender", + "lineNumber": 323 + }, + { + "caller": "train_lightgcn", + "callee": "torch.optim.Adam", + "lineNumber": 325 + }, + { + "caller": "train_lightgcn", + "callee": "model.parameters", + "lineNumber": 325 + }, + { + "caller": "train_lightgcn", + "callee": "min", + "lineNumber": 327 + }, + { + "caller": "train_lightgcn", + "callee": "pos_edges.size", + "lineNumber": 327 + }, + { + "caller": "train_lightgcn", + "callee": "range", + "lineNumber": 329 + }, + { + "caller": "train_lightgcn", + "callee": "model.train", + "lineNumber": 330 + }, + { + "caller": "train_lightgcn", + "callee": "torch.randperm", + "lineNumber": 331 + }, + { + "caller": "train_lightgcn", + "callee": "pos_edges.size", + "lineNumber": 331 + }, + { + "caller": "train_lightgcn", + "callee": "sample_hard_negatives", + "lineNumber": 333 + }, + { + "caller": "train_lightgcn", + "callee": "pos_batch.size", + "lineNumber": 333 + }, + { + "caller": "train_lightgcn", + "callee": "model.encode", + "lineNumber": 335 + }, + { + "caller": "train_lightgcn", + "callee": "model.decode(z_dict, pos_batch).repeat_interleave", + "lineNumber": 336 + }, + { + "caller": "train_lightgcn", + "callee": "model.decode", + "lineNumber": 336 + }, + { + "caller": "train_lightgcn", + "callee": "model.decode", + "lineNumber": 337 + }, + { + "caller": "train_lightgcn", + "callee": "F.logsigmoid(pos_score - neg_score).mean", + "lineNumber": 338 + }, + { + "caller": "train_lightgcn", + "callee": "F.logsigmoid", + "lineNumber": 338 + }, + { + "caller": "train_lightgcn", + "callee": "optimizer.zero_grad", + "lineNumber": 340 + }, + { + "caller": "train_lightgcn", + "callee": "loss.backward", + "lineNumber": 341 + }, + { + "caller": "train_lightgcn", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 342 + }, + { + "caller": "train_lightgcn", + "callee": "model.parameters", + "lineNumber": 342 + }, + { + "caller": "train_lightgcn", + "callee": "optimizer.step", + "lineNumber": 343 + }, + { + "caller": "train_lightgcn", + "callee": "print", + "lineNumber": 346 + }, + { + "caller": "train_lightgcn", + "callee": "loss.item", + "lineNumber": 346 + }, + { + "caller": "train_lightgcn", + "callee": "model.cpu", + "lineNumber": 348 + }, + { + "caller": "train_sage", + "callee": "set_seed", + "lineNumber": 353 + }, + { + "caller": "train_sage", + "callee": "build_data", + "lineNumber": 354 + }, + { + "caller": "train_sage", + "callee": "SAGERecommender(hidden_dim, num_layers).to", + "lineNumber": 355 + }, + { + "caller": "train_sage", + "callee": "SAGERecommender", + "lineNumber": 355 + }, + { + "caller": "train_sage", + "callee": "torch.optim.AdamW", + "lineNumber": 357 + }, + { + "caller": "train_sage", + "callee": "model.parameters", + "lineNumber": 357 + }, + { + "caller": "train_sage", + "callee": "min", + "lineNumber": 359 + }, + { + "caller": "train_sage", + "callee": "pos_edges.size", + "lineNumber": 359 + }, + { + "caller": "train_sage", + "callee": "range", + "lineNumber": 361 + }, + { + "caller": "train_sage", + "callee": "model.train", + "lineNumber": 362 + }, + { + "caller": "train_sage", + "callee": "torch.randperm", + "lineNumber": 363 + }, + { + "caller": "train_sage", + "callee": "pos_edges.size", + "lineNumber": 363 + }, + { + "caller": "train_sage", + "callee": "sample_hard_negatives", + "lineNumber": 365 + }, + { + "caller": "train_sage", + "callee": "pos_batch.size", + "lineNumber": 365 + }, + { + "caller": "train_sage", + "callee": "model.encode", + "lineNumber": 367 + }, + { + "caller": "train_sage", + "callee": "model.decode(z_dict, pos_batch).repeat_interleave", + "lineNumber": 368 + }, + { + "caller": "train_sage", + "callee": "model.decode", + "lineNumber": 368 + }, + { + "caller": "train_sage", + "callee": "model.decode", + "lineNumber": 369 + }, + { + "caller": "train_sage", + "callee": "F.logsigmoid(pos_score - neg_score).mean", + "lineNumber": 370 + }, + { + "caller": "train_sage", + "callee": "F.logsigmoid", + "lineNumber": 370 + }, + { + "caller": "train_sage", + "callee": "optimizer.zero_grad", + "lineNumber": 372 + }, + { + "caller": "train_sage", + "callee": "loss.backward", + "lineNumber": 373 + }, + { + "caller": "train_sage", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 374 + }, + { + "caller": "train_sage", + "callee": "model.parameters", + "lineNumber": 374 + }, + { + "caller": "train_sage", + "callee": "optimizer.step", + "lineNumber": 375 + }, + { + "caller": "train_sage", + "callee": "print", + "lineNumber": 378 + }, + { + "caller": "train_sage", + "callee": "loss.item", + "lineNumber": 378 + }, + { + "caller": "train_sage", + "callee": "model.cpu", + "lineNumber": 380 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 13, + "functionCount": 9, + "classCount": 4 + } + }, + { + "path": "code/run_v2.py", + "language": "python", + "fileCategory": "code", + "totalLines": 520, + "nonEmptyLines": 422, + "functions": [ + { + "name": "set_seed", + "startLine": 36, + "endLine": 41, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 48, + "endLine": 53, + "params": [ + "file" + ] + }, + { + "name": "log_norm", + "startLine": 106, + "endLine": 108, + "params": [ + "x" + ] + }, + { + "name": "sample_hard_negatives", + "startLine": 274, + "endLine": 311, + "params": [ + "n_samples", + "existing_set", + "device" + ] + }, + { + "name": "cos_sim", + "startLine": 315, + "endLine": 316, + "params": [ + "a", + "b", + "eps" + ] + }, + { + "name": "evaluate", + "startLine": 320, + "endLine": 338, + "params": [ + "model", + "data_dict", + "val_df" + ] + }, + { + "name": "predict_cos", + "startLine": 342, + "endLine": 349, + "params": [ + "model", + "data_dict", + "test_pairs" + ] + }, + { + "name": "run_experiment", + "startLine": 353, + "endLine": 434, + "params": [ + "seed", + "hidden_dim", + "num_layers", + "lr", + "num_epochs", + "use_hard_neg" + ] + }, + { + "name": "predict_batched", + "startLine": 458, + "endLine": 471, + "params": [ + "model", + "data_dict", + "test_pairs", + "batch_size" + ] + } + ], + "classes": [ + { + "name": "GNNEncoder", + "startLine": 198, + "endLine": 240, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "DotDecoder", + "startLine": 243, + "endLine": 247, + "methods": [ + "forward" + ], + "properties": [] + }, + { + "name": "Recommender", + "startLine": 250, + "endLine": 270, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 36, + "isDefault": false + }, + { + "name": "read_txt", + "line": 48, + "isDefault": false + }, + { + "name": "log_norm", + "line": 106, + "isDefault": false + }, + { + "name": "GNNEncoder", + "line": 198, + "isDefault": false + }, + { + "name": "DotDecoder", + "line": 243, + "isDefault": false + }, + { + "name": "Recommender", + "line": 250, + "isDefault": false + }, + { + "name": "sample_hard_negatives", + "line": 274, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 315, + "isDefault": false + }, + { + "name": "evaluate", + "line": 319, + "isDefault": false + }, + { + "name": "predict_cos", + "line": 341, + "isDefault": false + }, + { + "name": "run_experiment", + "line": 353, + "isDefault": false + }, + { + "name": "predict_batched", + "line": 457, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 37 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 38 + }, + { + "caller": "set_seed", + "callee": "torch.manual_seed", + "lineNumber": 39 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.is_available", + "lineNumber": 40 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.manual_seed_all", + "lineNumber": 41 + }, + { + "caller": "read_txt", + "callee": "open", + "lineNumber": 50 + }, + { + "caller": "read_txt", + "callee": "res_list.append", + "lineNumber": 52 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 52 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 52 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 52 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 52 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 107 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 108 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 108 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 202 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 202 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 211 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 212 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 214 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 215 + }, + { + "caller": "__init__", + "callee": "nn.Dropout", + "lineNumber": 216 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 218 + }, + { + "caller": "__init__", + "callee": "SAGEConv", + "lineNumber": 222 + }, + { + "caller": "__init__", + "callee": "self.convs.append", + "lineNumber": 223 + }, + { + "caller": "__init__", + "callee": "HeteroConv", + "lineNumber": 223 + }, + { + "caller": "__init__", + "callee": "self.norms.append", + "lineNumber": 224 + }, + { + "caller": "__init__", + "callee": "nn.ModuleDict", + "lineNumber": 224 + }, + { + "caller": "__init__", + "callee": "nn.LayerNorm", + "lineNumber": 225 + }, + { + "caller": "__init__", + "callee": "nn.LayerNorm", + "lineNumber": 226 + }, + { + "caller": "forward", + "callee": "self.author_proj", + "lineNumber": 231 + }, + { + "caller": "forward", + "callee": "self.paper_proj", + "lineNumber": 232 + }, + { + "caller": "forward", + "callee": "zip", + "lineNumber": 234 + }, + { + "caller": "forward", + "callee": "conv", + "lineNumber": 235 + }, + { + "caller": "forward", + "callee": "self.dropout", + "lineNumber": 237 + }, + { + "caller": "forward", + "callee": "F.relu", + "lineNumber": 237 + }, + { + "caller": "forward", + "callee": "(author_emb[src] * paper_emb[dst]).sum", + "lineNumber": 247 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 253 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 253 + }, + { + "caller": "__init__", + "callee": "GNNEncoder", + "lineNumber": 254 + }, + { + "caller": "__init__", + "callee": "DotDecoder", + "lineNumber": 256 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 257 + }, + { + "caller": "reset_parameters", + "callee": "self.modules", + "lineNumber": 260 + }, + { + "caller": "reset_parameters", + "callee": "isinstance", + "lineNumber": 261 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 262 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.zeros_", + "lineNumber": 264 + }, + { + "caller": "encode", + "callee": "self.encoder", + "lineNumber": 267 + }, + { + "caller": "decode", + "callee": "self.decoder", + "lineNumber": 270 + }, + { + "caller": "add_random", + "callee": "len", + "lineNumber": 280 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 281 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 282 + }, + { + "caller": "add_random", + "callee": "neg_list.append", + "lineNumber": 284 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 286 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 286 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 291 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 291 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 293 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 294 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 294 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 296 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 300 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 302 + }, + { + "caller": "sample_hard_negatives", + "callee": "coauthor_paper_pool.get", + "lineNumber": 303 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 305 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 305 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 307 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 309 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:target], dtype=torch.long,\n device=device).t().contiguous", + "lineNumber": 310 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:target], dtype=torch.long,\n device=device).t", + "lineNumber": 310 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor", + "lineNumber": 310 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 316 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 316 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 316 + }, + { + "caller": "evaluate", + "callee": "model.eval", + "lineNumber": 321 + }, + { + "caller": "evaluate", + "callee": "model.encode", + "lineNumber": 322 + }, + { + "caller": "evaluate", + "callee": "v.cpu", + "lineNumber": 323 + }, + { + "caller": "evaluate", + "callee": "z_dict.items", + "lineNumber": 323 + }, + { + "caller": "evaluate", + "callee": "val_df[['source', 'target']].to_numpy", + "lineNumber": 325 + }, + { + "caller": "evaluate", + "callee": "cos_sim", + "lineNumber": 326 + }, + { + "caller": "evaluate", + "callee": "z_cpu['author'][val_arr[:, 0]].numpy", + "lineNumber": 327 + }, + { + "caller": "evaluate", + "callee": "z_cpu['paper'][val_arr[:, 1]].numpy", + "lineNumber": 328 + }, + { + "caller": "evaluate", + "callee": "val_df['label'].to_numpy", + "lineNumber": 330 + }, + { + "caller": "evaluate", + "callee": "precision_recall_curve", + "lineNumber": 332 + }, + { + "caller": "evaluate", + "callee": "np.argmax", + "lineNumber": 334 + }, + { + "caller": "evaluate", + "callee": "len", + "lineNumber": 335 + }, + { + "caller": "evaluate", + "callee": "roc_auc_score", + "lineNumber": 337 + }, + { + "caller": "predict_cos", + "callee": "model.eval", + "lineNumber": 343 + }, + { + "caller": "predict_cos", + "callee": "model.encode", + "lineNumber": 344 + }, + { + "caller": "predict_cos", + "callee": "v.cpu", + "lineNumber": 345 + }, + { + "caller": "predict_cos", + "callee": "z_dict.items", + "lineNumber": 345 + }, + { + "caller": "predict_cos", + "callee": "cos_sim", + "lineNumber": 346 + }, + { + "caller": "predict_cos", + "callee": "z_cpu['author'][test_pairs[:, 0]].numpy", + "lineNumber": 347 + }, + { + "caller": "predict_cos", + "callee": "z_cpu['paper'][test_pairs[:, 1]].numpy", + "lineNumber": 348 + }, + { + "caller": "run_experiment", + "callee": "set_seed", + "lineNumber": 355 + }, + { + "caller": "run_experiment", + "callee": "Recommender(\n data.metadata(),\n author_in_dim=author_deg_feat.shape[1],\n paper_in_dim=paper_feat_aug.shape[1],\n hidden_dim=hidden_dim,\n num_layers=num_layers,\n ).to", + "lineNumber": 356 + }, + { + "caller": "run_experiment", + "callee": "Recommender", + "lineNumber": 356 + }, + { + "caller": "run_experiment", + "callee": "data.metadata", + "lineNumber": 357 + }, + { + "caller": "run_experiment", + "callee": "torch.optim.AdamW", + "lineNumber": 364 + }, + { + "caller": "run_experiment", + "callee": "model.parameters", + "lineNumber": 364 + }, + { + "caller": "run_experiment", + "callee": "ReduceLROnPlateau", + "lineNumber": 365 + }, + { + "caller": "run_experiment", + "callee": "set", + "lineNumber": 368 + }, + { + "caller": "run_experiment", + "callee": "map", + "lineNumber": 369 + }, + { + "caller": "run_experiment", + "callee": "train_refs[['source', 'target']].to_numpy().tolist", + "lineNumber": 369 + }, + { + "caller": "run_experiment", + "callee": "train_refs[['source', 'target']].to_numpy", + "lineNumber": 369 + }, + { + "caller": "run_experiment", + "callee": "min", + "lineNumber": 371 + }, + { + "caller": "run_experiment", + "callee": "pos_edge_index.size", + "lineNumber": 371 + }, + { + "caller": "run_experiment", + "callee": "range", + "lineNumber": 379 + }, + { + "caller": "run_experiment", + "callee": "model.train", + "lineNumber": 380 + }, + { + "caller": "run_experiment", + "callee": "torch.randperm", + "lineNumber": 383 + }, + { + "caller": "run_experiment", + "callee": "pos_edge_index.size", + "lineNumber": 383 + }, + { + "caller": "run_experiment", + "callee": "sample_hard_negatives", + "lineNumber": 388 + }, + { + "caller": "run_experiment", + "callee": "pos_batch.size", + "lineNumber": 389 + }, + { + "caller": "run_experiment", + "callee": "len", + "lineNumber": 392 + }, + { + "caller": "run_experiment", + "callee": "pos_batch.size", + "lineNumber": 392 + }, + { + "caller": "run_experiment", + "callee": "np.random.randint", + "lineNumber": 393 + }, + { + "caller": "run_experiment", + "callee": "np.random.randint", + "lineNumber": 394 + }, + { + "caller": "run_experiment", + "callee": "neg_list.append", + "lineNumber": 396 + }, + { + "caller": "run_experiment", + "callee": "torch.tensor(neg_list, dtype=torch.long,\n device=device).t().contiguous", + "lineNumber": 397 + }, + { + "caller": "run_experiment", + "callee": "torch.tensor(neg_list, dtype=torch.long,\n device=device).t", + "lineNumber": 397 + }, + { + "caller": "run_experiment", + "callee": "torch.tensor", + "lineNumber": 397 + }, + { + "caller": "run_experiment", + "callee": "model.encode", + "lineNumber": 401 + }, + { + "caller": "run_experiment", + "callee": "model.decode", + "lineNumber": 402 + }, + { + "caller": "run_experiment", + "callee": "model.decode", + "lineNumber": 403 + }, + { + "caller": "run_experiment", + "callee": "F.logsigmoid(pos_score - neg_score).mean", + "lineNumber": 404 + }, + { + "caller": "run_experiment", + "callee": "F.logsigmoid", + "lineNumber": 404 + }, + { + "caller": "run_experiment", + "callee": "optimizer.zero_grad", + "lineNumber": 406 + }, + { + "caller": "run_experiment", + "callee": "loss.backward", + "lineNumber": 407 + }, + { + "caller": "run_experiment", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 408 + }, + { + "caller": "run_experiment", + "callee": "model.parameters", + "lineNumber": 408 + }, + { + "caller": "run_experiment", + "callee": "optimizer.step", + "lineNumber": 409 + }, + { + "caller": "run_experiment", + "callee": "evaluate", + "lineNumber": 413 + }, + { + "caller": "run_experiment", + "callee": "scheduler.step", + "lineNumber": 414 + }, + { + "caller": "run_experiment", + "callee": "v.cpu().clone", + "lineNumber": 418 + }, + { + "caller": "run_experiment", + "callee": "v.cpu", + "lineNumber": 418 + }, + { + "caller": "run_experiment", + "callee": "model.state_dict().items", + "lineNumber": 418 + }, + { + "caller": "run_experiment", + "callee": "model.state_dict", + "lineNumber": 418 + }, + { + "caller": "run_experiment", + "callee": "print", + "lineNumber": 426 + }, + { + "caller": "run_experiment", + "callee": "loss.item", + "lineNumber": 426 + }, + { + "caller": "run_experiment", + "callee": "print", + "lineNumber": 430 + }, + { + "caller": "run_experiment", + "callee": "model.load_state_dict", + "lineNumber": 433 + }, + { + "caller": "predict_batched", + "callee": "model.eval", + "lineNumber": 459 + }, + { + "caller": "predict_batched", + "callee": "model.encode", + "lineNumber": 460 + }, + { + "caller": "predict_batched", + "callee": "v.cpu", + "lineNumber": 461 + }, + { + "caller": "predict_batched", + "callee": "z_dict.items", + "lineNumber": 461 + }, + { + "caller": "predict_batched", + "callee": "range", + "lineNumber": 463 + }, + { + "caller": "predict_batched", + "callee": "len", + "lineNumber": 463 + }, + { + "caller": "predict_batched", + "callee": "min", + "lineNumber": 464 + }, + { + "caller": "predict_batched", + "callee": "len", + "lineNumber": 464 + }, + { + "caller": "predict_batched", + "callee": "cos_sim", + "lineNumber": 466 + }, + { + "caller": "predict_batched", + "callee": "z_cpu['author'][batch[:, 0]].numpy", + "lineNumber": 467 + }, + { + "caller": "predict_batched", + "callee": "z_cpu['paper'][batch[:, 1]].numpy", + "lineNumber": 468 + }, + { + "caller": "predict_batched", + "callee": "all_scores.append", + "lineNumber": 470 + }, + { + "caller": "predict_batched", + "callee": "np.concatenate", + "lineNumber": 471 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 12, + "functionCount": 9, + "classCount": 3 + } + }, + { + "path": "code/score_level_meta_stack.py", + "language": "python", + "fileCategory": "code", + "totalLines": 236, + "nonEmptyLines": 201, + "functions": [ + { + "name": "load_module", + "startLine": 21, + "endLine": 26, + "params": [ + "name", + "path" + ] + }, + { + "name": "best_f1", + "startLine": 29, + "endLine": 34, + "params": [ + "y", + "s" + ] + }, + { + "name": "prf", + "startLine": 37, + "endLine": 44, + "params": [ + "y", + "pred" + ] + }, + { + "name": "rank01", + "startLine": 47, + "endLine": 51, + "params": [ + "x" + ] + }, + { + "name": "zscore", + "startLine": 54, + "endLine": 55, + "params": [ + "x" + ] + }, + { + "name": "author_rank01", + "startLine": 58, + "endLine": 66, + "params": [ + "pairs", + "score" + ] + }, + { + "name": "add_score_block", + "startLine": 69, + "endLine": 70, + "params": [ + "pairs", + "score" + ] + }, + { + "name": "read_txt", + "startLine": 73, + "endLine": 74, + "params": [ + "path" + ] + }, + { + "name": "load_sources", + "startLine": 77, + "endLine": 105, + "params": [ + "root", + "split_seed", + "n_val", + "n_test" + ] + }, + { + "name": "fit_oof_predict", + "startLine": 108, + "endLine": 133, + "params": [ + "X", + "y", + "X_test", + "kind", + "seed", + "n_splits" + ] + }, + { + "name": "write_sub", + "startLine": 136, + "endLine": 144, + "params": [ + "path", + "score", + "known", + "anchor", + "th", + "ratio" + ] + }, + { + "name": "main", + "startLine": 147, + "endLine": 232, + "params": [] + } + ], + "exports": [ + { + "name": "load_module", + "line": 21, + "isDefault": false + }, + { + "name": "best_f1", + "line": 29, + "isDefault": false + }, + { + "name": "prf", + "line": 37, + "isDefault": false + }, + { + "name": "rank01", + "line": 47, + "isDefault": false + }, + { + "name": "zscore", + "line": 54, + "isDefault": false + }, + { + "name": "author_rank01", + "line": 58, + "isDefault": false + }, + { + "name": "add_score_block", + "line": 69, + "isDefault": false + }, + { + "name": "read_txt", + "line": 73, + "isDefault": false + }, + { + "name": "load_sources", + "line": 77, + "isDefault": false + }, + { + "name": "fit_oof_predict", + "line": 108, + "isDefault": false + }, + { + "name": "write_sub", + "line": 136, + "isDefault": false + }, + { + "name": "main", + "line": 147, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 22 + }, + { + "caller": "load_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 23 + }, + { + "caller": "load_module", + "callee": "spec.loader.exec_module", + "lineNumber": 25 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 32 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 33 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 34 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 34 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 34 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 34 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 34 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 34 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 34 + }, + { + "caller": "prf", + "callee": "int", + "lineNumber": 38 + }, + { + "caller": "prf", + "callee": "((pred == 1) & (y == 1)).sum", + "lineNumber": 38 + }, + { + "caller": "prf", + "callee": "int", + "lineNumber": 39 + }, + { + "caller": "prf", + "callee": "((pred == 1) & (y == 0)).sum", + "lineNumber": 39 + }, + { + "caller": "prf", + "callee": "int", + "lineNumber": 40 + }, + { + "caller": "prf", + "callee": "((pred == 0) & (y == 1)).sum", + "lineNumber": 40 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 48 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 49 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 49 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 50 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 50 + }, + { + "caller": "zscore", + "callee": "((x - x.mean()) / (x.std() + 1e-8)).astype", + "lineNumber": 55 + }, + { + "caller": "zscore", + "callee": "x.mean", + "lineNumber": 55 + }, + { + "caller": "zscore", + "callee": "x.std", + "lineNumber": 55 + }, + { + "caller": "author_rank01", + "callee": "np.zeros", + "lineNumber": 59 + }, + { + "caller": "author_rank01", + "callee": "len", + "lineNumber": 59 + }, + { + "caller": "author_rank01", + "callee": "pd.DataFrame", + "lineNumber": 60 + }, + { + "caller": "author_rank01", + "callee": "np.arange", + "lineNumber": 60 + }, + { + "caller": "author_rank01", + "callee": "len", + "lineNumber": 60 + }, + { + "caller": "author_rank01", + "callee": "df.groupby", + "lineNumber": 61 + }, + { + "caller": "author_rank01", + "callee": "g[\"idx\"].to_numpy", + "lineNumber": 62 + }, + { + "caller": "author_rank01", + "callee": "np.argsort", + "lineNumber": 63 + }, + { + "caller": "author_rank01", + "callee": "g[\"score\"].to_numpy", + "lineNumber": 63 + }, + { + "caller": "author_rank01", + "callee": "np.linspace", + "lineNumber": 64 + }, + { + "caller": "author_rank01", + "callee": "len", + "lineNumber": 64 + }, + { + "caller": "author_rank01", + "callee": "len", + "lineNumber": 64 + }, + { + "caller": "author_rank01", + "callee": "np.array", + "lineNumber": 64 + }, + { + "caller": "add_score_block", + "callee": "np.column_stack([score.astype(np.float32), zscore(score), rank01(score), author_rank01(pairs, score)]).astype", + "lineNumber": 70 + }, + { + "caller": "add_score_block", + "callee": "np.column_stack", + "lineNumber": 70 + }, + { + "caller": "add_score_block", + "callee": "score.astype", + "lineNumber": 70 + }, + { + "caller": "add_score_block", + "callee": "zscore", + "lineNumber": 70 + }, + { + "caller": "add_score_block", + "callee": "rank01", + "lineNumber": 70 + }, + { + "caller": "add_score_block", + "callee": "author_rank01", + "lineNumber": 70 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 74 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 74 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 74 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 74 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 74 + }, + { + "caller": "load_sources", + "callee": "sorted", + "lineNumber": 88 + }, + { + "caller": "load_sources", + "callee": "rw_dir.glob", + "lineNumber": 88 + }, + { + "caller": "load_sources", + "callee": "stem.endswith", + "lineNumber": 90 + }, + { + "caller": "load_sources", + "callee": "test.exists", + "lineNumber": 91 + }, + { + "caller": "load_sources", + "callee": "stem.replace", + "lineNumber": 92 + }, + { + "caller": "load_sources", + "callee": "test.exists", + "lineNumber": 93 + }, + { + "caller": "load_sources", + "callee": "candidates.append", + "lineNumber": 94 + }, + { + "caller": "load_sources", + "callee": "stem.replace", + "lineNumber": 94 + }, + { + "caller": "load_sources", + "callee": "set", + "lineNumber": 96 + }, + { + "caller": "load_sources", + "callee": "vp.exists", + "lineNumber": 98 + }, + { + "caller": "load_sources", + "callee": "tp.exists", + "lineNumber": 98 + }, + { + "caller": "load_sources", + "callee": "np.load(vp).astype", + "lineNumber": 100 + }, + { + "caller": "load_sources", + "callee": "np.load", + "lineNumber": 100 + }, + { + "caller": "load_sources", + "callee": "np.load(tp).astype", + "lineNumber": 101 + }, + { + "caller": "load_sources", + "callee": "np.load", + "lineNumber": 101 + }, + { + "caller": "load_sources", + "callee": "len", + "lineNumber": 102 + }, + { + "caller": "load_sources", + "callee": "len", + "lineNumber": 102 + }, + { + "caller": "load_sources", + "callee": "np.std", + "lineNumber": 102 + }, + { + "caller": "load_sources", + "callee": "out.append", + "lineNumber": 103 + }, + { + "caller": "load_sources", + "callee": "seen.add", + "lineNumber": 104 + }, + { + "caller": "fit_oof_predict", + "callee": "np.zeros", + "lineNumber": 109 + }, + { + "caller": "fit_oof_predict", + "callee": "len", + "lineNumber": 109 + }, + { + "caller": "fit_oof_predict", + "callee": "np.zeros", + "lineNumber": 110 + }, + { + "caller": "fit_oof_predict", + "callee": "StratifiedKFold", + "lineNumber": 111 + }, + { + "caller": "fit_oof_predict", + "callee": "enumerate", + "lineNumber": 113 + }, + { + "caller": "fit_oof_predict", + "callee": "skf.split", + "lineNumber": 113 + }, + { + "caller": "fit_oof_predict", + "callee": "LogisticRegression", + "lineNumber": 115 + }, + { + "caller": "fit_oof_predict", + "callee": "lgb.LGBMClassifier", + "lineNumber": 117 + }, + { + "caller": "fit_oof_predict", + "callee": "clf.fit", + "lineNumber": 129 + }, + { + "caller": "fit_oof_predict", + "callee": "clf.predict_proba(X[va])[:, 1].astype", + "lineNumber": 130 + }, + { + "caller": "fit_oof_predict", + "callee": "clf.predict_proba", + "lineNumber": 130 + }, + { + "caller": "fit_oof_predict", + "callee": "clf.predict_proba(X_test)[:, 1].astype", + "lineNumber": 131 + }, + { + "caller": "fit_oof_predict", + "callee": "clf.predict_proba", + "lineNumber": 131 + }, + { + "caller": "fit_oof_predict", + "callee": "models.append", + "lineNumber": 132 + }, + { + "caller": "write_sub", + "callee": "(score >= th).astype", + "lineNumber": 138 + }, + { + "caller": "write_sub", + "callee": "np.zeros", + "lineNumber": 140 + }, + { + "caller": "write_sub", + "callee": "len", + "lineNumber": 140 + }, + { + "caller": "write_sub", + "callee": "np.argsort", + "lineNumber": 141 + }, + { + "caller": "write_sub", + "callee": "int", + "lineNumber": 141 + }, + { + "caller": "write_sub", + "callee": "round", + "lineNumber": 141 + }, + { + "caller": "write_sub", + "callee": "len", + "lineNumber": 141 + }, + { + "caller": "write_sub", + "callee": "float", + "lineNumber": 141 + }, + { + "caller": "write_sub", + "callee": "pd.DataFrame({\"Index\": np.arange(len(pred), dtype=np.int64), \"Predicted\": pred}).to_csv", + "lineNumber": 143 + }, + { + "caller": "write_sub", + "callee": "pd.DataFrame", + "lineNumber": 143 + }, + { + "caller": "write_sub", + "callee": "np.arange", + "lineNumber": 143 + }, + { + "caller": "write_sub", + "callee": "len", + "lineNumber": 143 + }, + { + "caller": "write_sub", + "callee": "float", + "lineNumber": 144 + }, + { + "caller": "write_sub", + "callee": "pred.mean", + "lineNumber": 144 + }, + { + "caller": "write_sub", + "callee": "int", + "lineNumber": 144 + }, + { + "caller": "write_sub", + "callee": "(pred != anchor).sum", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 149 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 149 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 149 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 150 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 152 + }, + { + "caller": "main", + "callee": "ap.parse_args", + "lineNumber": 153 + }, + { + "caller": "main", + "callee": "args.package_root.resolve", + "lineNumber": 155 + }, + { + "caller": "main", + "callee": "load_module", + "lineNumber": 156 + }, + { + "caller": "main", + "callee": "lgcn.make_notebook_style_split", + "lineNumber": 157 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 158 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 159 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "np.load(root / \"cached_scores/test_known_mask.npy\").astype", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "pd.read_csv(anchor_path)[\"Predicted\"].to_numpy", + "lineNumber": 163 + }, + { + "caller": "main", + "callee": "pd.read_csv", + "lineNumber": 163 + }, + { + "caller": "main", + "callee": "load_sources", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 168 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 169 + }, + { + "caller": "main", + "callee": "blocks.append", + "lineNumber": 177 + }, + { + "caller": "main", + "callee": "add_score_block", + "lineNumber": 177 + }, + { + "caller": "main", + "callee": "test_blocks.append", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "add_score_block", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "names.extend", + "lineNumber": 179 + }, + { + "caller": "main", + "callee": "raw_val.append", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "rank01", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "raw_test.append", + "lineNumber": 181 + }, + { + "caller": "main", + "callee": "rank01", + "lineNumber": 181 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 182 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 183 + }, + { + "caller": "main", + "callee": "np.column_stack([R.mean(axis=0), R.std(axis=0), R.max(axis=0), R.min(axis=0), (R >= 0.5).sum(axis=0), (R >= 0.9).sum(axis=0)]).astype", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "R.mean", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "R.std", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "R.max", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "R.min", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "(R >= 0.5).sum", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "(R >= 0.9).sum", + "lineNumber": 184 + }, + { + "caller": "main", + "callee": "np.column_stack([Rt.mean(axis=0), Rt.std(axis=0), Rt.max(axis=0), Rt.min(axis=0), (Rt >= 0.5).sum(axis=0), (Rt >= 0.9).sum(axis=0)]).astype", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "Rt.mean", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "Rt.std", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "Rt.max", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "Rt.min", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "(Rt >= 0.5).sum", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "(Rt >= 0.9).sum", + "lineNumber": 185 + }, + { + "caller": "main", + "callee": "np.column_stack([*blocks, summary]).astype", + "lineNumber": 186 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 186 + }, + { + "caller": "main", + "callee": "np.column_stack([*test_blocks, summary_t]).astype", + "lineNumber": 187 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 187 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 188 + }, + { + "caller": "main", + "callee": "out.mkdir", + "lineNumber": 192 + }, + { + "caller": "main", + "callee": "sub_dir.mkdir", + "lineNumber": 193 + }, + { + "caller": "main", + "callee": "pd.Series(names + [\"rank_mean\", \"rank_std\", \"rank_max\", \"rank_min\", \"vote_ge_05\", \"vote_ge_09\"]).to_csv", + "lineNumber": 194 + }, + { + "caller": "main", + "callee": "pd.Series", + "lineNumber": 194 + }, + { + "caller": "main", + "callee": "fit_oof_predict", + "lineNumber": 198 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 198 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 199 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 200 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 201 + }, + { + "caller": "main", + "callee": "(oof >= th).astype", + "lineNumber": 202 + }, + { + "caller": "main", + "callee": "prf", + "lineNumber": 203 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 206 + }, + { + "caller": "main", + "callee": "pred.mean", + "lineNumber": 206 + }, + { + "caller": "main", + "callee": "write_sub", + "lineNumber": 212 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 213 + }, + { + "caller": "main", + "callee": "float", + "lineNumber": 222 + }, + { + "caller": "main", + "callee": "pred.mean", + "lineNumber": 222 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 228 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values([\"validation_f1\", \"changed_vs_anchor\"], ascending=[False, True]).to_csv", + "lineNumber": 231 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 231 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 231 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 232 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values([\"validation_f1\", \"changed_vs_anchor\"], ascending=[False, True]).to_string", + "lineNumber": 232 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 232 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 232 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 12, + "functionCount": 12, + "classCount": 0 + } + }, + { + "path": "code/search_dynamic_fusion.py", + "language": "python", + "fileCategory": "code", + "totalLines": 140, + "nonEmptyLines": 116, + "functions": [ + { + "name": "load_train_module", + "startLine": 16, + "endLine": 21, + "params": [ + "path" + ] + }, + { + "name": "best_f1", + "startLine": 24, + "endLine": 28, + "params": [ + "y", + "s" + ] + }, + { + "name": "rank01", + "startLine": 31, + "endLine": 35, + "params": [ + "x" + ] + }, + { + "name": "zscore", + "startLine": 38, + "endLine": 39, + "params": [ + "x" + ] + }, + { + "name": "main", + "startLine": 42, + "endLine": 136, + "params": [] + } + ], + "exports": [ + { + "name": "load_train_module", + "line": 16, + "isDefault": false + }, + { + "name": "best_f1", + "line": 24, + "isDefault": false + }, + { + "name": "rank01", + "line": 31, + "isDefault": false + }, + { + "name": "zscore", + "line": 38, + "isDefault": false + }, + { + "name": "main", + "line": 42, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_train_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 17 + }, + { + "caller": "load_train_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 18 + }, + { + "caller": "load_train_module", + "callee": "spec.loader.exec_module", + "lineNumber": 20 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 25 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 27 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 27 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 28 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 28 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 32 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 33 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 33 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 34 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 34 + }, + { + "caller": "zscore", + "callee": "((x - x.mean()) / (x.std() + 1e-8)).astype", + "lineNumber": 39 + }, + { + "caller": "zscore", + "callee": "x.mean", + "lineNumber": 39 + }, + { + "caller": "zscore", + "callee": "x.std", + "lineNumber": 39 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 45 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 47 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 48 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 49 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 50 + }, + { + "caller": "main", + "callee": "load_train_module", + "lineNumber": 53 + }, + { + "caller": "main", + "callee": "tv.make_notebook_style_split", + "lineNumber": 54 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "score_files.extend", + "lineNumber": 59 + }, + { + "caller": "main", + "callee": "split_dir.glob", + "lineNumber": 59 + }, + { + "caller": "main", + "callee": "score_files.extend", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "split_dir.glob", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "score_files.extend", + "lineNumber": 61 + }, + { + "caller": "main", + "callee": "split_dir.glob", + "lineNumber": 61 + }, + { + "caller": "main", + "callee": "sorted", + "lineNumber": 62 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 62 + }, + { + "caller": "main", + "callee": "np.load(path).astype", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 67 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 67 + }, + { + "caller": "main", + "callee": "np.std", + "lineNumber": 67 + }, + { + "caller": "main", + "callee": "names.append", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "path.relative_to", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "cols.append", + "lineNumber": 70 + }, + { + "caller": "main", + "callee": "SystemExit", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "enumerate", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 77 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 78 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "names.index", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "single[\"name\"].head", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "min", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "transform", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "range", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "S.mean", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "np.random.default_rng", + "lineNumber": 88 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "transform", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "range", + "lineNumber": 92 + }, + { + "caller": "main", + "callee": "rng.dirichlet", + "lineNumber": 93 + }, + { + "caller": "main", + "callee": "rng.uniform", + "lineNumber": 93 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 93 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 99 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 101 + }, + { + "caller": "main", + "callee": "\",\".join", + "lineNumber": 102 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 103 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 109 + }, + { + "caller": "main", + "callee": "min", + "lineNumber": 111 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 111 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 113 + }, + { + "caller": "main", + "callee": "rank01", + "lineNumber": 113 + }, + { + "caller": "main", + "callee": "np.zeros", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "StratifiedKFold", + "lineNumber": 115 + }, + { + "caller": "main", + "callee": "skf.split", + "lineNumber": 116 + }, + { + "caller": "main", + "callee": "LogisticRegression", + "lineNumber": 117 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 118 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 119 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 120 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "\",\".join", + "lineNumber": 124 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 132 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 132 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "result.head(50).to_string", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "result.head", + "lineNumber": 136 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 5, + "functionCount": 5, + "classCount": 0 + } + }, + { + "path": "code/search_val_fusion.py", + "language": "python", + "fileCategory": "code", + "totalLines": 127, + "nonEmptyLines": 105, + "functions": [ + { + "name": "best_f1", + "startLine": 15, + "endLine": 20, + "params": [ + "labels", + "scores" + ] + }, + { + "name": "rank01", + "startLine": 23, + "endLine": 27, + "params": [ + "x" + ] + }, + { + "name": "zscore", + "startLine": 30, + "endLine": 31, + "params": [ + "x" + ] + }, + { + "name": "main", + "startLine": 34, + "endLine": 123, + "params": [] + } + ], + "exports": [ + { + "name": "best_f1", + "line": 15, + "isDefault": false + }, + { + "name": "rank01", + "line": 23, + "isDefault": false + }, + { + "name": "zscore", + "line": 30, + "isDefault": false + }, + { + "name": "main", + "line": 34, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 16 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 18 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 18 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 19 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 19 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 20 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 20 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 20 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 24 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 25 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 25 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 26 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 26 + }, + { + "caller": "zscore", + "callee": "((x - x.mean()) / (x.std() + 1e-8)).astype", + "lineNumber": 31 + }, + { + "caller": "zscore", + "callee": "x.mean", + "lineNumber": 31 + }, + { + "caller": "zscore", + "callee": "x.std", + "lineNumber": 31 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 35 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 36 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 36 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 36 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 37 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 38 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 39 + }, + { + "caller": "main", + "callee": "pd.read_csv(root / \"splits\" / \"notebook_seed0\" / \"val_pairs.csv\")[\"label\"].to_numpy", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "pd.read_csv", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "score_files.extend", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / \"notebook_seed0\").glob", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "score_files.extend", + "lineNumber": 45 + }, + { + "caller": "main", + "callee": "(root / \"validation_runs\" / \"notebook_seed0\" / \"score_modes\").glob", + "lineNumber": 45 + }, + { + "caller": "main", + "callee": "sorted", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "np.load(path).astype", + "lineNumber": 53 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 53 + }, + { + "caller": "main", + "callee": "np.std", + "lineNumber": 54 + }, + { + "caller": "main", + "callee": "str", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "path.relative_to", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "names.append", + "lineNumber": 57 + }, + { + "caller": "main", + "callee": "cols.append", + "lineNumber": 58 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 61 + }, + { + "caller": "main", + "callee": "enumerate", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "transform", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "range", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "S.mean", + "lineNumber": 70 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 71 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "single_df[single_df[\"method\"] == \"single\"].head", + "lineNumber": 76 + }, + { + "caller": "main", + "callee": "top_idx.append", + "lineNumber": 78 + }, + { + "caller": "main", + "callee": "names.index", + "lineNumber": 78 + }, + { + "caller": "main", + "callee": "sorted", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "np.random.default_rng", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "transform", + "lineNumber": 84 + }, + { + "caller": "main", + "callee": "range", + "lineNumber": 85 + }, + { + "caller": "main", + "callee": "rng.uniform", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "rng.dirichlet", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 89 + }, + { + "caller": "main", + "callee": "\",\".join", + "lineNumber": 93 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 102 + }, + { + "caller": "main", + "callee": "np.vstack", + "lineNumber": 106 + }, + { + "caller": "main", + "callee": "rank01", + "lineNumber": 106 + }, + { + "caller": "main", + "callee": "np.zeros", + "lineNumber": 107 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 107 + }, + { + "caller": "main", + "callee": "StratifiedKFold", + "lineNumber": 108 + }, + { + "caller": "main", + "callee": "skf.split", + "lineNumber": 109 + }, + { + "caller": "main", + "callee": "LogisticRegression", + "lineNumber": 110 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 111 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 112 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 113 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "\",\".join", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 114 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 117 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 118 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 118 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 119 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 121 + }, + { + "caller": "main", + "callee": "(out_dir / \"best_random_members.txt\").write_text", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "\"\\n\".join", + "lineNumber": 122 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "result.head(40).to_string", + "lineNumber": 123 + }, + { + "caller": "main", + "callee": "result.head", + "lineNumber": 123 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 4, + "functionCount": 4, + "classCount": 0 + } + }, + { + "path": "code/stack_rank_calibration.py", + "language": "python", + "fileCategory": "code", + "totalLines": 294, + "nonEmptyLines": 254, + "functions": [ + { + "name": "load_lgcn_module", + "startLine": 22, + "endLine": 27, + "params": [ + "path" + ] + }, + { + "name": "read_txt", + "startLine": 30, + "endLine": 31, + "params": [ + "path" + ] + }, + { + "name": "best_f1", + "startLine": 34, + "endLine": 39, + "params": [ + "y", + "score" + ] + }, + { + "name": "rank01", + "startLine": 42, + "endLine": 46, + "params": [ + "x" + ] + }, + { + "name": "zscore", + "startLine": 49, + "endLine": 50, + "params": [ + "x" + ] + }, + { + "name": "add_rank_features", + "startLine": 148, + "endLine": 160, + "params": [ + "pairs", + "score" + ] + }, + { + "name": "fit_oof", + "startLine": 163, + "endLine": 184, + "params": [ + "X", + "y", + "model_kind", + "seed", + "n_splits" + ] + }, + { + "name": "boundary_rerank", + "startLine": 187, + "endLine": 201, + "params": [ + "y", + "lgcn", + "stack", + "raw_th" + ] + }, + { + "name": "main", + "startLine": 204, + "endLine": 290, + "params": [] + } + ], + "classes": [ + { + "name": "ExplicitGraphFeatures", + "startLine": 53, + "endLine": 145, + "methods": [ + "__init__", + "transform" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "load_lgcn_module", + "line": 22, + "isDefault": false + }, + { + "name": "read_txt", + "line": 30, + "isDefault": false + }, + { + "name": "best_f1", + "line": 34, + "isDefault": false + }, + { + "name": "rank01", + "line": 42, + "isDefault": false + }, + { + "name": "zscore", + "line": 49, + "isDefault": false + }, + { + "name": "ExplicitGraphFeatures", + "line": 53, + "isDefault": false + }, + { + "name": "add_rank_features", + "line": 148, + "isDefault": false + }, + { + "name": "fit_oof", + "line": 163, + "isDefault": false + }, + { + "name": "boundary_rerank", + "line": 187, + "isDefault": false + }, + { + "name": "main", + "line": 204, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_lgcn_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 23 + }, + { + "caller": "load_lgcn_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 24 + }, + { + "caller": "load_lgcn_module", + "callee": "spec.loader.exec_module", + "lineNumber": 26 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 31 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 31 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 31 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 31 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 31 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 35 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 38 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 38 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 39 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 39 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 39 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 43 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 44 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 44 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 45 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 45 + }, + { + "caller": "zscore", + "callee": "((x - x.mean()) / (x.std() + 1e-8)).astype", + "lineNumber": 50 + }, + { + "caller": "zscore", + "callee": "x.mean", + "lineNumber": 50 + }, + { + "caller": "zscore", + "callee": "x.std", + "lineNumber": 50 + }, + { + "caller": "__init__", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 58 + }, + { + "caller": "__init__", + "callee": "np.array", + "lineNumber": 59 + }, + { + "caller": "__init__", + "callee": "read_txt", + "lineNumber": 59 + }, + { + "caller": "__init__", + "callee": "np.array", + "lineNumber": 60 + }, + { + "caller": "__init__", + "callee": "read_txt", + "lineNumber": 60 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 62 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 62 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 63 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 63 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 64 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 65 + }, + { + "caller": "__init__", + "callee": "int", + "lineNumber": 67 + }, + { + "caller": "__init__", + "callee": "int", + "lineNumber": 68 + }, + { + "caller": "__init__", + "callee": "self.author_papers[a].add", + "lineNumber": 69 + }, + { + "caller": "__init__", + "callee": "self.paper_readers[p].add", + "lineNumber": 70 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 74 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 74 + }, + { + "caller": "__init__", + "callee": "self.coauthors[int(a)].add", + "lineNumber": 76 + }, + { + "caller": "__init__", + "callee": "int", + "lineNumber": 76 + }, + { + "caller": "__init__", + "callee": "int", + "lineNumber": 76 + }, + { + "caller": "__init__", + "callee": "self.coauthors[int(b)].add", + "lineNumber": 77 + }, + { + "caller": "__init__", + "callee": "int", + "lineNumber": 77 + }, + { + "caller": "__init__", + "callee": "int", + "lineNumber": 77 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 79 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 79 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 80 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 80 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 81 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 82 + }, + { + "caller": "__init__", + "callee": "int", + "lineNumber": 84 + }, + { + "caller": "__init__", + "callee": "int", + "lineNumber": 85 + }, + { + "caller": "__init__", + "callee": "self.paper_refs[s].add", + "lineNumber": 86 + }, + { + "caller": "__init__", + "callee": "self.paper_cited_by[t].add", + "lineNumber": 87 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 92 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 92 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 93 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 94 + }, + { + "caller": "__init__", + "callee": "neigh.update", + "lineNumber": 96 + }, + { + "caller": "__init__", + "callee": "neigh.discard", + "lineNumber": 97 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 101 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 101 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 102 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 103 + }, + { + "caller": "__init__", + "callee": "papers.update", + "lineNumber": 105 + }, + { + "caller": "transform", + "callee": "np.zeros", + "lineNumber": 109 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 109 + }, + { + "caller": "transform", + "callee": "enumerate", + "lineNumber": 110 + }, + { + "caller": "transform", + "callee": "int", + "lineNumber": 111 + }, + { + "caller": "transform", + "callee": "int", + "lineNumber": 112 + }, + { + "caller": "transform", + "callee": "sum", + "lineNumber": 120 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 121 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 122 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 123 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 124 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 125 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 129 + }, + { + "caller": "transform", + "callee": "max", + "lineNumber": 131 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 131 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 131 + }, + { + "caller": "transform", + "callee": "max", + "lineNumber": 136 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 136 + }, + { + "caller": "transform", + "callee": "max", + "lineNumber": 137 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 137 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 138 + }, + { + "caller": "transform", + "callee": "max", + "lineNumber": 142 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 142 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 142 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 143 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 144 + }, + { + "caller": "add_rank_features", + "callee": "rank01", + "lineNumber": 149 + }, + { + "caller": "add_rank_features", + "callee": "np.zeros", + "lineNumber": 150 + }, + { + "caller": "add_rank_features", + "callee": "len", + "lineNumber": 150 + }, + { + "caller": "add_rank_features", + "callee": "np.zeros", + "lineNumber": 151 + }, + { + "caller": "add_rank_features", + "callee": "len", + "lineNumber": 151 + }, + { + "caller": "add_rank_features", + "callee": "pd.DataFrame", + "lineNumber": 152 + }, + { + "caller": "add_rank_features", + "callee": "np.arange", + "lineNumber": 152 + }, + { + "caller": "add_rank_features", + "callee": "len", + "lineNumber": 152 + }, + { + "caller": "add_rank_features", + "callee": "df.groupby", + "lineNumber": 153 + }, + { + "caller": "add_rank_features", + "callee": "np.argsort", + "lineNumber": 154 + }, + { + "caller": "add_rank_features", + "callee": "g[\"score\"].to_numpy", + "lineNumber": 154 + }, + { + "caller": "add_rank_features", + "callee": "g[\"idx\"].to_numpy", + "lineNumber": 155 + }, + { + "caller": "add_rank_features", + "callee": "len", + "lineNumber": 156 + }, + { + "caller": "add_rank_features", + "callee": "np.linspace", + "lineNumber": 157 + }, + { + "caller": "add_rank_features", + "callee": "np.array", + "lineNumber": 157 + }, + { + "caller": "add_rank_features", + "callee": "np.arange", + "lineNumber": 159 + }, + { + "caller": "add_rank_features", + "callee": "np.column_stack", + "lineNumber": 160 + }, + { + "caller": "add_rank_features", + "callee": "score.astype", + "lineNumber": 160 + }, + { + "caller": "fit_oof", + "callee": "np.zeros", + "lineNumber": 164 + }, + { + "caller": "fit_oof", + "callee": "len", + "lineNumber": 164 + }, + { + "caller": "fit_oof", + "callee": "StratifiedKFold", + "lineNumber": 165 + }, + { + "caller": "fit_oof", + "callee": "enumerate", + "lineNumber": 166 + }, + { + "caller": "fit_oof", + "callee": "skf.split", + "lineNumber": 166 + }, + { + "caller": "fit_oof", + "callee": "LogisticRegression", + "lineNumber": 168 + }, + { + "caller": "fit_oof", + "callee": "lgb.LGBMClassifier", + "lineNumber": 170 + }, + { + "caller": "fit_oof", + "callee": "clf.fit", + "lineNumber": 182 + }, + { + "caller": "fit_oof", + "callee": "clf.predict_proba", + "lineNumber": 183 + }, + { + "caller": "boundary_rerank", + "callee": "np.abs", + "lineNumber": 189 + }, + { + "caller": "boundary_rerank", + "callee": "np.quantile", + "lineNumber": 191 + }, + { + "caller": "boundary_rerank", + "callee": "np.linspace", + "lineNumber": 193 + }, + { + "caller": "boundary_rerank", + "callee": "zscore", + "lineNumber": 194 + }, + { + "caller": "boundary_rerank", + "callee": "zscore", + "lineNumber": 195 + }, + { + "caller": "boundary_rerank", + "callee": "zscore", + "lineNumber": 195 + }, + { + "caller": "boundary_rerank", + "callee": "best_f1", + "lineNumber": 197 + }, + { + "caller": "boundary_rerank", + "callee": "float", + "lineNumber": 198 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 205 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 206 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 206 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 206 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 207 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 208 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 209 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 210 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 211 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 212 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 213 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 214 + }, + { + "caller": "main", + "callee": "load_lgcn_module", + "lineNumber": 217 + }, + { + "caller": "main", + "callee": "lgcn_mod.make_notebook_style_split", + "lineNumber": 218 + }, + { + "caller": "main", + "callee": "ExplicitGraphFeatures", + "lineNumber": 219 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 221 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 222 + }, + { + "caller": "main", + "callee": "np.load(args.lgcn_score_file).astype", + "lineNumber": 223 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 223 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 224 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 224 + }, + { + "caller": "main", + "callee": "ValueError", + "lineNumber": 225 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 225 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 225 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 227 + }, + { + "caller": "main", + "callee": "builder.transform", + "lineNumber": 228 + }, + { + "caller": "main", + "callee": "add_rank_features", + "lineNumber": 229 + }, + { + "caller": "main", + "callee": "np.column_stack([X_rank, X_hand]).astype", + "lineNumber": 230 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 230 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 232 + }, + { + "caller": "main", + "callee": "fit_oof", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "fit_oof", + "lineNumber": 235 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 236 + }, + { + "caller": "main", + "callee": "boundary_rerank", + "lineNumber": 237 + }, + { + "caller": "main", + "callee": "out_dir.mkdir", + "lineNumber": 240 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 241 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 242 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 249 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 249 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 250 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "result.to_string", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "np.array", + "lineNumber": 254 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 254 + }, + { + "caller": "main", + "callee": "np.load(args.test_score_file).astype", + "lineNumber": 255 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 255 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 256 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 256 + }, + { + "caller": "main", + "callee": "ValueError", + "lineNumber": 257 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 257 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 257 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 260 + }, + { + "caller": "main", + "callee": "read_txt", + "lineNumber": 261 + }, + { + "caller": "main", + "callee": "ExplicitGraphFeatures", + "lineNumber": 264 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 265 + }, + { + "caller": "main", + "callee": "np.column_stack([add_rank_features(test_pairs, test_score), test_builder.transform(test_pairs)]).astype", + "lineNumber": 266 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 266 + }, + { + "caller": "main", + "callee": "add_rank_features", + "lineNumber": 266 + }, + { + "caller": "main", + "callee": "test_builder.transform", + "lineNumber": 266 + }, + { + "caller": "main", + "callee": "lgb.LGBMClassifier", + "lineNumber": 267 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 279 + }, + { + "caller": "main", + "callee": "clf.predict_proba(X_test)[:, 1].astype", + "lineNumber": 280 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 280 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 281 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 283 + }, + { + "caller": "main", + "callee": "round", + "lineNumber": 283 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 283 + }, + { + "caller": "main", + "callee": "np.zeros", + "lineNumber": 284 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 284 + }, + { + "caller": "main", + "callee": "np.argsort", + "lineNumber": 285 + }, + { + "caller": "main", + "callee": "np.load(root / \"cached_scores\" / \"test_known_mask.npy\").astype", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 286 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 288 + }, + { + "caller": "main", + "callee": "np.arange", + "lineNumber": 288 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 288 + }, + { + "caller": "main", + "callee": "sub.to_csv", + "lineNumber": 289 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 290 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 10, + "functionCount": 9, + "classCount": 1 + } + }, + { + "path": "code/train_dynamic_feature_fusion.py", + "language": "python", + "fileCategory": "code", + "totalLines": 282, + "nonEmptyLines": 252, + "functions": [ + { + "name": "load_train_module", + "startLine": 21, + "endLine": 26, + "params": [ + "path" + ] + }, + { + "name": "read_txt", + "startLine": 29, + "endLine": 30, + "params": [ + "path" + ] + }, + { + "name": "best_f1", + "startLine": 33, + "endLine": 37, + "params": [ + "y", + "s" + ] + }, + { + "name": "rank01", + "startLine": 40, + "endLine": 44, + "params": [ + "x" + ] + }, + { + "name": "main", + "startLine": 204, + "endLine": 278, + "params": [] + } + ], + "classes": [ + { + "name": "FeatureBuilder", + "startLine": 47, + "endLine": 201, + "methods": [ + "__init__", + "sample_train_pairs", + "sample_task_pairs", + "transform" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "load_train_module", + "line": 21, + "isDefault": false + }, + { + "name": "read_txt", + "line": 29, + "isDefault": false + }, + { + "name": "best_f1", + "line": 33, + "isDefault": false + }, + { + "name": "rank01", + "line": 40, + "isDefault": false + }, + { + "name": "FeatureBuilder", + "line": 47, + "isDefault": false + }, + { + "name": "main", + "line": 204, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_train_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 22 + }, + { + "caller": "load_train_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 23 + }, + { + "caller": "load_train_module", + "callee": "spec.loader.exec_module", + "lineNumber": 25 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 30 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 30 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 30 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 30 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 30 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 34 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 36 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 37 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 37 + }, + { + "caller": "rank01", + "callee": "np.argsort", + "lineNumber": 41 + }, + { + "caller": "rank01", + "callee": "np.empty", + "lineNumber": 42 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 42 + }, + { + "caller": "rank01", + "callee": "np.linspace", + "lineNumber": 43 + }, + { + "caller": "rank01", + "callee": "len", + "lineNumber": 43 + }, + { + "caller": "__init__", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 51 + }, + { + "caller": "__init__", + "callee": "np.array", + "lineNumber": 52 + }, + { + "caller": "__init__", + "callee": "read_txt", + "lineNumber": 52 + }, + { + "caller": "__init__", + "callee": "np.array", + "lineNumber": 53 + }, + { + "caller": "__init__", + "callee": "read_txt", + "lineNumber": 53 + }, + { + "caller": "__init__", + "callee": "(data_dir / \"feature.pkl\").open", + "lineNumber": 54 + }, + { + "caller": "__init__", + "callee": "pkl.load(f).numpy().astype", + "lineNumber": 55 + }, + { + "caller": "__init__", + "callee": "pkl.load(f).numpy", + "lineNumber": 55 + }, + { + "caller": "__init__", + "callee": "pkl.load", + "lineNumber": 55 + }, + { + "caller": "__init__", + "callee": "np.linalg.norm", + "lineNumber": 56 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 61 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 62 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 66 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 67 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 72 + }, + { + "caller": "__init__", + "callee": "self.author_papers[a].append", + "lineNumber": 74 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 75 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 76 + }, + { + "caller": "__init__", + "callee": "np.zeros", + "lineNumber": 77 + }, + { + "caller": "__init__", + "callee": "enumerate", + "lineNumber": 78 + }, + { + "caller": "__init__", + "callee": "np.array", + "lineNumber": 80 + }, + { + "caller": "__init__", + "callee": "pf.mean", + "lineNumber": 81 + }, + { + "caller": "__init__", + "callee": "np.linalg.norm", + "lineNumber": 82 + }, + { + "caller": "__init__", + "callee": "np.array", + "lineNumber": 85 + }, + { + "caller": "__init__", + "callee": "pops.max", + "lineNumber": 86 + }, + { + "caller": "__init__", + "callee": "pops.mean", + "lineNumber": 87 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 89 + }, + { + "caller": "__init__", + "callee": "map", + "lineNumber": 89 + }, + { + "caller": "__init__", + "callee": "self.train.tolist", + "lineNumber": 89 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 90 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 90 + }, + { + "caller": "__init__", + "callee": "self.coauthors[a].add", + "lineNumber": 92 + }, + { + "caller": "__init__", + "callee": "self.coauthors[b].add", + "lineNumber": 93 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 94 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 94 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 95 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 96 + }, + { + "caller": "__init__", + "callee": "s.update", + "lineNumber": 98 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 101 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 101 + }, + { + "caller": "__init__", + "callee": "set", + "lineNumber": 102 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 102 + }, + { + "caller": "__init__", + "callee": "self.cites[s].add", + "lineNumber": 104 + }, + { + "caller": "__init__", + "callee": "self.cited_by[t].add", + "lineNumber": 105 + }, + { + "caller": "sample_train_pairs", + "callee": "np.random.default_rng", + "lineNumber": 108 + }, + { + "caller": "sample_train_pairs", + "callee": "rng.choice", + "lineNumber": 109 + }, + { + "caller": "sample_train_pairs", + "callee": "len", + "lineNumber": 109 + }, + { + "caller": "sample_train_pairs", + "callee": "min", + "lineNumber": 109 + }, + { + "caller": "sample_train_pairs", + "callee": "len", + "lineNumber": 109 + }, + { + "caller": "sample_train_pairs", + "callee": "np.flatnonzero", + "lineNumber": 114 + }, + { + "caller": "sample_train_pairs", + "callee": "np.percentile", + "lineNumber": 114 + }, + { + "caller": "sample_train_pairs", + "callee": "len", + "lineNumber": 115 + }, + { + "caller": "sample_train_pairs", + "callee": "len", + "lineNumber": 115 + }, + { + "caller": "sample_train_pairs", + "callee": "int", + "lineNumber": 116 + }, + { + "caller": "sample_train_pairs", + "callee": "len", + "lineNumber": 116 + }, + { + "caller": "sample_train_pairs", + "callee": "len", + "lineNumber": 116 + }, + { + "caller": "sample_train_pairs", + "callee": "rng.random", + "lineNumber": 117 + }, + { + "caller": "sample_train_pairs", + "callee": "int", + "lineNumber": 118 + }, + { + "caller": "sample_train_pairs", + "callee": "rng.choice", + "lineNumber": 118 + }, + { + "caller": "sample_train_pairs", + "callee": "list", + "lineNumber": 118 + }, + { + "caller": "sample_train_pairs", + "callee": "rng.random", + "lineNumber": 119 + }, + { + "caller": "sample_train_pairs", + "callee": "int", + "lineNumber": 121 + }, + { + "caller": "sample_train_pairs", + "callee": "rng.choice", + "lineNumber": 121 + }, + { + "caller": "sample_train_pairs", + "callee": "int", + "lineNumber": 123 + }, + { + "caller": "sample_train_pairs", + "callee": "rng.integers", + "lineNumber": 123 + }, + { + "caller": "sample_train_pairs", + "callee": "neg.append", + "lineNumber": 125 + }, + { + "caller": "sample_train_pairs", + "callee": "np.vstack", + "lineNumber": 126 + }, + { + "caller": "sample_train_pairs", + "callee": "np.array", + "lineNumber": 126 + }, + { + "caller": "sample_train_pairs", + "callee": "np.concatenate", + "lineNumber": 127 + }, + { + "caller": "sample_train_pairs", + "callee": "np.ones", + "lineNumber": 127 + }, + { + "caller": "sample_train_pairs", + "callee": "len", + "lineNumber": 127 + }, + { + "caller": "sample_train_pairs", + "callee": "np.zeros", + "lineNumber": 127 + }, + { + "caller": "sample_train_pairs", + "callee": "len", + "lineNumber": 127 + }, + { + "caller": "sample_task_pairs", + "callee": "np.random.default_rng", + "lineNumber": 138 + }, + { + "caller": "sample_task_pairs", + "callee": "rng.choice", + "lineNumber": 139 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 139 + }, + { + "caller": "sample_task_pairs", + "callee": "min", + "lineNumber": 139 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 139 + }, + { + "caller": "sample_task_pairs", + "callee": "positives[pos_idx].astype", + "lineNumber": 140 + }, + { + "caller": "sample_task_pairs", + "callee": "np.flatnonzero", + "lineNumber": 143 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 144 + }, + { + "caller": "sample_task_pairs", + "callee": "np.arange", + "lineNumber": 145 + }, + { + "caller": "sample_task_pairs", + "callee": "np.percentile", + "lineNumber": 146 + }, + { + "caller": "sample_task_pairs", + "callee": "np.flatnonzero", + "lineNumber": 147 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 148 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 148 + }, + { + "caller": "sample_task_pairs", + "callee": "int", + "lineNumber": 149 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 149 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 149 + }, + { + "caller": "sample_task_pairs", + "callee": "rng.random", + "lineNumber": 150 + }, + { + "caller": "sample_task_pairs", + "callee": "int", + "lineNumber": 152 + }, + { + "caller": "sample_task_pairs", + "callee": "rng.choice", + "lineNumber": 152 + }, + { + "caller": "sample_task_pairs", + "callee": "list", + "lineNumber": 152 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 153 + }, + { + "caller": "sample_task_pairs", + "callee": "int", + "lineNumber": 154 + }, + { + "caller": "sample_task_pairs", + "callee": "rng.choice", + "lineNumber": 154 + }, + { + "caller": "sample_task_pairs", + "callee": "int", + "lineNumber": 156 + }, + { + "caller": "sample_task_pairs", + "callee": "rng.integers", + "lineNumber": 156 + }, + { + "caller": "sample_task_pairs", + "callee": "neg.append", + "lineNumber": 158 + }, + { + "caller": "sample_task_pairs", + "callee": "np.vstack", + "lineNumber": 159 + }, + { + "caller": "sample_task_pairs", + "callee": "np.array", + "lineNumber": 159 + }, + { + "caller": "sample_task_pairs", + "callee": "np.concatenate", + "lineNumber": 160 + }, + { + "caller": "sample_task_pairs", + "callee": "np.ones", + "lineNumber": 160 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 160 + }, + { + "caller": "sample_task_pairs", + "callee": "np.zeros", + "lineNumber": 160 + }, + { + "caller": "sample_task_pairs", + "callee": "len", + "lineNumber": 160 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 164 + }, + { + "caller": "transform", + "callee": "np.zeros", + "lineNumber": 165 + }, + { + "caller": "transform", + "callee": "enumerate", + "lineNumber": 166 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 168 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 169 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 170 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 171 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 172 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 172 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 175 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 176 + }, + { + "caller": "transform", + "callee": "sum", + "lineNumber": 176 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 177 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 178 + }, + { + "caller": "transform", + "callee": "self.author_profile[a].dot", + "lineNumber": 178 + }, + { + "caller": "transform", + "callee": "np.array", + "lineNumber": 180 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 182 + }, + { + "caller": "transform", + "callee": "sims.max", + "lineNumber": 182 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 183 + }, + { + "caller": "transform", + "callee": "sims.mean", + "lineNumber": 183 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 184 + }, + { + "caller": "transform", + "callee": "np.percentile", + "lineNumber": 184 + }, + { + "caller": "transform", + "callee": "set", + "lineNumber": 188 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 189 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 189 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 190 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 190 + }, + { + "caller": "transform", + "callee": "set", + "lineNumber": 191 + }, + { + "caller": "transform", + "callee": "total_neighbors.update", + "lineNumber": 193 + }, + { + "caller": "transform", + "callee": "total_neighbors.update", + "lineNumber": 194 + }, + { + "caller": "transform", + "callee": "float", + "lineNumber": 195 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 196 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 196 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 197 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 197 + }, + { + "caller": "transform", + "callee": "np.log1p", + "lineNumber": 198 + }, + { + "caller": "transform", + "callee": "len", + "lineNumber": 198 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 205 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 206 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 206 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 206 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 207 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 208 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 209 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 210 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 211 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 212 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 213 + }, + { + "caller": "main", + "callee": "load_train_module", + "lineNumber": 216 + }, + { + "caller": "main", + "callee": "tv.make_notebook_style_split", + "lineNumber": 217 + }, + { + "caller": "main", + "callee": "np.random.default_rng", + "lineNumber": 218 + }, + { + "caller": "main", + "callee": "rng.random", + "lineNumber": 219 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 219 + }, + { + "caller": "main", + "callee": "train_refs.loc[mask].copy", + "lineNumber": 220 + }, + { + "caller": "main", + "callee": "train_refs.loc[~mask, [\"source\", \"target\"]].to_numpy", + "lineNumber": 221 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 222 + }, + { + "caller": "main", + "callee": "map", + "lineNumber": 222 + }, + { + "caller": "main", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy(np.int64).tolist", + "lineNumber": 222 + }, + { + "caller": "main", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 222 + }, + { + "caller": "main", + "callee": "FeatureBuilder", + "lineNumber": 224 + }, + { + "caller": "main", + "callee": "FeatureBuilder", + "lineNumber": 225 + }, + { + "caller": "main", + "callee": "train_fb.sample_task_pairs", + "lineNumber": 226 + }, + { + "caller": "main", + "callee": "val_pairs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 233 + }, + { + "caller": "main", + "callee": "val_pairs[\"label\"].to_numpy", + "lineNumber": 234 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 236 + }, + { + "caller": "main", + "callee": "train_fb.transform", + "lineNumber": 237 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 238 + }, + { + "caller": "main", + "callee": "eval_fb.transform", + "lineNumber": 239 + }, + { + "caller": "main", + "callee": "sorted", + "lineNumber": 244 + }, + { + "caller": "main", + "callee": "score_dir.glob", + "lineNumber": 244 + }, + { + "caller": "main", + "callee": "np.load(c).astype", + "lineNumber": 246 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 246 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 247 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 247 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 248 + }, + { + "caller": "main", + "callee": "rank01", + "lineNumber": 248 + }, + { + "caller": "main", + "callee": "np.column_stack", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "np.zeros", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "np.zeros", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 251 + }, + { + "caller": "main", + "callee": "lgb.LGBMClassifier", + "lineNumber": 253 + }, + { + "caller": "main", + "callee": "clf.fit", + "lineNumber": 265 + }, + { + "caller": "main", + "callee": "lgb.early_stopping", + "lineNumber": 270 + }, + { + "caller": "main", + "callee": "clf.predict_proba(X_val)[:, 1].astype", + "lineNumber": 272 + }, + { + "caller": "main", + "callee": "clf.predict_proba", + "lineNumber": 272 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 273 + }, + { + "caller": "main", + "callee": "out.mkdir", + "lineNumber": 275 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 276 + }, + { + "caller": "main", + "callee": "pd.DataFrame([{\"f1\": f1, \"threshold\": th, \"auc\": auc, \"best_iter\": clf.best_iteration_}]).to_csv", + "lineNumber": 277 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 277 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 278 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 6, + "functionCount": 5, + "classCount": 1 + } + }, + { + "path": "code/train_val_hgt_bpr.py", + "language": "python", + "fileCategory": "code", + "totalLines": 188, + "nonEmptyLines": 164, + "functions": [ + { + "name": "load_lgcn_module", + "startLine": 17, + "endLine": 22, + "params": [ + "path" + ] + }, + { + "name": "predict_scores", + "startLine": 68, + "endLine": 77, + "params": [ + "model", + "data", + "pairs", + "batch_size" + ] + }, + { + "name": "train_one", + "startLine": 80, + "endLine": 130, + "params": [ + "args", + "lgcn", + "parts", + "data", + "seed", + "out_dir" + ] + }, + { + "name": "main", + "startLine": 133, + "endLine": 184, + "params": [] + } + ], + "classes": [ + { + "name": "HGTRecommender", + "startLine": 25, + "endLine": 64, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "load_lgcn_module", + "line": 17, + "isDefault": false + }, + { + "name": "HGTRecommender", + "line": 25, + "isDefault": false + }, + { + "name": "predict_scores", + "line": 67, + "isDefault": false + }, + { + "name": "train_one", + "line": 80, + "isDefault": false + }, + { + "name": "main", + "line": 133, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_lgcn_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 18 + }, + { + "caller": "load_lgcn_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 19 + }, + { + "caller": "load_lgcn_module", + "callee": "spec.loader.exec_module", + "lineNumber": 21 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 36 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 36 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 38 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 39 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 40 + }, + { + "caller": "__init__", + "callee": "HGTConv", + "lineNumber": 41 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 41 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 43 + }, + { + "caller": "__init__", + "callee": "nn.ModuleDict", + "lineNumber": 44 + }, + { + "caller": "__init__", + "callee": "nn.LayerNorm", + "lineNumber": 44 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 44 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 46 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 49 + }, + { + "caller": "reset_parameters", + "callee": "self.paper_proj.reset_parameters", + "lineNumber": 50 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 53 + }, + { + "caller": "encode", + "callee": "zip", + "lineNumber": 54 + }, + { + "caller": "encode", + "callee": "conv", + "lineNumber": 55 + }, + { + "caller": "encode", + "callee": "F.dropout", + "lineNumber": 57 + }, + { + "caller": "encode", + "callee": "F.relu", + "lineNumber": 57 + }, + { + "caller": "decode", + "callee": "(z[\"author\"][src] * z[\"paper\"][dst]).sum", + "lineNumber": 64 + }, + { + "caller": "predict_scores", + "callee": "model.eval", + "lineNumber": 69 + }, + { + "caller": "predict_scores", + "callee": "model.encode", + "lineNumber": 70 + }, + { + "caller": "predict_scores", + "callee": "z[\"author\"].detach().cpu().numpy", + "lineNumber": 71 + }, + { + "caller": "predict_scores", + "callee": "z[\"author\"].detach().cpu", + "lineNumber": 71 + }, + { + "caller": "predict_scores", + "callee": "z[\"author\"].detach", + "lineNumber": 71 + }, + { + "caller": "predict_scores", + "callee": "z[\"paper\"].detach().cpu().numpy", + "lineNumber": 72 + }, + { + "caller": "predict_scores", + "callee": "z[\"paper\"].detach().cpu", + "lineNumber": 72 + }, + { + "caller": "predict_scores", + "callee": "z[\"paper\"].detach", + "lineNumber": 72 + }, + { + "caller": "predict_scores", + "callee": "range", + "lineNumber": 74 + }, + { + "caller": "predict_scores", + "callee": "len", + "lineNumber": 74 + }, + { + "caller": "predict_scores", + "callee": "scores.append", + "lineNumber": 76 + }, + { + "caller": "predict_scores", + "callee": "np.sum(author[batch[:, 0]] * paper[batch[:, 1]], axis=1).astype", + "lineNumber": 76 + }, + { + "caller": "predict_scores", + "callee": "np.sum", + "lineNumber": 76 + }, + { + "caller": "predict_scores", + "callee": "np.concatenate", + "lineNumber": 77 + }, + { + "caller": "train_one", + "callee": "lgcn.set_seed", + "lineNumber": 81 + }, + { + "caller": "train_one", + "callee": "torch.device", + "lineNumber": 82 + }, + { + "caller": "train_one", + "callee": "HGTRecommender(\n data.metadata(),\n args.num_authors,\n parts[\"paper_feat_aug\"].shape[1],\n args.hidden_dim,\n args.layers,\n args.heads,\n args.dropout,\n ).to", + "lineNumber": 83 + }, + { + "caller": "train_one", + "callee": "HGTRecommender", + "lineNumber": 83 + }, + { + "caller": "train_one", + "callee": "data.metadata", + "lineNumber": 84 + }, + { + "caller": "train_one", + "callee": "torch.optim.AdamW", + "lineNumber": 92 + }, + { + "caller": "train_one", + "callee": "model.parameters", + "lineNumber": 92 + }, + { + "caller": "train_one", + "callee": "min", + "lineNumber": 94 + }, + { + "caller": "train_one", + "callee": "pos_edges.size", + "lineNumber": 94 + }, + { + "caller": "train_one", + "callee": "parts[\"val_pairs\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 95 + }, + { + "caller": "train_one", + "callee": "parts[\"val_pairs\"][\"label\"].to_numpy", + "lineNumber": 96 + }, + { + "caller": "train_one", + "callee": "range", + "lineNumber": 100 + }, + { + "caller": "train_one", + "callee": "model.train", + "lineNumber": 101 + }, + { + "caller": "train_one", + "callee": "torch.randperm", + "lineNumber": 102 + }, + { + "caller": "train_one", + "callee": "pos_edges.size", + "lineNumber": 102 + }, + { + "caller": "train_one", + "callee": "lgcn.sample_hard_negatives", + "lineNumber": 104 + }, + { + "caller": "train_one", + "callee": "pos.size", + "lineNumber": 105 + }, + { + "caller": "train_one", + "callee": "model.encode", + "lineNumber": 107 + }, + { + "caller": "train_one", + "callee": "model.decode(z, pos).repeat_interleave", + "lineNumber": 108 + }, + { + "caller": "train_one", + "callee": "model.decode", + "lineNumber": 108 + }, + { + "caller": "train_one", + "callee": "model.decode", + "lineNumber": 109 + }, + { + "caller": "train_one", + "callee": "F.logsigmoid(pos_scores - neg_scores).mean", + "lineNumber": 110 + }, + { + "caller": "train_one", + "callee": "F.logsigmoid", + "lineNumber": 110 + }, + { + "caller": "train_one", + "callee": "opt.zero_grad", + "lineNumber": 111 + }, + { + "caller": "train_one", + "callee": "loss.backward", + "lineNumber": 112 + }, + { + "caller": "train_one", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 113 + }, + { + "caller": "train_one", + "callee": "model.parameters", + "lineNumber": 113 + }, + { + "caller": "train_one", + "callee": "opt.step", + "lineNumber": 114 + }, + { + "caller": "train_one", + "callee": "predict_scores", + "lineNumber": 117 + }, + { + "caller": "train_one", + "callee": "lgcn.best_f1", + "lineNumber": 118 + }, + { + "caller": "train_one", + "callee": "v.detach().cpu", + "lineNumber": 121 + }, + { + "caller": "train_one", + "callee": "v.detach", + "lineNumber": 121 + }, + { + "caller": "train_one", + "callee": "model.state_dict().items", + "lineNumber": 121 + }, + { + "caller": "train_one", + "callee": "model.state_dict", + "lineNumber": 121 + }, + { + "caller": "train_one", + "callee": "np.save", + "lineNumber": 122 + }, + { + "caller": "train_one", + "callee": "print", + "lineNumber": 123 + }, + { + "caller": "train_one", + "callee": "loss.item", + "lineNumber": 124 + }, + { + "caller": "train_one", + "callee": "torch.save", + "lineNumber": 129 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 137 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 142 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 145 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 146 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 147 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 149 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 150 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 152 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 153 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 154 + }, + { + "caller": "main", + "callee": "load_lgcn_module", + "lineNumber": 157 + }, + { + "caller": "main", + "callee": "lgcn.build_parts", + "lineNumber": 158 + }, + { + "caller": "main", + "callee": "lgcn.build_data", + "lineNumber": 159 + }, + { + "caller": "main", + "callee": "torch.device", + "lineNumber": 159 + }, + { + "caller": "main", + "callee": "(out_dir / \"scores\").mkdir", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "(out_dir / \"checkpoints\").mkdir", + "lineNumber": 162 + }, + { + "caller": "main", + "callee": "train_one", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 167 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values(\"f1\", ascending=False).to_csv", + "lineNumber": 168 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 168 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 168 + }, + { + "caller": "main", + "callee": "parts[\"val_pairs\"][\"label\"].to_numpy", + "lineNumber": 170 + }, + { + "caller": "main", + "callee": "p.exists", + "lineNumber": 174 + }, + { + "caller": "main", + "callee": "vals.append", + "lineNumber": 175 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 175 + }, + { + "caller": "main", + "callee": "names.append", + "lineNumber": 176 + }, + { + "caller": "main", + "callee": "np.mean", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "lgcn.best_f1", + "lineNumber": 179 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "(out_dir / \"ensemble_result.txt\").write_text", + "lineNumber": 181 + }, + { + "caller": "main", + "callee": "','.join", + "lineNumber": 182 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 184 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 5, + "functionCount": 4, + "classCount": 1 + } + }, + { + "path": "code/train_val_lgcn_ensemble.py", + "language": "python", + "fileCategory": "code", + "totalLines": 506, + "nonEmptyLines": 442, + "functions": [ + { + "name": "set_seed", + "startLine": 28, + "endLine": 33, + "params": [ + "seed" + ] + }, + { + "name": "read_txt", + "startLine": 36, + "endLine": 41, + "params": [ + "path" + ] + }, + { + "name": "log_norm", + "startLine": 44, + "endLine": 46, + "params": [ + "x" + ] + }, + { + "name": "cos_sim", + "startLine": 128, + "endLine": 129, + "params": [ + "a", + "b", + "eps" + ] + }, + { + "name": "make_notebook_style_split", + "startLine": 132, + "endLine": 165, + "params": [ + "root", + "seed", + "train_frac" + ] + }, + { + "name": "build_parts", + "startLine": 168, + "endLine": 236, + "params": [ + "root", + "split_dir", + "num_papers", + "split_seed", + "train_frac" + ] + }, + { + "name": "build_data", + "startLine": 239, + "endLine": 270, + "params": [ + "parts", + "num_authors", + "num_papers", + "device", + "use_citation", + "use_coauthor" + ] + }, + { + "name": "sample_hard_negatives", + "startLine": 273, + "endLine": 305, + "params": [ + "parts", + "n_samples", + "num_authors", + "num_papers", + "device" + ] + }, + { + "name": "predict_scores", + "startLine": 309, + "endLine": 337, + "params": [ + "model", + "data", + "pairs", + "batch_size", + "mode", + "normalize_embeddings" + ] + }, + { + "name": "best_f1", + "startLine": 340, + "endLine": 346, + "params": [ + "labels", + "scores" + ] + }, + { + "name": "train_one", + "startLine": 349, + "endLine": 414, + "params": [ + "args", + "parts", + "data", + "seed", + "embed_dim", + "model_dir", + "score_dir" + ] + }, + { + "name": "main", + "startLine": 417, + "endLine": 502, + "params": [] + } + ], + "classes": [ + { + "name": "LightGCNLayer", + "startLine": 49, + "endLine": 70, + "methods": [ + "forward" + ], + "properties": [] + }, + { + "name": "LightGCN", + "startLine": 73, + "endLine": 104, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + }, + { + "name": "LearnableWeightLightGCN", + "startLine": 107, + "endLine": 125, + "methods": [ + "__init__", + "encode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "set_seed", + "line": 28, + "isDefault": false + }, + { + "name": "read_txt", + "line": 36, + "isDefault": false + }, + { + "name": "log_norm", + "line": 44, + "isDefault": false + }, + { + "name": "LightGCNLayer", + "line": 49, + "isDefault": false + }, + { + "name": "LightGCN", + "line": 73, + "isDefault": false + }, + { + "name": "LearnableWeightLightGCN", + "line": 107, + "isDefault": false + }, + { + "name": "cos_sim", + "line": 128, + "isDefault": false + }, + { + "name": "make_notebook_style_split", + "line": 132, + "isDefault": false + }, + { + "name": "build_parts", + "line": 168, + "isDefault": false + }, + { + "name": "build_data", + "line": 239, + "isDefault": false + }, + { + "name": "sample_hard_negatives", + "line": 273, + "isDefault": false + }, + { + "name": "predict_scores", + "line": 308, + "isDefault": false + }, + { + "name": "best_f1", + "line": 340, + "isDefault": false + }, + { + "name": "train_one", + "line": 349, + "isDefault": false + }, + { + "name": "main", + "line": 417, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "set_seed", + "callee": "random.seed", + "lineNumber": 29 + }, + { + "caller": "set_seed", + "callee": "np.random.seed", + "lineNumber": 30 + }, + { + "caller": "set_seed", + "callee": "torch.manual_seed", + "lineNumber": 31 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.is_available", + "lineNumber": 32 + }, + { + "caller": "set_seed", + "callee": "torch.cuda.manual_seed_all", + "lineNumber": 33 + }, + { + "caller": "read_txt", + "callee": "path.open", + "lineNumber": 38 + }, + { + "caller": "read_txt", + "callee": "rows.append", + "lineNumber": 40 + }, + { + "caller": "read_txt", + "callee": "list", + "lineNumber": 40 + }, + { + "caller": "read_txt", + "callee": "map", + "lineNumber": 40 + }, + { + "caller": "read_txt", + "callee": "line.strip().split", + "lineNumber": 40 + }, + { + "caller": "read_txt", + "callee": "line.strip", + "lineNumber": 40 + }, + { + "caller": "log_norm", + "callee": "np.log1p", + "lineNumber": 45 + }, + { + "caller": "log_norm", + "callee": "x.mean", + "lineNumber": 46 + }, + { + "caller": "log_norm", + "callee": "x.std", + "lineNumber": 46 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 58 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 58 + }, + { + "caller": "forward", + "callee": "src_x.size", + "lineNumber": 58 + }, + { + "caller": "forward", + "callee": "src_x.new_zeros", + "lineNumber": 59 + }, + { + "caller": "forward", + "callee": "x_dict[dst_type].size", + "lineNumber": 59 + }, + { + "caller": "forward", + "callee": "agg.index_add_", + "lineNumber": 60 + }, + { + "caller": "forward", + "callee": "deg.index_add_", + "lineNumber": 61 + }, + { + "caller": "forward", + "callee": "torch.ones", + "lineNumber": 64 + }, + { + "caller": "forward", + "callee": "dst.numel", + "lineNumber": 64 + }, + { + "caller": "forward", + "callee": "agg_dict[dst_type].append", + "lineNumber": 66 + }, + { + "caller": "forward", + "callee": "deg.clamp", + "lineNumber": 66 + }, + { + "caller": "forward", + "callee": "sum", + "lineNumber": 68 + }, + { + "caller": "forward", + "callee": "len", + "lineNumber": 68 + }, + { + "caller": "forward", + "callee": "agg_dict.items", + "lineNumber": 69 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 75 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 75 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 76 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 77 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 78 + }, + { + "caller": "__init__", + "callee": "LightGCNLayer", + "lineNumber": 78 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 78 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 80 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 83 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 84 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.zeros_", + "lineNumber": 85 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 90 + }, + { + "caller": "encode", + "callee": "layer", + "lineNumber": 94 + }, + { + "caller": "encode", + "callee": "all_layers.append", + "lineNumber": 95 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 98 + }, + { + "caller": "decode", + "callee": "(z_dict[\"author\"][src] * z_dict[\"paper\"][dst]).sum", + "lineNumber": 104 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 109 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 109 + }, + { + "caller": "__init__", + "callee": "nn.Parameter", + "lineNumber": 110 + }, + { + "caller": "__init__", + "callee": "torch.zeros", + "lineNumber": 110 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 115 + }, + { + "caller": "encode", + "callee": "layer", + "lineNumber": 119 + }, + { + "caller": "encode", + "callee": "all_layers.append", + "lineNumber": 120 + }, + { + "caller": "encode", + "callee": "F.softmax", + "lineNumber": 121 + }, + { + "caller": "encode", + "callee": "sum", + "lineNumber": 123 + }, + { + "caller": "encode", + "callee": "enumerate", + "lineNumber": 123 + }, + { + "caller": "cos_sim", + "callee": "np.sum", + "lineNumber": 129 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 129 + }, + { + "caller": "cos_sim", + "callee": "norm", + "lineNumber": 129 + }, + { + "caller": "make_notebook_style_split", + "callee": "read_txt", + "lineNumber": 134 + }, + { + "caller": "make_notebook_style_split", + "callee": "read_txt", + "lineNumber": 135 + }, + { + "caller": "make_notebook_style_split", + "callee": "read_txt", + "lineNumber": 136 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.DataFrame", + "lineNumber": 138 + }, + { + "caller": "make_notebook_style_split", + "callee": "ref_edges.set_index", + "lineNumber": 139 + }, + { + "caller": "make_notebook_style_split", + "callee": "ref_edges.index.astype", + "lineNumber": 139 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.DataFrame", + "lineNumber": 140 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.DataFrame", + "lineNumber": 141 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.concat", + "lineNumber": 143 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.unique(node_tmp).astype", + "lineNumber": 144 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.unique", + "lineNumber": 144 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.concat", + "lineNumber": 145 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.unique(node_tmp).astype", + "lineNumber": 146 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.unique", + "lineNumber": 146 + }, + { + "caller": "make_notebook_style_split", + "callee": "ref_edges.sample", + "lineNumber": 148 + }, + { + "caller": "make_notebook_style_split", + "callee": "ref_edges[~ref_edges.index.isin(train_refs.index)].copy", + "lineNumber": 149 + }, + { + "caller": "make_notebook_style_split", + "callee": "ref_edges.index.isin", + "lineNumber": 149 + }, + { + "caller": "make_notebook_style_split", + "callee": "set", + "lineNumber": 152 + }, + { + "caller": "make_notebook_style_split", + "callee": "map", + "lineNumber": 152 + }, + { + "caller": "make_notebook_style_split", + "callee": "ref_edges[[\"source\", \"target\"]].to_numpy().tolist", + "lineNumber": 152 + }, + { + "caller": "make_notebook_style_split", + "callee": "ref_edges[[\"source\", \"target\"]].to_numpy", + "lineNumber": 152 + }, + { + "caller": "make_notebook_style_split", + "callee": "np.random.default_rng", + "lineNumber": 154 + }, + { + "caller": "make_notebook_style_split", + "callee": "len", + "lineNumber": 155 + }, + { + "caller": "make_notebook_style_split", + "callee": "len", + "lineNumber": 155 + }, + { + "caller": "make_notebook_style_split", + "callee": "int", + "lineNumber": 156 + }, + { + "caller": "make_notebook_style_split", + "callee": "rng.choice", + "lineNumber": 156 + }, + { + "caller": "make_notebook_style_split", + "callee": "int", + "lineNumber": 157 + }, + { + "caller": "make_notebook_style_split", + "callee": "rng.choice", + "lineNumber": 157 + }, + { + "caller": "make_notebook_style_split", + "callee": "neg_pairs.append", + "lineNumber": 159 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.DataFrame", + "lineNumber": 161 + }, + { + "caller": "make_notebook_style_split", + "callee": "pd.concat", + "lineNumber": 163 + }, + { + "caller": "make_notebook_style_split", + "callee": "val_pos.reset_index", + "lineNumber": 163 + }, + { + "caller": "make_notebook_style_split", + "callee": "val_pairs.sample(frac=1, random_state=seed, axis=0).reset_index", + "lineNumber": 164 + }, + { + "caller": "make_notebook_style_split", + "callee": "val_pairs.sample", + "lineNumber": 164 + }, + { + "caller": "make_notebook_style_split", + "callee": "train_refs[[\"source\", \"target\"]].reset_index", + "lineNumber": 165 + }, + { + "caller": "build_parts", + "callee": "ValueError", + "lineNumber": 178 + }, + { + "caller": "build_parts", + "callee": "pd.read_csv", + "lineNumber": 179 + }, + { + "caller": "build_parts", + "callee": "pd.read_csv", + "lineNumber": 180 + }, + { + "caller": "build_parts", + "callee": "make_notebook_style_split", + "lineNumber": 182 + }, + { + "caller": "build_parts", + "callee": "read_txt", + "lineNumber": 183 + }, + { + "caller": "build_parts", + "callee": "read_txt", + "lineNumber": 184 + }, + { + "caller": "build_parts", + "callee": "(data_dir / \"feature.pkl\").open", + "lineNumber": 186 + }, + { + "caller": "build_parts", + "callee": "pkl.load", + "lineNumber": 187 + }, + { + "caller": "build_parts", + "callee": "np.zeros", + "lineNumber": 189 + }, + { + "caller": "build_parts", + "callee": "np.zeros", + "lineNumber": 190 + }, + { + "caller": "build_parts", + "callee": "np.zeros", + "lineNumber": 191 + }, + { + "caller": "build_parts", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 192 + }, + { + "caller": "build_parts", + "callee": "paper_feature.numpy().astype", + "lineNumber": 198 + }, + { + "caller": "build_parts", + "callee": "paper_feature.numpy", + "lineNumber": 198 + }, + { + "caller": "build_parts", + "callee": "np.stack", + "lineNumber": 199 + }, + { + "caller": "build_parts", + "callee": "log_norm", + "lineNumber": 200 + }, + { + "caller": "build_parts", + "callee": "log_norm", + "lineNumber": 200 + }, + { + "caller": "build_parts", + "callee": "log_norm", + "lineNumber": 200 + }, + { + "caller": "build_parts", + "callee": "np.concatenate", + "lineNumber": 203 + }, + { + "caller": "build_parts", + "callee": "paper_feat_aug.mean", + "lineNumber": 204 + }, + { + "caller": "build_parts", + "callee": "paper_feat_aug.std", + "lineNumber": 205 + }, + { + "caller": "build_parts", + "callee": "coauthor_map.setdefault(s, set()).add", + "lineNumber": 210 + }, + { + "caller": "build_parts", + "callee": "coauthor_map.setdefault", + "lineNumber": 210 + }, + { + "caller": "build_parts", + "callee": "set", + "lineNumber": 210 + }, + { + "caller": "build_parts", + "callee": "coauthor_map.setdefault(t, set()).add", + "lineNumber": 211 + }, + { + "caller": "build_parts", + "callee": "coauthor_map.setdefault", + "lineNumber": 211 + }, + { + "caller": "build_parts", + "callee": "set", + "lineNumber": 211 + }, + { + "caller": "build_parts", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 213 + }, + { + "caller": "build_parts", + "callee": "author_papers.setdefault(int(s), set()).add", + "lineNumber": 214 + }, + { + "caller": "build_parts", + "callee": "author_papers.setdefault", + "lineNumber": 214 + }, + { + "caller": "build_parts", + "callee": "int", + "lineNumber": 214 + }, + { + "caller": "build_parts", + "callee": "set", + "lineNumber": 214 + }, + { + "caller": "build_parts", + "callee": "int", + "lineNumber": 214 + }, + { + "caller": "build_parts", + "callee": "range", + "lineNumber": 216 + }, + { + "caller": "build_parts", + "callee": "set", + "lineNumber": 217 + }, + { + "caller": "build_parts", + "callee": "coauthor_map.get", + "lineNumber": 218 + }, + { + "caller": "build_parts", + "callee": "pool.update", + "lineNumber": 219 + }, + { + "caller": "build_parts", + "callee": "author_papers.get", + "lineNumber": 219 + }, + { + "caller": "build_parts", + "callee": "author_papers.get", + "lineNumber": 220 + }, + { + "caller": "build_parts", + "callee": "set", + "lineNumber": 220 + }, + { + "caller": "build_parts", + "callee": "np.array", + "lineNumber": 221 + }, + { + "caller": "build_parts", + "callee": "list", + "lineNumber": 221 + }, + { + "caller": "build_parts", + "callee": "np.percentile", + "lineNumber": 223 + }, + { + "caller": "build_parts", + "callee": "np.where", + "lineNumber": 224 + }, + { + "caller": "build_parts", + "callee": "set", + "lineNumber": 225 + }, + { + "caller": "build_parts", + "callee": "map", + "lineNumber": 225 + }, + { + "caller": "build_parts", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy().tolist", + "lineNumber": 225 + }, + { + "caller": "build_parts", + "callee": "train_refs[[\"source\", \"target\"]].to_numpy", + "lineNumber": 225 + }, + { + "caller": "build_parts", + "callee": "pd.DataFrame", + "lineNumber": 230 + }, + { + "caller": "build_parts", + "callee": "pd.DataFrame", + "lineNumber": 231 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 247 + }, + { + "caller": "build_data", + "callee": "parts[\"train_refs\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 248 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 250 + }, + { + "caller": "build_data", + "callee": "parts[\"citation\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 251 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 253 + }, + { + "caller": "build_data", + "callee": "parts[\"coauthor\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 254 + }, + { + "caller": "build_data", + "callee": "HeteroData", + "lineNumber": 256 + }, + { + "caller": "build_data", + "callee": "torch.as_tensor", + "lineNumber": 259 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t().contiguous", + "lineNumber": 260 + }, + { + "caller": "build_data", + "callee": "ref_tensor.t", + "lineNumber": 260 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t().contiguous", + "lineNumber": 261 + }, + { + "caller": "build_data", + "callee": "ref_tensor[:, [1, 0]].t", + "lineNumber": 261 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [cite_tensor, cite_tensor[:, [1, 0]]], dim=0\n ).t().contiguous", + "lineNumber": 263 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [cite_tensor, cite_tensor[:, [1, 0]]], dim=0\n ).t", + "lineNumber": 263 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 263 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0\n ).t().contiguous", + "lineNumber": 267 + }, + { + "caller": "build_data", + "callee": "torch.cat(\n [coauthor_tensor, coauthor_tensor[:, [1, 0]]], dim=0\n ).t", + "lineNumber": 267 + }, + { + "caller": "build_data", + "callee": "torch.cat", + "lineNumber": 267 + }, + { + "caller": "build_data", + "callee": "data.to", + "lineNumber": 270 + }, + { + "caller": "add_random", + "callee": "len", + "lineNumber": 280 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 281 + }, + { + "caller": "add_random", + "callee": "np.random.randint", + "lineNumber": 282 + }, + { + "caller": "add_random", + "callee": "neg_list.append", + "lineNumber": 284 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 286 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 286 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 288 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 288 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 290 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 291 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 291 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 291 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 293 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 295 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 297 + }, + { + "caller": "sample_hard_negatives", + "callee": "coauthor_pool.get", + "lineNumber": 298 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 299 + }, + { + "caller": "sample_hard_negatives", + "callee": "int", + "lineNumber": 301 + }, + { + "caller": "sample_hard_negatives", + "callee": "np.random.randint", + "lineNumber": 301 + }, + { + "caller": "sample_hard_negatives", + "callee": "len", + "lineNumber": 301 + }, + { + "caller": "sample_hard_negatives", + "callee": "neg_list.append", + "lineNumber": 303 + }, + { + "caller": "sample_hard_negatives", + "callee": "add_random", + "lineNumber": 304 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long, device=device).t().contiguous", + "lineNumber": 305 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor(neg_list[:n_samples], dtype=torch.long, device=device).t", + "lineNumber": 305 + }, + { + "caller": "sample_hard_negatives", + "callee": "torch.tensor", + "lineNumber": 305 + }, + { + "caller": "predict_scores", + "callee": "model.eval", + "lineNumber": 317 + }, + { + "caller": "predict_scores", + "callee": "model.encode", + "lineNumber": 318 + }, + { + "caller": "predict_scores", + "callee": "F.normalize", + "lineNumber": 320 + }, + { + "caller": "predict_scores", + "callee": "z_dict.items", + "lineNumber": 320 + }, + { + "caller": "predict_scores", + "callee": "z_dict[\"author\"].detach().cpu().numpy", + "lineNumber": 321 + }, + { + "caller": "predict_scores", + "callee": "z_dict[\"author\"].detach().cpu", + "lineNumber": 321 + }, + { + "caller": "predict_scores", + "callee": "z_dict[\"author\"].detach", + "lineNumber": 321 + }, + { + "caller": "predict_scores", + "callee": "z_dict[\"paper\"].detach().cpu().numpy", + "lineNumber": 322 + }, + { + "caller": "predict_scores", + "callee": "z_dict[\"paper\"].detach().cpu", + "lineNumber": 322 + }, + { + "caller": "predict_scores", + "callee": "z_dict[\"paper\"].detach", + "lineNumber": 322 + }, + { + "caller": "predict_scores", + "callee": "range", + "lineNumber": 324 + }, + { + "caller": "predict_scores", + "callee": "len", + "lineNumber": 324 + }, + { + "caller": "predict_scores", + "callee": "cos_sim", + "lineNumber": 329 + }, + { + "caller": "predict_scores", + "callee": "np.sum", + "lineNumber": 331 + }, + { + "caller": "predict_scores", + "callee": "np.sum", + "lineNumber": 333 + }, + { + "caller": "predict_scores", + "callee": "ValueError", + "lineNumber": 335 + }, + { + "caller": "predict_scores", + "callee": "scores.append", + "lineNumber": 336 + }, + { + "caller": "predict_scores", + "callee": "score.astype", + "lineNumber": 336 + }, + { + "caller": "predict_scores", + "callee": "np.concatenate", + "lineNumber": 337 + }, + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 341 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 343 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 343 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 344 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 344 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 345 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 345 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 346 + }, + { + "caller": "train_one", + "callee": "set_seed", + "lineNumber": 350 + }, + { + "caller": "train_one", + "callee": "torch.device", + "lineNumber": 351 + }, + { + "caller": "train_one", + "callee": "model_cls(args.num_authors, parts[\"paper_feat_aug\"].shape[1], embed_dim, args.layers).to", + "lineNumber": 353 + }, + { + "caller": "train_one", + "callee": "model_cls", + "lineNumber": 353 + }, + { + "caller": "train_one", + "callee": "torch.optim.Adam", + "lineNumber": 354 + }, + { + "caller": "train_one", + "callee": "model.parameters", + "lineNumber": 354 + }, + { + "caller": "train_one", + "callee": "min", + "lineNumber": 356 + }, + { + "caller": "train_one", + "callee": "pos_edges.size", + "lineNumber": 356 + }, + { + "caller": "train_one", + "callee": "parts[\"val_pairs\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 360 + }, + { + "caller": "train_one", + "callee": "parts[\"val_pairs\"][\"label\"].to_numpy", + "lineNumber": 361 + }, + { + "caller": "train_one", + "callee": "range", + "lineNumber": 363 + }, + { + "caller": "train_one", + "callee": "model.train", + "lineNumber": 364 + }, + { + "caller": "train_one", + "callee": "torch.randperm", + "lineNumber": 365 + }, + { + "caller": "train_one", + "callee": "pos_edges.size", + "lineNumber": 365 + }, + { + "caller": "train_one", + "callee": "sample_hard_negatives", + "lineNumber": 367 + }, + { + "caller": "train_one", + "callee": "pos.size", + "lineNumber": 368 + }, + { + "caller": "train_one", + "callee": "model.encode", + "lineNumber": 370 + }, + { + "caller": "train_one", + "callee": "F.normalize", + "lineNumber": 372 + }, + { + "caller": "train_one", + "callee": "z_dict.items", + "lineNumber": 372 + }, + { + "caller": "train_one", + "callee": "model.decode", + "lineNumber": 373 + }, + { + "caller": "train_one", + "callee": "raw_pos_scores.repeat_interleave", + "lineNumber": 374 + }, + { + "caller": "train_one", + "callee": "model.decode", + "lineNumber": 375 + }, + { + "caller": "train_one", + "callee": "F.logsigmoid(pos_scores - neg_scores).mean", + "lineNumber": 377 + }, + { + "caller": "train_one", + "callee": "F.logsigmoid", + "lineNumber": 377 + }, + { + "caller": "train_one", + "callee": "(args.margin - pos_scores + neg_scores).clamp(min=0).mean", + "lineNumber": 379 + }, + { + "caller": "train_one", + "callee": "(args.margin - pos_scores + neg_scores).clamp", + "lineNumber": 379 + }, + { + "caller": "train_one", + "callee": "torch.cat", + "lineNumber": 381 + }, + { + "caller": "train_one", + "callee": "torch.cat", + "lineNumber": 382 + }, + { + "caller": "train_one", + "callee": "torch.ones_like", + "lineNumber": 382 + }, + { + "caller": "train_one", + "callee": "torch.zeros_like", + "lineNumber": 382 + }, + { + "caller": "train_one", + "callee": "F.binary_cross_entropy_with_logits", + "lineNumber": 383 + }, + { + "caller": "train_one", + "callee": "ValueError", + "lineNumber": 385 + }, + { + "caller": "train_one", + "callee": "optimizer.zero_grad", + "lineNumber": 387 + }, + { + "caller": "train_one", + "callee": "loss.backward", + "lineNumber": 388 + }, + { + "caller": "train_one", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 389 + }, + { + "caller": "train_one", + "callee": "model.parameters", + "lineNumber": 389 + }, + { + "caller": "train_one", + "callee": "optimizer.step", + "lineNumber": 390 + }, + { + "caller": "train_one", + "callee": "predict_scores", + "lineNumber": 394 + }, + { + "caller": "train_one", + "callee": "best_f1", + "lineNumber": 402 + }, + { + "caller": "train_one", + "callee": "v.detach().cpu", + "lineNumber": 405 + }, + { + "caller": "train_one", + "callee": "v.detach", + "lineNumber": 405 + }, + { + "caller": "train_one", + "callee": "model.state_dict().items", + "lineNumber": 405 + }, + { + "caller": "train_one", + "callee": "model.state_dict", + "lineNumber": 405 + }, + { + "caller": "train_one", + "callee": "np.save", + "lineNumber": 406 + }, + { + "caller": "train_one", + "callee": "print", + "lineNumber": 407 + }, + { + "caller": "train_one", + "callee": "loss.item", + "lineNumber": 409 + }, + { + "caller": "train_one", + "callee": "torch.save", + "lineNumber": 413 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 418 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 419 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 419 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 419 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 420 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 421 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 422 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 423 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 423 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 424 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 425 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 426 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 427 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 428 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 429 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 430 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 431 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 432 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 433 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 434 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 435 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 436 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 437 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 438 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 439 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 440 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 441 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 442 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 443 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 444 + }, + { + "caller": "main", + "callee": "'-'.join", + "lineNumber": 449 + }, + { + "caller": "main", + "callee": "map", + "lineNumber": 449 + }, + { + "caller": "main", + "callee": "'-'.join", + "lineNumber": 450 + }, + { + "caller": "main", + "callee": "map", + "lineNumber": 450 + }, + { + "caller": "main", + "callee": "model_dir.mkdir", + "lineNumber": 457 + }, + { + "caller": "main", + "callee": "score_dir.mkdir", + "lineNumber": 458 + }, + { + "caller": "main", + "callee": "build_parts", + "lineNumber": 460 + }, + { + "caller": "main", + "callee": "build_data", + "lineNumber": 467 + }, + { + "caller": "main", + "callee": "torch.device", + "lineNumber": 471 + }, + { + "caller": "main", + "callee": "parts[\"val_pairs\"][\"label\"].to_numpy", + "lineNumber": 475 + }, + { + "caller": "main", + "callee": "train_one", + "lineNumber": 480 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 481 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 483 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 483 + }, + { + "caller": "main", + "callee": "result.to_csv", + "lineNumber": 484 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 485 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 486 + }, + { + "caller": "main", + "callee": "result.to_string", + "lineNumber": 486 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 491 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 491 + }, + { + "caller": "main", + "callee": "path.exists", + "lineNumber": 492 + }, + { + "caller": "main", + "callee": "val_scores.append", + "lineNumber": 493 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 493 + }, + { + "caller": "main", + "callee": "names.append", + "lineNumber": 494 + }, + { + "caller": "main", + "callee": "np.mean", + "lineNumber": 496 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 497 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 498 + }, + { + "caller": "main", + "callee": "(out_dir / \"ensemble_result.txt\").open", + "lineNumber": 499 + }, + { + "caller": "main", + "callee": "f.write", + "lineNumber": 500 + }, + { + "caller": "main", + "callee": "','.join", + "lineNumber": 500 + }, + { + "caller": "main", + "callee": "f.write", + "lineNumber": 501 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 502 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 15, + "functionCount": 12, + "classCount": 3 + } + }, + { + "path": "code/train_val_mf_bpr.py", + "language": "python", + "fileCategory": "code", + "totalLines": 110, + "nonEmptyLines": 96, + "functions": [ + { + "name": "best_f1", + "startLine": 16, + "endLine": 20, + "params": [ + "y", + "s" + ] + }, + { + "name": "main", + "startLine": 41, + "endLine": 106, + "params": [] + } + ], + "classes": [ + { + "name": "MF", + "startLine": 23, + "endLine": 38, + "methods": [ + "__init__", + "score" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "best_f1", + "line": 16, + "isDefault": false + }, + { + "name": "MF", + "line": 23, + "isDefault": false + }, + { + "name": "main", + "line": 41, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "best_f1", + "callee": "precision_recall_curve", + "lineNumber": 17 + }, + { + "caller": "best_f1", + "callee": "int", + "lineNumber": 19 + }, + { + "caller": "best_f1", + "callee": "np.argmax", + "lineNumber": 19 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 20 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 20 + }, + { + "caller": "best_f1", + "callee": "len", + "lineNumber": 20 + }, + { + "caller": "best_f1", + "callee": "float", + "lineNumber": 20 + }, + { + "caller": "best_f1", + "callee": "roc_auc_score", + "lineNumber": 20 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 25 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 25 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 26 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 27 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 28 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 29 + }, + { + "caller": "__init__", + "callee": "nn.init.normal_", + "lineNumber": 30 + }, + { + "caller": "__init__", + "callee": "nn.init.normal_", + "lineNumber": 31 + }, + { + "caller": "__init__", + "callee": "nn.init.zeros_", + "lineNumber": 32 + }, + { + "caller": "__init__", + "callee": "nn.init.zeros_", + "lineNumber": 33 + }, + { + "caller": "score", + "callee": "(self.a(a) * self.p(p)).sum", + "lineNumber": 38 + }, + { + "caller": "score", + "callee": "self.a", + "lineNumber": 38 + }, + { + "caller": "score", + "callee": "self.p", + "lineNumber": 38 + }, + { + "caller": "score", + "callee": "self.ab(a).squeeze", + "lineNumber": 38 + }, + { + "caller": "score", + "callee": "self.ab", + "lineNumber": 38 + }, + { + "caller": "score", + "callee": "self.pb(p).squeeze", + "lineNumber": 38 + }, + { + "caller": "score", + "callee": "self.pb", + "lineNumber": 38 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 42 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 43 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "torch.cuda.is_available", + "lineNumber": 44 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 45 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 47 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 48 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 49 + }, + { + "caller": "main", + "callee": "torch.manual_seed", + "lineNumber": 51 + }, + { + "caller": "main", + "callee": "np.random.seed", + "lineNumber": 52 + }, + { + "caller": "main", + "callee": "pd.read_csv(split / \"train_refs.csv\")[[\"source\", \"target\"]].to_numpy", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "pd.read_csv", + "lineNumber": 55 + }, + { + "caller": "main", + "callee": "pd.read_csv", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "val_df[[\"source\", \"target\"]].to_numpy", + "lineNumber": 57 + }, + { + "caller": "main", + "callee": "val_df[\"label\"].to_numpy", + "lineNumber": 58 + }, + { + "caller": "main", + "callee": "set", + "lineNumber": 59 + }, + { + "caller": "main", + "callee": "map", + "lineNumber": 59 + }, + { + "caller": "main", + "callee": "train.tolist", + "lineNumber": 59 + }, + { + "caller": "main", + "callee": "torch.device", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "MF(6611, 79937, args.dim).to", + "lineNumber": 61 + }, + { + "caller": "main", + "callee": "MF", + "lineNumber": 61 + }, + { + "caller": "main", + "callee": "torch.optim.AdamW", + "lineNumber": 62 + }, + { + "caller": "main", + "callee": "model.parameters", + "lineNumber": 62 + }, + { + "caller": "main", + "callee": "torch.as_tensor", + "lineNumber": 63 + }, + { + "caller": "main", + "callee": "torch.as_tensor", + "lineNumber": 64 + }, + { + "caller": "main", + "callee": "out.mkdir", + "lineNumber": 68 + }, + { + "caller": "main", + "callee": "np.random.default_rng", + "lineNumber": 69 + }, + { + "caller": "main", + "callee": "range", + "lineNumber": 71 + }, + { + "caller": "main", + "callee": "torch.randint", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "train_t.size", + "lineNumber": 72 + }, + { + "caller": "main", + "callee": "np.empty", + "lineNumber": 74 + }, + { + "caller": "main", + "callee": "pos[:, 0].detach().cpu().numpy", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "pos[:, 0].detach().cpu", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "pos[:, 0].detach", + "lineNumber": 75 + }, + { + "caller": "main", + "callee": "rng.integers", + "lineNumber": 79 + }, + { + "caller": "main", + "callee": "zip", + "lineNumber": 80 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "int", + "lineNumber": 81 + }, + { + "caller": "main", + "callee": "torch.as_tensor", + "lineNumber": 86 + }, + { + "caller": "main", + "callee": "F.logsigmoid(model.score(pos) - model.score(neg)).mean", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "F.logsigmoid", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "model.score", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "model.score", + "lineNumber": 87 + }, + { + "caller": "main", + "callee": "opt.zero_grad", + "lineNumber": 88 + }, + { + "caller": "main", + "callee": "loss.backward", + "lineNumber": 89 + }, + { + "caller": "main", + "callee": "opt.step", + "lineNumber": 90 + }, + { + "caller": "main", + "callee": "torch.no_grad", + "lineNumber": 92 + }, + { + "caller": "main", + "callee": "range", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "len", + "lineNumber": 94 + }, + { + "caller": "main", + "callee": "scores.append", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "model.score(val_t[st : st + 131072]).detach().cpu().numpy", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "model.score(val_t[st : st + 131072]).detach().cpu", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "model.score(val_t[st : st + 131072]).detach", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "model.score", + "lineNumber": 95 + }, + { + "caller": "main", + "callee": "np.concatenate(scores).astype", + "lineNumber": 96 + }, + { + "caller": "main", + "callee": "np.concatenate", + "lineNumber": 96 + }, + { + "caller": "main", + "callee": "best_f1", + "lineNumber": 97 + }, + { + "caller": "main", + "callee": "torch.save", + "lineNumber": 101 + }, + { + "caller": "main", + "callee": "model.state_dict", + "lineNumber": 101 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 102 + }, + { + "caller": "main", + "callee": "loss.item", + "lineNumber": 102 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 104 + }, + { + "caller": "main", + "callee": "(out / \"result.txt\").write_text", + "lineNumber": 105 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 106 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 3, + "functionCount": 2, + "classCount": 1 + } + }, + { + "path": "code/train_val_sage_bpr.py", + "language": "python", + "fileCategory": "code", + "totalLines": 188, + "nonEmptyLines": 161, + "functions": [ + { + "name": "load_lgcn_module", + "startLine": 17, + "endLine": 22, + "params": [ + "path" + ] + }, + { + "name": "predict_scores", + "startLine": 74, + "endLine": 83, + "params": [ + "model", + "data", + "pairs", + "batch_size" + ] + }, + { + "name": "train_one", + "startLine": 86, + "endLine": 130, + "params": [ + "args", + "lgcn", + "parts", + "data", + "seed", + "out_dir" + ] + }, + { + "name": "main", + "startLine": 133, + "endLine": 184, + "params": [] + } + ], + "classes": [ + { + "name": "ResidualSAGE", + "startLine": 25, + "endLine": 49, + "methods": [ + "__init__", + "forward" + ], + "properties": [] + }, + { + "name": "SAGERecommender", + "startLine": 52, + "endLine": 70, + "methods": [ + "__init__", + "reset_parameters", + "encode", + "decode" + ], + "properties": [] + } + ], + "exports": [ + { + "name": "load_lgcn_module", + "line": 17, + "isDefault": false + }, + { + "name": "ResidualSAGE", + "line": 25, + "isDefault": false + }, + { + "name": "SAGERecommender", + "line": 52, + "isDefault": false + }, + { + "name": "predict_scores", + "line": 73, + "isDefault": false + }, + { + "name": "train_one", + "line": 86, + "isDefault": false + }, + { + "name": "main", + "line": 133, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "load_lgcn_module", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 18 + }, + { + "caller": "load_lgcn_module", + "callee": "importlib.util.module_from_spec", + "lineNumber": 19 + }, + { + "caller": "load_lgcn_module", + "callee": "spec.loader.exec_module", + "lineNumber": 21 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 27 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 27 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 29 + }, + { + "caller": "__init__", + "callee": "nn.ModuleList", + "lineNumber": 30 + }, + { + "caller": "__init__", + "callee": "range", + "lineNumber": 31 + }, + { + "caller": "__init__", + "callee": "self.convs.append", + "lineNumber": 32 + }, + { + "caller": "__init__", + "callee": "HeteroConv", + "lineNumber": 33 + }, + { + "caller": "__init__", + "callee": "SAGEConv", + "lineNumber": 34 + }, + { + "caller": "__init__", + "callee": "self.norms.append", + "lineNumber": 38 + }, + { + "caller": "__init__", + "callee": "nn.ModuleDict", + "lineNumber": 38 + }, + { + "caller": "__init__", + "callee": "nn.LayerNorm", + "lineNumber": 38 + }, + { + "caller": "forward", + "callee": "zip", + "lineNumber": 41 + }, + { + "caller": "forward", + "callee": "conv", + "lineNumber": 42 + }, + { + "caller": "forward", + "callee": "x_dict.items", + "lineNumber": 44 + }, + { + "caller": "forward", + "callee": "h.get", + "lineNumber": 45 + }, + { + "caller": "forward", + "callee": "F.dropout", + "lineNumber": 46 + }, + { + "caller": "forward", + "callee": "F.relu", + "lineNumber": 46 + }, + { + "caller": "__init__", + "callee": "super().__init__", + "lineNumber": 54 + }, + { + "caller": "__init__", + "callee": "super", + "lineNumber": 54 + }, + { + "caller": "__init__", + "callee": "nn.Embedding", + "lineNumber": 55 + }, + { + "caller": "__init__", + "callee": "nn.Linear", + "lineNumber": 56 + }, + { + "caller": "__init__", + "callee": "ResidualSAGE", + "lineNumber": 57 + }, + { + "caller": "__init__", + "callee": "self.reset_parameters", + "lineNumber": 58 + }, + { + "caller": "reset_parameters", + "callee": "nn.init.xavier_uniform_", + "lineNumber": 61 + }, + { + "caller": "reset_parameters", + "callee": "self.paper_proj.reset_parameters", + "lineNumber": 62 + }, + { + "caller": "encode", + "callee": "self.paper_proj", + "lineNumber": 65 + }, + { + "caller": "encode", + "callee": "self.encoder", + "lineNumber": 66 + }, + { + "caller": "decode", + "callee": "(z[\"author\"][src] * z[\"paper\"][dst]).sum", + "lineNumber": 70 + }, + { + "caller": "predict_scores", + "callee": "model.eval", + "lineNumber": 75 + }, + { + "caller": "predict_scores", + "callee": "model.encode", + "lineNumber": 76 + }, + { + "caller": "predict_scores", + "callee": "z[\"author\"].detach().cpu().numpy", + "lineNumber": 77 + }, + { + "caller": "predict_scores", + "callee": "z[\"author\"].detach().cpu", + "lineNumber": 77 + }, + { + "caller": "predict_scores", + "callee": "z[\"author\"].detach", + "lineNumber": 77 + }, + { + "caller": "predict_scores", + "callee": "z[\"paper\"].detach().cpu().numpy", + "lineNumber": 78 + }, + { + "caller": "predict_scores", + "callee": "z[\"paper\"].detach().cpu", + "lineNumber": 78 + }, + { + "caller": "predict_scores", + "callee": "z[\"paper\"].detach", + "lineNumber": 78 + }, + { + "caller": "predict_scores", + "callee": "range", + "lineNumber": 80 + }, + { + "caller": "predict_scores", + "callee": "len", + "lineNumber": 80 + }, + { + "caller": "predict_scores", + "callee": "scores.append", + "lineNumber": 82 + }, + { + "caller": "predict_scores", + "callee": "np.sum(a[b[:, 0]] * p[b[:, 1]], axis=1).astype", + "lineNumber": 82 + }, + { + "caller": "predict_scores", + "callee": "np.sum", + "lineNumber": 82 + }, + { + "caller": "predict_scores", + "callee": "np.concatenate", + "lineNumber": 83 + }, + { + "caller": "train_one", + "callee": "lgcn.set_seed", + "lineNumber": 87 + }, + { + "caller": "train_one", + "callee": "torch.device", + "lineNumber": 88 + }, + { + "caller": "train_one", + "callee": "SAGERecommender(\n data.metadata(),\n args.num_authors,\n parts[\"paper_feat_aug\"].shape[1],\n args.hidden_dim,\n args.layers,\n args.dropout,\n ).to", + "lineNumber": 89 + }, + { + "caller": "train_one", + "callee": "SAGERecommender", + "lineNumber": 89 + }, + { + "caller": "train_one", + "callee": "data.metadata", + "lineNumber": 90 + }, + { + "caller": "train_one", + "callee": "torch.optim.AdamW", + "lineNumber": 97 + }, + { + "caller": "train_one", + "callee": "model.parameters", + "lineNumber": 97 + }, + { + "caller": "train_one", + "callee": "min", + "lineNumber": 99 + }, + { + "caller": "train_one", + "callee": "pos_edges.size", + "lineNumber": 99 + }, + { + "caller": "train_one", + "callee": "parts[\"val_pairs\"][[\"source\", \"target\"]].to_numpy", + "lineNumber": 100 + }, + { + "caller": "train_one", + "callee": "parts[\"val_pairs\"][\"label\"].to_numpy", + "lineNumber": 101 + }, + { + "caller": "train_one", + "callee": "range", + "lineNumber": 105 + }, + { + "caller": "train_one", + "callee": "model.train", + "lineNumber": 106 + }, + { + "caller": "train_one", + "callee": "torch.randperm", + "lineNumber": 107 + }, + { + "caller": "train_one", + "callee": "pos_edges.size", + "lineNumber": 107 + }, + { + "caller": "train_one", + "callee": "lgcn.sample_hard_negatives", + "lineNumber": 109 + }, + { + "caller": "train_one", + "callee": "pos.size", + "lineNumber": 109 + }, + { + "caller": "train_one", + "callee": "model.encode", + "lineNumber": 110 + }, + { + "caller": "train_one", + "callee": "model.decode(z, pos).repeat_interleave", + "lineNumber": 111 + }, + { + "caller": "train_one", + "callee": "model.decode", + "lineNumber": 111 + }, + { + "caller": "train_one", + "callee": "model.decode", + "lineNumber": 112 + }, + { + "caller": "train_one", + "callee": "F.logsigmoid(pos_s - neg_s).mean", + "lineNumber": 113 + }, + { + "caller": "train_one", + "callee": "F.logsigmoid", + "lineNumber": 113 + }, + { + "caller": "train_one", + "callee": "opt.zero_grad", + "lineNumber": 114 + }, + { + "caller": "train_one", + "callee": "loss.backward", + "lineNumber": 115 + }, + { + "caller": "train_one", + "callee": "torch.nn.utils.clip_grad_norm_", + "lineNumber": 116 + }, + { + "caller": "train_one", + "callee": "model.parameters", + "lineNumber": 116 + }, + { + "caller": "train_one", + "callee": "opt.step", + "lineNumber": 117 + }, + { + "caller": "train_one", + "callee": "predict_scores", + "lineNumber": 120 + }, + { + "caller": "train_one", + "callee": "lgcn.best_f1", + "lineNumber": 121 + }, + { + "caller": "train_one", + "callee": "v.detach().cpu", + "lineNumber": 124 + }, + { + "caller": "train_one", + "callee": "v.detach", + "lineNumber": 124 + }, + { + "caller": "train_one", + "callee": "model.state_dict().items", + "lineNumber": 124 + }, + { + "caller": "train_one", + "callee": "model.state_dict", + "lineNumber": 124 + }, + { + "caller": "train_one", + "callee": "np.save", + "lineNumber": 125 + }, + { + "caller": "train_one", + "callee": "print", + "lineNumber": 126 + }, + { + "caller": "train_one", + "callee": "loss.item", + "lineNumber": 126 + }, + { + "caller": "train_one", + "callee": "torch.save", + "lineNumber": 129 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 134 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 135 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 136 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 137 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 138 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 139 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 140 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 141 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 142 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 143 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 144 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 145 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 146 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 147 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 148 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 149 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 150 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 151 + }, + { + "caller": "main", + "callee": "parser.add_argument", + "lineNumber": 152 + }, + { + "caller": "main", + "callee": "parser.parse_args", + "lineNumber": 153 + }, + { + "caller": "main", + "callee": "load_lgcn_module", + "lineNumber": 156 + }, + { + "caller": "main", + "callee": "lgcn.build_parts", + "lineNumber": 157 + }, + { + "caller": "main", + "callee": "lgcn.build_data", + "lineNumber": 158 + }, + { + "caller": "main", + "callee": "torch.device", + "lineNumber": 158 + }, + { + "caller": "main", + "callee": "(out_dir / \"scores\").mkdir", + "lineNumber": 160 + }, + { + "caller": "main", + "callee": "(out_dir / \"checkpoints\").mkdir", + "lineNumber": 161 + }, + { + "caller": "main", + "callee": "train_one", + "lineNumber": 165 + }, + { + "caller": "main", + "callee": "rows.append", + "lineNumber": 166 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values(\"f1\", ascending=False).to_csv", + "lineNumber": 167 + }, + { + "caller": "main", + "callee": "pd.DataFrame(rows).sort_values", + "lineNumber": 167 + }, + { + "caller": "main", + "callee": "pd.DataFrame", + "lineNumber": 167 + }, + { + "caller": "main", + "callee": "parts[\"val_pairs\"][\"label\"].to_numpy", + "lineNumber": 169 + }, + { + "caller": "main", + "callee": "p.exists", + "lineNumber": 174 + }, + { + "caller": "main", + "callee": "vals.append", + "lineNumber": 175 + }, + { + "caller": "main", + "callee": "np.load", + "lineNumber": 175 + }, + { + "caller": "main", + "callee": "names.append", + "lineNumber": 176 + }, + { + "caller": "main", + "callee": "np.mean", + "lineNumber": 178 + }, + { + "caller": "main", + "callee": "lgcn.best_f1", + "lineNumber": 179 + }, + { + "caller": "main", + "callee": "np.save", + "lineNumber": 180 + }, + { + "caller": "main", + "callee": "(out_dir / \"ensemble_result.txt\").write_text", + "lineNumber": 181 + }, + { + "caller": "main", + "callee": "','.join", + "lineNumber": 182 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 184 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 6, + "functionCount": 4, + "classCount": 2 + } + }, + { + "path": "data_and_docs/advice.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 468, + "nonEmptyLines": 262, + "sections": [ + { + "heading": "“老师 / reviewer / TA”", + "level": 1, + "line": 22 + }, + { + "heading": "一、最大的优点:你们的“问题定义”是清楚的", + "level": 1, + "line": 28 + }, + { + "heading": "二、你们对“冷启动”的讨论是加分项", + "level": 1, + "line": 60 + }, + { + "heading": "GNN 在推荐中的核心价值", + "level": 1, + "line": 72 + }, + { + "heading": "图结构能传播稀疏节点的信息", + "level": 1, + "line": 80 + }, + { + "heading": "三、Research Plan 写得不错,但还可以更“科研化”", + "level": 1, + "line": 86 + }, + { + "heading": "“工程流水账”", + "level": 1, + "line": 92 + }, + { + "heading": "“研究问题(Research Questions)”", + "level": 1, + "line": 106 + }, + { + "heading": "RQ1", + "level": 2, + "line": 112 + }, + { + "heading": "RQ2", + "level": 2, + "line": 125 + }, + { + "heading": "RQ3", + "level": 2, + "line": 137 + }, + { + "heading": "非常像正式 paper", + "level": 1, + "line": 145 + }, + { + "heading": "四、目前最弱的一部分:baseline 还不够强", + "level": 1, + "line": 151 + }, + { + "heading": "1. Matrix Factorization", + "level": 1, + "line": 163 + }, + { + "heading": "2. Node2Vec / DeepWalk", + "level": 1, + "line": 178 + }, + { + "heading": "非 GNN graph embedding baseline", + "level": 1, + "line": 184 + }, + { + "heading": "3. Common Neighbor / Adamic-Adar", + "level": 1, + "line": 190 + }, + { + "heading": "三层 baseline", + "level": 1, + "line": 202 + }, + { + "heading": "Level 1", + "level": 2, + "line": 206 + }, + { + "heading": "Level 2", + "level": 2, + "line": 215 + }, + { + "heading": "Level 3", + "level": 2, + "line": 224 + }, + { + "heading": "五、负采样部分写得很好", + "level": 1, + "line": 235 + }, + { + "heading": "区分容易混淆的论文", + "level": 1, + "line": 251 + }, + { + "heading": "六、这里有一个潜在风险:label leakage", + "level": 1, + "line": 263 + }, + { + "heading": "测试集论文是否出现在训练 citation graph 中", + "level": 1, + "line": 273 + }, + { + "heading": "七、feature.pkl 那里还可以写得更具体", + "level": 1, + "line": 291 + }, + { + "heading": "八、你们目前最合理的主模型其实是:", + "level": 1, + "line": 317 + }, + { + "heading": "LightGCN + Heterogeneous Edges", + "level": 1, + "line": 319 + }, + { + "heading": "优点 1:推荐系统适配性极强", + "level": 2, + "line": 325 + }, + { + "heading": "recommendation 专用 GNN", + "level": 1, + "line": 329 + }, + { + "heading": "优点 2:不会过拟合", + "level": 2, + "line": 333 + }, + { + "heading": "优点 3:老师会更认可", + "level": 2, + "line": 354 + }, + { + "heading": "根据任务特点选模型", + "level": 1, + "line": 364 + }, + { + "heading": "九、proposal 里缺少“evaluation protocol”", + "level": 1, + "line": 370 + }, + { + "heading": "Validation Split", + "level": 1, + "line": 376 + }, + { + "heading": "Metrics", + "level": 1, + "line": 386 + }, + { + "heading": "十、一个很值得加入的点:Meta-path", + "level": 1, + "line": 402 + }, + { + "heading": "meta-path 是经典关键词", + "level": 1, + "line": 423 + }, + { + "heading": "十一、如果我是 reviewer,我会给的评价", + "level": 1, + "line": 427 + }, + { + "heading": "优点", + "level": 2, + "line": 433 + }, + { + "heading": "缺点", + "level": 2, + "line": 443 + }, + { + "heading": "十二、我最建议你们加的一句话", + "level": 1, + "line": 452 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 42 + } + }, + { + "path": "data_and_docs/dataset.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 27, + "nonEmptyLines": 21, + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 0 + } + }, + { + "path": "data_and_docs/project_description.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 22, + "nonEmptyLines": 15, + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 0 + } + }, + { + "path": "data_and_docs/project_evaluation.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 15, + "nonEmptyLines": 10, + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 0 + } + }, + { + "path": "data_and_docs/project-example-2026-pygver.ipynb", + "language": "ipynb", + "fileCategory": "code", + "totalLines": 1, + "nonEmptyLines": 1, + "metrics": {} + }, + { + "path": "data_and_docs/proposal.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 49, + "nonEmptyLines": 25, + "sections": [ + { + "heading": "Project Proposal", + "level": 1, + "line": 1 + }, + { + "heading": "Introduction", + "level": 2, + "line": 3 + }, + { + "heading": "Related Work", + "level": 2, + "line": 11 + }, + { + "heading": "Research Plan", + "level": 2, + "line": 17 + }, + { + "heading": "Expected Outcome", + "level": 2, + "line": 37 + }, + { + "heading": "Options", + "level": 2, + "line": 43 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 6 + } + }, + { + "path": "data_and_docs/references.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 12, + "nonEmptyLines": 12, + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 0 + } + }, + { + "path": "docs_first_principles/_fact_sheet.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 287, + "nonEmptyLines": 240, + "sections": [ + { + "heading": "CS3319 推荐系统代码库 — 权威事实表 (fact_sheet)", + "level": 1, + "line": 1 + }, + { + "heading": "1. 一句话总览", + "level": 2, + "line": 8 + }, + { + "heading": "2. 权威数字表", + "level": 2, + "line": 17 + }, + { + "heading": "2.1 图与数据集规模(实测 `wc -l`)", + "level": 3, + "line": 19 + }, + { + "heading": "2.2 验证切分(dynamic_seed202)", + "level": 3, + "line": 35 + }, + { + "heading": "2.3 方法演进(验证 F1, 同 seed=202 1:1 OOF) + 公开 LB F1", + "level": 3, + "line": 45 + }, + { + "heading": "2.4 高阶消融(high_order_graph_stack/validation_summary.csv,实测 4 行)", + "level": 3, + "line": 62 + }, + { + "heading": "2.5 259 维特征构成", + "level": 3, + "line": 73 + }, + { + "heading": "2.6 概率阈值与正例率 / 决策规则", + "level": 3, + "line": 94 + }, + { + "heading": "2.7 LightGBM 最终超参(high_order_graph_stack fit_full_predict)", + "level": 3, + "line": 105 + }, + { + "heading": "2.8 标签对齐复算(已验证)", + "level": 3, + "line": 118 + }, + { + "heading": "3. 方法演进时间线表", + "level": 2, + "line": 124 + }, + { + "heading": "4. 文件流文本图", + "level": 2, + "line": 141 + }, + { + "heading": "5. 不一致台账(全部审计 inconsistencies 汇总 + 裁决)", + "level": 2, + "line": 182 + }, + { + "heading": "6. 关键代码位置速查表", + "level": 2, + "line": 214 + }, + { + "heading": "7. 三目录图表清单(候选素材)", + "level": 2, + "line": 259 + }, + { + "heading": "附: open_questions(待跨审计/后续核验)", + "level": 2, + "line": 278 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 17 + } + }, + { + "path": "docs_first_principles/00_README.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 152, + "nonEmptyLines": 114, + "sections": [ + { + "heading": "00_README —— 第一性原理文档包入口", + "level": 1, + "line": 1 + }, + { + "heading": "1. 这个文档包解决什么问题", + "level": 2, + "line": 7 + }, + { + "heading": "2. 本项目一句话概括", + "level": 2, + "line": 32 + }, + { + "heading": "3. 最终方法一句话概括", + "level": 2, + "line": 36 + }, + { + "heading": "4. 最终公开 F1 与最重要技术点", + "level": 2, + "line": 40 + }, + { + "heading": "5. 推荐阅读顺序", + "level": 2, + "line": 48 + }, + { + "heading": "6. 每篇文档一句话用途", + "level": 2, + "line": 77 + }, + { + "heading": "7. 哪些内容适合直接进论文(简版,详见 SUMMARY)", + "level": 2, + "line": 100 + }, + { + "heading": "8. 哪些是帮助理解代码的(不进论文)", + "level": 2, + "line": 108 + }, + { + "heading": "9. 全部文档总表", + "level": 2, + "line": 118 + }, + { + "heading": "可迁移到论文中的写法", + "level": 2, + "line": 141 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 11 + } + }, + { + "path": "docs_first_principles/01_problem_and_dataset.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 168, + "nonEmptyLines": 105, + "sections": [ + { + "heading": "01 · 任务定义与数据集(第一性原理)", + "level": 1, + "line": 1 + }, + { + "heading": "1. 一句话定位:这是一个\"学术阅读推荐\"任务", + "level": 2, + "line": 7 + }, + { + "heading": "1.1 为什么 author-paper pair 等价于链路预测", + "level": 3, + "line": 17 + }, + { + "heading": "2. 节点与边的第一性原理拆解", + "level": 2, + "line": 28 + }, + { + "heading": "2.1 两类节点", + "level": 3, + "line": 30 + }, + { + "heading": "2.2 三类边及其方向语义", + "level": 3, + "line": 39 + }, + { + "heading": "2.3 文件样例(本审计实测 head)", + "level": 3, + "line": 49 + }, + { + "heading": "3. 五个数据文件逐一定义", + "level": 2, + "line": 61 + }, + { + "heading": "4. 训练集 vs 测试集 vs 验证集(三种\"集\"别混)", + "level": 2, + "line": 77 + }, + { + "heading": "5. 为什么是\"异构图\"而不是\"表格二分类\"", + "level": 2, + "line": 101 + }, + { + "heading": "异构 vs 同构", + "level": 3, + "line": 115 + }, + { + "heading": "6. 为什么稀疏 + 长尾 = 难,以及为什么 F1 比 accuracy 重要", + "level": 2, + "line": 122 + }, + { + "heading": "6.1 稀疏度(实测计算)", + "level": 3, + "line": 124 + }, + { + "heading": "6.2 长尾", + "level": 3, + "line": 137 + }, + { + "heading": "6.3 为什么用 F1 而非 accuracy", + "level": 3, + "line": 141 + }, + { + "heading": "7. 可迁移到论文中的写法", + "level": 2, + "line": 154 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 16 + } + }, + { + "path": "docs_first_principles/02_architecture_overview.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 236, + "nonEmptyLines": 176, + "sections": [ + { + "heading": "02 系统架构总览(两阶段 Stacking)", + "level": 1, + "line": 1 + }, + { + "heading": "1. 一句话定位", + "level": 2, + "line": 7 + }, + { + "heading": "2. 为什么不直接用一个 GNN:互补性论证", + "level": 2, + "line": 21 + }, + { + "heading": "3. 总体 Pipeline(文本树状图)", + "level": 2, + "line": 37 + }, + { + "heading": "4. Stage-1:分数源 / 特征源全景", + "level": 2, + "line": 76 + }, + { + "heading": "5. Stage-2:LightGBM stacker 做什么", + "level": 2, + "line": 99 + }, + { + "heading": "为何叫 two-stage stacking", + "level": 3, + "line": 112 + }, + { + "heading": "6. 决策层:为何用 rank-cutoff 而非概率阈值", + "level": 2, + "line": 118 + }, + { + "heading": "7. 最终方法 vs 早期 LightGCN ensemble 的区别", + "level": 2, + "line": 126 + }, + { + "heading": "baseline → final 的演进主线", + "level": 3, + "line": 138 + }, + { + "heading": "8. 模块间的互补关系(一句话版)", + "level": 2, + "line": 153 + }, + { + "heading": "9. 数据流一致性说明", + "level": 2, + "line": 166 + }, + { + "heading": "可迁移到论文中的写法", + "level": 2, + "line": 172 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 13 + } + }, + { + "path": "docs_first_principles/03_data_flow_and_artifacts.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 302, + "nonEmptyLines": 210, + "sections": [ + { + "heading": "03 · 数据流与产物文件(从原始 txt 到最终 submission)", + "level": 1, + "line": 1 + }, + { + "heading": "1. 起点:五类原始输入(全在 `data_and_docs/`)", + "level": 2, + "line": 10 + }, + { + "heading": "2. 切分:`dynamic_seed202` 到底是什么", + "level": 2, + "line": 26 + }, + { + "heading": "2.1 为什么需要一个切分", + "level": 3, + "line": 28 + }, + { + "heading": "2.2 为什么叫 \"dynamic_seed202\"", + "level": 3, + "line": 41 + }, + { + "heading": "2.3 为什么 1:1 正负", + "level": 3, + "line": 46 + }, + { + "heading": "2.4 切分产物(落盘缓存)", + "level": 3, + "line": 50 + }, + { + "heading": "2.5 为什么 `--split-seed` 是\"承重墙(load-bearing)\"", + "level": 3, + "line": 61 + }, + { + "heading": "3. 分数文件:`.npy` 是什么、`val_*` 和 `test_*` 差在哪", + "level": 2, + "line": 67 + }, + { + "heading": "3.1 `.npy` 分数文件的本质", + "level": 3, + "line": 69 + }, + { + "heading": "3.2 `val_*` vs `test_*`:同一模型的两套分数", + "level": 3, + "line": 79 + }, + { + "heading": "3.3 一句话区分三组文件名前缀", + "level": 3, + "line": 95 + }, + { + "heading": "4. OOF(Out-of-Fold):为什么 stacker 的验证分\"无泄漏\"", + "level": 2, + "line": 105 + }, + { + "heading": "4.1 问题", + "level": 3, + "line": 107 + }, + { + "heading": "4.2 解法:5 折 StratifiedKFold OOF", + "level": 3, + "line": 111 + }, + { + "heading": "4.3 测试预测怎么来", + "level": 3, + "line": 123 + }, + { + "heading": "5. `validation_runs/dynamic_seed202/` 目录里有什么", + "level": 2, + "line": 129 + }, + { + "heading": "6. `feature_cache/`:cache-or-compute 约定", + "level": 2, + "line": 156 + }, + { + "heading": "6.1 为什么需要缓存", + "level": 3, + "line": 158 + }, + { + "heading": "6.2 缓存文件名怎么生成(key 的身份)", + "level": 3, + "line": 162 + }, + { + "heading": "7. 全流程数据流文本图(一图看完)", + "level": 2, + "line": 182 + }, + { + "heading": "8. 最终 submission 是怎么生成的(决策规则)", + "level": 2, + "line": 224 + }, + { + "heading": "8.1 为什么用 rank-cutoff 而不是概率阈值", + "level": 3, + "line": 238 + }, + { + "heading": "8.2 为什么要强制已知正边 = 1", + "level": 3, + "line": 242 + }, + { + "heading": "9. 复现路径:最短 vs 从零", + "level": 2, + "line": 250 + }, + { + "heading": "9.1 最短路径(产物已缓存,推荐)", + "level": 3, + "line": 252 + }, + { + "heading": "9.2 从零端到端(产物缺失时,需 GPU)", + "level": 3, + "line": 264 + }, + { + "heading": "9.3 快速验证(不重训,只核对已有 submission)", + "level": 3, + "line": 278 + }, + { + "heading": "10. 常见文件阅读陷阱(第一性原理提醒)", + "level": 2, + "line": 284 + }, + { + "heading": "可迁移到论文中的写法", + "level": 2, + "line": 298 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 30 + } + }, + { + "path": "docs_first_principles/04_lightgcn_from_first_principles.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 335, + "nonEmptyLines": 215, + "sections": [ + { + "heading": "04 — LightGCN 第一性原理", + "level": 1, + "line": 1 + }, + { + "heading": "1. 从推荐问题到二部图", + "level": 2, + "line": 8 + }, + { + "heading": "1.1 推荐本质: 给\"用户×物品\"打分排序", + "level": 3, + "line": 10 + }, + { + "heading": "1.2 推荐为何可看成\"二部图链路预测\"", + "level": 3, + "line": 29 + }, + { + "heading": "2. Embedding 是什么: 把节点变成向量", + "level": 2, + "line": 47 + }, + { + "heading": "2.1 直觉", + "level": 3, + "line": 49 + }, + { + "heading": "2.2 两种 embedding 来源", + "level": 3, + "line": 67 + }, + { + "heading": "3. 邻居传播为何有助于推荐", + "level": 2, + "line": 78 + }, + { + "heading": "3.1 一个朴素道理", + "level": 3, + "line": 80 + }, + { + "heading": "3.2 LightGCN 的层聚合公式", + "level": 3, + "line": 86 + }, + { + "heading": "4. GCN vs LightGCN: 为何要\"砍掉\"", + "level": 2, + "line": 108 + }, + { + "heading": "4.1 标准 GCN 在做什么", + "level": 3, + "line": 110 + }, + { + "heading": "4.2 LightGCN 的发现与简化", + "level": 3, + "line": 120 + }, + { + "heading": "4.3 本项目的图构造细节", + "level": 3, + "line": 135 + }, + { + "heading": "5. BPR loss: 为何比 BCE 更适合排序", + "level": 2, + "line": 150 + }, + { + "heading": "5.1 排序任务要的是\"相对顺序\", 不是\"绝对概率\"", + "level": 3, + "line": 152 + }, + { + "heading": "5.2 与 BCE / hinge 对比", + "level": 3, + "line": 167 + }, + { + "heading": "6. Negative Sampling: 没有边就是负样本吗?", + "level": 2, + "line": 181 + }, + { + "heading": "6.1 为何要负采样", + "level": 3, + "line": 183 + }, + { + "heading": "6.2 本项目的混合硬负采样", + "level": 3, + "line": 189 + }, + { + "heading": "7. 多 seed / 多 checkpoint ensemble 的价值", + "level": 2, + "line": 205 + }, + { + "heading": "7.1 单模型为何不稳", + "level": 3, + "line": 207 + }, + { + "heading": "7.2 Ensemble 降低方差、提升主分数", + "level": 3, + "line": 211 + }, + { + "heading": "8. 验证切分: 人工 1:1 与最优阈值", + "level": 2, + "line": 225 + }, + { + "heading": "8.1 `make_notebook_style_split`", + "level": 3, + "line": 227 + }, + { + "heading": "8.2 `best_f1`: 验证最优排序阈值", + "level": 3, + "line": 240 + }, + { + "heading": "9. LightGCN 在本项目里的作用, 以及它的盲区", + "level": 2, + "line": 246 + }, + { + "heading": "9.1 作用: Stage-1 主分数生产者", + "level": 3, + "line": 248 + }, + { + "heading": "9.2 LightGCN 的盲区(为何还需要 stacker)", + "level": 3, + "line": 252 + }, + { + "heading": "9.3 LightGCN 与显式特征 / stacker 的分工", + "level": 3, + "line": 265 + }, + { + "heading": "10. 测试决策: 为什么不用最优概率阈值", + "level": 2, + "line": 275 + }, + { + "heading": "11. 关键代码位置速查", + "level": 2, + "line": 288 + }, + { + "heading": "可迁移到论文中的写法", + "level": 2, + "line": 308 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 33 + } + }, + { + "path": "docs_first_principles/05_feature_stacking_and_lightgbm.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 242, + "nonEmptyLines": 167, + "sections": [ + { + "heading": "05 · 手工图特征与 LightGBM 二阶段融合", + "level": 1, + "line": 1 + }, + { + "heading": "1. 一句话定位", + "level": 2, + "line": 7 + }, + { + "heading": "2. 第一性原理:为什么需要手工图特征?", + "level": 2, + "line": 18 + }, + { + "heading": "2.1 LightGCN 在表达什么、又不表达什么", + "level": 3, + "line": 20 + }, + { + "heading": "2.2 那么\"手工图特征\"和\"meta-path\"到底是什么", + "level": 3, + "line": 37 + }, + { + "heading": "2.3 各 meta-path 直觉详解", + "level": 3, + "line": 51 + }, + { + "heading": "3. 18 维手工特征的完整构成", + "level": 2, + "line": 61 + }, + { + "heading": "输出表:特征组 × 图结构 × 推荐信号", + "level": 3, + "line": 88 + }, + { + "heading": "4. 实现细节:为什么是 set 运算而非稀疏矩阵?", + "level": 2, + "line": 103 + }, + { + "heading": "5. LightGBM 作为\"二阶段融合器\"而非主模型", + "level": 2, + "line": 125 + }, + { + "heading": "5.1 概念:为什么 LightGBM 适合做融合", + "level": 3, + "line": 127 + }, + { + "heading": "5.2 输入输出", + "level": 3, + "line": 135 + }, + { + "heading": "6. OOF stacking:如何避免验证泄漏?", + "level": 2, + "line": 161 + }, + { + "heading": "7. 为什么 graph/meta-path stacking 是最大增益之一?", + "level": 2, + "line": 184 + }, + { + "heading": "8. feature-group contribution 怎么解释(论文图建议)", + "level": 2, + "line": 200 + }, + { + "heading": "9. 可迁移到论文中的写法", + "level": 2, + "line": 217 + }, + { + "heading": "附:关键代码与文件速查", + "level": 2, + "line": 231 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 17 + } + }, + { + "path": "docs_first_principles/06_random_walk_features.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 254, + "nonEmptyLines": 170, + "sections": [ + { + "heading": "06 — 随机游走特征 (DeepWalk / Node2Vec) 第一性原理", + "level": 1, + "line": 1 + }, + { + "heading": "1. 随机游走在图上做什么: 一句话与一幅图", + "level": 2, + "line": 8 + }, + { + "heading": "1.1 一个具体的\"无直接边却频繁接近\"的例子", + "level": 3, + "line": 33 + }, + { + "heading": "2. DeepWalk 的核心思想: 图 → 语料 → Word2Vec", + "level": 2, + "line": 51 + }, + { + "heading": "3. Node2Vec 比 DeepWalk 多什么: p 与 q 两个旋钮", + "level": 2, + "line": 67 + }, + { + "heading": "4. 为什么游走 embedding 是 LightGCN 之外的互补信号", + "level": 2, + "line": 85 + }, + { + "heading": "5. 为什么是 7 个 RW blocks: 多样性即互补", + "level": 2, + "line": 101 + }, + { + "heading": "5.1 七个最终配置块(与 `models/` 实存模型 + README 复现命令一致)", + "level": 3, + "line": 105 + }, + { + "heading": "5.2 每块产出 11 维 pair 特征", + "level": 3, + "line": 127 + }, + { + "heading": "5.3 第 8 个\"块\": 一致性聚合 (11 维)", + "level": 3, + "line": 139 + }, + { + "heading": "6. RW ensemble size 曲线怎么解释: 多样性的边际收益", + "level": 2, + "line": 156 + }, + { + "heading": "7. RW 特征 vs 显式图 / meta-path 特征: 互补的两种\"图结构\"信号", + "level": 2, + "line": 178 + }, + { + "heading": "8. 为什么 RW 特征能提升泛化", + "level": 2, + "line": 194 + }, + { + "heading": "9. 关键代码与缓存位置速查", + "level": 2, + "line": 208 + }, + { + "heading": "可迁移到论文中的写法", + "level": 2, + "line": 230 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 15 + } + }, + { + "path": "docs_first_principles/07_high_order_citation_propagation.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 357, + "nonEmptyLines": 240, + "sections": [ + { + "heading": "07 高阶引用传播(Citation-aware High-order Propagation)", + "level": 1, + "line": 1 + }, + { + "heading": "0. 一句话定位", + "level": 2, + "line": 9 + }, + { + "heading": "1. 为什么需要\"高阶\":先理解数据的三类边", + "level": 2, + "line": 25 + }, + { + "heading": "1.1 为什么\"直接用 author→paper 历史边\"不够", + "level": 3, + "line": 35 + }, + { + "heading": "1.2 为什么走\"引用网络\"而不是只走二部图", + "level": 3, + "line": 43 + }, + { + "heading": "2. 三个基础矩阵:R、C、S", + "level": 2, + "line": 54 + }, + { + "heading": "2.1 矩阵定义", + "level": 3, + "line": 58 + }, + { + "heading": "2.2 为什么引用边要分三个方向(forward / backward / undirected)", + "level": 3, + "line": 79 + }, + { + "heading": "3. 核心公式:$H_k = R\\,C^k$ 与 $G_k = S\\,R\\,C^k$", + "level": 2, + "line": 93 + }, + { + "heading": "3.1 $H_k[a,p]$:作者历史论文经 k 跳引用传播到达候选的强度", + "level": 3, + "line": 95 + }, + { + "heading": "3.2 $G_k[a,p]$:合著网络共识对候选的支持", + "level": 3, + "line": 124 + }, + { + "heading": "3.3 直观对比:两条传播路径", + "level": 3, + "line": 142 + }, + { + "heading": "4. popularity normalization:为什么要除以\"论文的热度\"", + "level": 2, + "line": 158 + }, + { + "heading": "4.1 directed 版还多一列:delta(逐跳增量)", + "level": 3, + "line": 172 + }, + { + "heading": "5. 完整伪代码:24 维无向 + 45 维有向", + "level": 2, + "line": 180 + }, + { + "heading": "5.1 无向版 `build_high_order`(24 维,`:74-122`)", + "level": 3, + "line": 182 + }, + { + "heading": "5.2 有向版 `build_high_order_directed`(45 维,`:125-176`)", + "level": 3, + "line": 211 + }, + { + "heading": "5.3 259 维最终拼接(`:292`)", + "level": 3, + "line": 244 + }, + { + "heading": "6. 为什么\"有向\"是决定性的最后一刀(诚实评估)", + "level": 2, + "line": 259 + }, + { + "heading": "6.1 消融增益分解(来自 validation_summary.csv)", + "level": 3, + "line": 263 + }, + { + "heading": "6.2 怎么在论文里诚实表述", + "level": 3, + "line": 272 + }, + { + "heading": "7. 决策层:为什么测试用 rank cutoff 而不是概率阈值", + "level": 2, + "line": 282 + }, + { + "heading": "7.1 LightGBM 超参", + "level": 3, + "line": 296 + }, + { + "heading": "8. 缓存与可复现性", + "level": 2, + "line": 307 + }, + { + "heading": "9. 这部分在论文中如何写成方法贡献", + "level": 2, + "line": 334 + }, + { + "heading": "可迁移到论文中的写法", + "level": 2, + "line": 346 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 26 + } + }, + { + "path": "docs_first_principles/08_calibration_and_rank_cutoff.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 293, + "nonEmptyLines": 195, + "sections": [ + { + "heading": "08 校准与 rank cutoff:为什么验证最优阈值不能直接搬到测试集", + "level": 1, + "line": 1 + }, + { + "heading": "1. 一句话结论", + "level": 2, + "line": 7 + }, + { + "heading": "2. 先把概念钉死:概率阈值 vs rank cutoff", + "level": 2, + "line": 15 + }, + { + "heading": "3. 为什么验证集是\"人工 1:1\":第一性原理", + "level": 2, + "line": 33 + }, + { + "heading": "3.1 数据的天然不平衡", + "level": 3, + "line": 35 + }, + { + "heading": "3.2 验证集是怎么造出来的", + "level": 3, + "line": 39 + }, + { + "heading": "3.3 为什么不直接用自然比例?", + "level": 3, + "line": 58 + }, + { + "heading": "4. 为什么验证最优阈值不能直接搬到测试集", + "level": 2, + "line": 66 + }, + { + "heading": "4.1 验证最优阈值长什么样", + "level": 3, + "line": 68 + }, + { + "heading": "4.2 搬到测试集会发生什么", + "level": 3, + "line": 80 + }, + { + "heading": "4.3 第一性原理:为什么 LightGBM 的输出不是校准概率", + "level": 3, + "line": 92 + }, + { + "heading": "4.4 实证:阈值随 seed 剧烈抖动,ratio 不抖动", + "level": 3, + "line": 102 + }, + { + "heading": "5. rank cutoff:是什么,为什么 top 50% 更稳", + "level": 2, + "line": 124 + }, + { + "heading": "5.1 定义", + "level": 3, + "line": 126 + }, + { + "heading": "5.2 为什么更稳:三个理由", + "level": 3, + "line": 148 + }, + { + "heading": "5.3 选 0.500 的依据", + "level": 3, + "line": 154 + }, + { + "heading": "6. known positives 强制为 1:为什么必须有这一步", + "level": 2, + "line": 173 + }, + { + "heading": "7. fig6 rank cutoff calibration 怎么解读", + "level": 2, + "line": 192 + }, + { + "heading": "8. 误差分桶:rank cutoff 之外还藏了什么", + "level": 2, + "line": 213 + }, + { + "heading": "9. 工程决策如何体现对分布偏移的理解", + "level": 2, + "line": 236 + }, + { + "heading": "10. 可迁移到论文中的写法", + "level": 2, + "line": 265 + }, + { + "heading": "附:关键代码与数据位置", + "level": 3, + "line": 279 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 22 + } + }, + { + "path": "docs_first_principles/09_experiment_timeline.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 141, + "nonEmptyLines": 91, + "sections": [ + { + "heading": "09 实验演进时间线 (Experiment Timeline)", + "level": 1, + "line": 1 + }, + { + "heading": "1. 任务回顾与本时间线的坐标系", + "level": 2, + "line": 7 + }, + { + "heading": "2. 实验演进总表(可直接转论文结果表)", + "level": 2, + "line": 20 + }, + { + "heading": "3. 三段大跃迁的第一性原理解读", + "level": 2, + "line": 41 + }, + { + "heading": "3.1 跃迁一:从\"复杂 GNN\"到\"轻量 CF\"(Stage 0→1,+0.054 验证)", + "level": 3, + "line": 43 + }, + { + "heading": "3.2 跃迁二:从\"单分数\"到\"meta-path stacking\"(Stage 1→2,+0.0174 验证)", + "level": 3, + "line": 51 + }, + { + "heading": "3.3 跃迁三:从\"局部 CF\"到\"高阶有向引用传播\"(Stage 8→9,+0.0020 验证 / +0.0037 公开)", + "level": 3, + "line": 59 + }, + { + "heading": "4. 两条贯穿全程的方法论教训", + "level": 2, + "line": 80 + }, + { + "heading": "5. 流程图:从原始数据到最终提交", + "level": 2, + "line": 88 + }, + { + "heading": "6. 关于本时间线的可信度说明", + "level": 2, + "line": 115 + }, + { + "heading": "可迁移到论文中的写法", + "level": 2, + "line": 123 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 11 + } + }, + { + "path": "docs_first_principles/10_code_map_and_entrypoints.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 185, + "nonEmptyLines": 130, + "sections": [ + { + "heading": "10 · 代码地图与入口脚本(System Code Map)", + "level": 1, + "line": 1 + }, + { + "heading": "1. 第一性原理:为什么没有 `utils.py`,而是\"脚本互加载\"", + "level": 2, + "line": 10 + }, + { + "heading": "1.1 典型工程 vs 本仓库", + "level": 3, + "line": 12 + }, + { + "heading": "1.2 这样设计的后果(读者必须知道)", + "level": 3, + "line": 24 + }, + { + "heading": "2. 脚本分类速览(四类)", + "level": 2, + "line": 34 + }, + { + "heading": "3. 三条核心入口命令", + "level": 2, + "line": 46 + }, + { + "heading": "3.1 重跑最终方法(出 submission)", + "level": 3, + "line": 48 + }, + { + "heading": "3.2 生成图表", + "level": 3, + "line": 59 + }, + { + "heading": "3.3 编译论文 TeX", + "level": 3, + "line": 73 + }, + { + "heading": "4. 两大事实共享库(改动 blast radius 最大)", + "level": 2, + "line": 79 + }, + { + "heading": "4.1 `train_val_lgcn_ensemble.py`(数据 + 切分 + 评分)", + "level": 3, + "line": 83 + }, + { + "heading": "4.2 `stack_rank_calibration.py`(显式图特征 + rank + OOF)", + "level": 3, + "line": 95 + }, + { + "heading": "4.3 其他高频被加载的 peer", + "level": 3, + "line": 106 + }, + { + "heading": "5. 最终入口:`high_order_graph_stack.py` 为什么是终点", + "level": 2, + "line": 119 + }, + { + "heading": "6. Legacy 脚本:能看不能跑", + "level": 2, + "line": 133 + }, + { + "heading": "7. 完整脚本地图表", + "level": 2, + "line": 146 + }, + { + "heading": "8. 常见问题速答", + "level": 2, + "line": 169 + }, + { + "heading": "可迁移到论文中的写法", + "level": 2, + "line": 183 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 18 + } + }, + { + "path": "docs_first_principles/11_figures_and_paper_mapping.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 367, + "nonEmptyLines": 288, + "sections": [ + { + "heading": "11. 图表与论文章节映射", + "level": 1, + "line": 1 + }, + { + "heading": "1. 仓库实际图表资源盘点(以文件系统为准)", + "level": 2, + "line": 9 + }, + { + "heading": "2. 图 ↔ 论文章节映射主表", + "level": 2, + "line": 24 + }, + { + "heading": "3. 逐图详解:研究问题 / 正文引用 / LaTeX caption", + "level": 2, + "line": 44 + }, + { + "heading": "Figure 1 — 任务与异构图概览(`fig1_graph_overview`)", + "level": 3, + "line": 46 + }, + { + "heading": "Figure 2 — 数据集稀疏与长尾(`fig2_sparsity`)", + "level": 3, + "line": 63 + }, + { + "heading": "Figure 3 — 性能演进路线图(`fig3_roadmap`,论文核心叙事图)", + "level": 3, + "line": 79 + }, + { + "heading": "Figure 4 — 最终流水线架构(`fig4_architecture`)", + "level": 3, + "line": 97 + }, + { + "heading": "Figure 5 — 高阶引用传播消融(`fig5_ablation_highorder`)", + "level": 3, + "line": 117 + }, + { + "heading": "Figure 6 — rank-cutoff vs 概率阈值稳健性(`fig6_rank_vs_threshold`)", + "level": 3, + "line": 144 + }, + { + "heading": "Figure 7 — 误差分桶热力图(`fig7_error_heatmap`)", + "level": 3, + "line": 162 + }, + { + "heading": "Appendix Figure A1 — LightGCN 超参扫描(`figA1_hyperparam`)", + "level": 3, + "line": 179 + }, + { + "heading": "Appendix Figure A2 — 随机游走集成规模(`figA2_rw_ablation`)", + "level": 3, + "line": 193 + }, + { + "heading": "Appendix Figure A3 — 特征组贡献瀑布(`figA3_feature_importance`)", + "level": 3, + "line": 209 + }, + { + "heading": "Appendix Figure A4 — 各阶段 OOF 判别力(`figA4_oof_pr`)", + "level": 3, + "line": 226 + }, + { + "heading": "4. 图表设计原则与\"为什么这么画\"(第一性原理)", + "level": 2, + "line": 243 + }, + { + "heading": "5. 一致性说明(图表 caption 数字与事实表的核对)", + "level": 2, + "line": 255 + }, + { + "heading": "6. 可迁移到论文中的写法", + "level": 2, + "line": 266 + }, + { + "heading": "7. `figures_paper` vs `figures_v2`:该用哪一版?", + "level": 2, + "line": 322 + }, + { + "heading": "7.1 图表复现性(可放进 Reproducibility 段)", + "level": 3, + "line": 342 + }, + { + "heading": "8. 投稿前图表检查清单", + "level": 2, + "line": 352 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 21 + } + }, + { + "path": "docs_first_principles/12_reproduction_guide.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 324, + "nonEmptyLines": 235, + "sections": [ + { + "heading": "12 — 复现指南 (Reproduction Guide)", + "level": 1, + "line": 1 + }, + { + "heading": "0. 复现的三档可执行性(先把预期摆正)", + "level": 2, + "line": 9 + }, + { + "heading": "1. 环境依赖", + "level": 2, + "line": 23 + }, + { + "heading": "1.1 两种安装方式", + "level": 3, + "line": 25 + }, + { + "heading": "1.2 minimal 与完整环境的差异(为什么 minimal 缺东西)", + "level": 3, + "line": 41 + }, + { + "heading": "2. 数据路径约定", + "level": 2, + "line": 55 + }, + { + "heading": "3. 快速验证最终结果(零计算,A 档)", + "level": 2, + "line": 84 + }, + { + "heading": "4. 从缓存复现最终 stacker(B 档,核心命令)", + "level": 2, + "line": 106 + }, + { + "heading": "5. 从 checkpoint 复现早期 LightGCN 提交(B/C 档)", + "level": 2, + "line": 144 + }, + { + "heading": "6. 哪些步骤需要 GPU,哪些只需 CPU", + "level": 2, + "line": 160 + }, + { + "heading": "7. 常见错误与排查", + "level": 2, + "line": 176 + }, + { + "heading": "7.1 缺 `lightgbm` / `gensim` / `node2vec`", + "level": 3, + "line": 178 + }, + { + "heading": "7.2 改 `--split-seed` 非 202 → 全链失效", + "level": 3, + "line": 184 + }, + { + "heading": "7.3 硬编码图维度 6611 / 79937", + "level": 3, + "line": 190 + }, + { + "heading": "7.4 路径写法:Windows PowerShell / bash 一律用正斜杠", + "level": 3, + "line": 196 + }, + { + "heading": "7.5 legacy 脚本不能直接跑", + "level": 3, + "line": 202 + }, + { + "heading": "8. 生成论文图表", + "level": 2, + "line": 208 + }, + { + "heading": "9. 编译 ACM 论文(中文,xelatex)", + "level": 2, + "line": 240 + }, + { + "heading": "10. 端到端从头复现(C 档,仅参考)", + "level": 2, + "line": 258 + }, + { + "heading": "11. 复现流程图(文本块)", + "level": 2, + "line": 275 + }, + { + "heading": "12. 可迁移到论文中的写法(附录 Reproducibility,可直接进 TeX)", + "level": 2, + "line": 296 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 21 + } + }, + { + "path": "docs_first_principles/13_common_questions_for_the_author.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 212, + "nonEmptyLines": 133, + "sections": [ + { + "heading": "13. 答辩 / 审稿视角常见问题与回答", + "level": 1, + "line": 1 + }, + { + "heading": "Q1. 为什么评估指标是 F1,而不是 AUC 或准确率?", + "level": 2, + "line": 7 + }, + { + "heading": "Q2. 为什么 LightGCN 在这个任务上有效?", + "level": 2, + "line": 23 + }, + { + "heading": "Q3. 为什么不用更复杂的 HGT / GAT 作主模型?", + "level": 2, + "line": 37 + }, + { + "heading": "Q4. 为什么显式图 / meta-path 特征带来最大的单一增益(+0.0174)?", + "level": 2, + "line": 50 + }, + { + "heading": "Q5. 为什么 DeepWalk / Node2Vec 的随机游走特征与 LightGCN 不重复?", + "level": 2, + "line": 63 + }, + { + "heading": "Q6. high-order citation propagation 的创新点到底是什么?", + "level": 2, + "line": 77 + }, + { + "heading": "Q7. 为什么用 LightGBM 作 stage-2 stacker,而不是再训一个 GNN 或简单加权?", + "level": 2, + "line": 96 + }, + { + "heading": "Q8. OOF(out-of-fold)是如何避免数据泄漏的?", + "level": 2, + "line": 109 + }, + { + "heading": "Q9. 为什么最终决策用 rank cutoff top 50%,而不是验证最优概率阈值 0.4617?", + "level": 2, + "line": 123 + }, + { + "heading": "Q10. 是否违反课程\"禁预训练模型 / 禁外部数据集\"规则?feature.pkl 算不算外部预训练?", + "level": 2, + "line": 146 + }, + { + "heading": "Q11. 方法是否可解释?", + "level": 2, + "line": 161 + }, + { + "heading": "Q12. 模型在哪里失败?错误集中在哪?", + "level": 2, + "line": 173 + }, + { + "heading": "Q13. 继续改进的下一步是什么?", + "level": 2, + "line": 186 + }, + { + "heading": "可迁移到论文中的写法", + "level": 2, + "line": 198 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 15 + } + }, + { + "path": "docs_first_principles/SUMMARY_FOR_PAPER.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 310, + "nonEmptyLines": 216, + "sections": [ + { + "heading": "SUMMARY_FOR_PAPER — CS3319 推荐系统论文撰写总摘要", + "level": 1, + "line": 1 + }, + { + "heading": "0. 论文摘要草稿(Draft Abstract)", + "level": 2, + "line": 9 + }, + { + "heading": "1. 引言核心论点(Introduction)", + "level": 2, + "line": 23 + }, + { + "heading": "2. 方法贡献三点(Contributions)", + "level": 2, + "line": 35 + }, + { + "heading": "3. 数据集描述段(Dataset)", + "level": 2, + "line": 59 + }, + { + "heading": "4. 最终方法描述段(Method)", + "level": 2, + "line": 79 + }, + { + "heading": "4.1 Stage-1:多源分数与嵌入", + "level": 3, + "line": 109 + }, + { + "heading": "4.2 Stage-1 高阶引用传播(主要方法贡献)", + "level": 3, + "line": 120 + }, + { + "heading": "4.3 Stage-2:LightGBM meta-learner", + "level": 3, + "line": 131 + }, + { + "heading": "4.4 决策规则:rank-cutoff", + "level": 3, + "line": 135 + }, + { + "heading": "5. 实验结果描述段(Results)", + "level": 2, + "line": 147 + }, + { + "heading": "6. 消融实验描述段(Ablation)", + "level": 2, + "line": 170 + }, + { + "heading": "7. Rank-Cutoff 决策描述段(Decision Rule)", + "level": 2, + "line": 206 + }, + { + "heading": "8. 局限性段(Limitations)", + "level": 2, + "line": 214 + }, + { + "heading": "9. 结论段(Conclusion)", + "level": 2, + "line": 226 + }, + { + "heading": "10. 图表 Caption 汇总(Figure/Table Captions)", + "level": 2, + "line": 234 + }, + { + "heading": "11. 可迁移到论文中的写法(可直接进 TeX 的成稿段落)", + "level": 2, + "line": 253 + }, + { + "heading": "建议章节结构", + "level": 3, + "line": 257 + }, + { + "heading": "成稿段落 1 — 高阶传播(主创新小节)", + "level": 3, + "line": 277 + }, + { + "heading": "成稿段落 2 — 两阶段 stacking(方法总览)", + "level": 3, + "line": 281 + }, + { + "heading": "成稿段落 3 — rank-cutoff 决策(方法学贡献)", + "level": 3, + "line": 285 + }, + { + "heading": "成稿段落 4 — 实验结果(主结果句)", + "level": 3, + "line": 289 + }, + { + "heading": "成稿段落 5 — 局限性与结论", + "level": 3, + "line": 293 + }, + { + "heading": "附:关键数字速查(供论文核对)", + "level": 2, + "line": 299 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 24 + } + }, + { + "path": "env/conda-list-cs3319.txt", + "language": "txt", + "fileCategory": "docs", + "totalLines": 100, + "nonEmptyLines": 100, + "metrics": {} + }, + { + "path": "env/environment-cs3319.yml", + "language": "yaml", + "fileCategory": "config", + "totalLines": 106, + "nonEmptyLines": 106, + "sections": [ + { + "heading": "name", + "level": 1, + "line": 1 + }, + { + "heading": "channels", + "level": 1, + "line": 2 + }, + { + "heading": "dependencies", + "level": 1, + "line": 7 + }, + { + "heading": "prefix", + "level": 1, + "line": 106 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 4 + } + }, + { + "path": "env/requirements-minimal.txt", + "language": "txt", + "fileCategory": "docs", + "totalLines": 10, + "nonEmptyLines": 10, + "metrics": {} + }, + { + "path": "figures_paper/README_figures.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 115, + "nonEmptyLines": 93, + "sections": [ + { + "heading": "Figures for the CS3319 Project 2 paper", + "level": 1, + "line": 1 + }, + { + "heading": "Generation", + "level": 2, + "line": 5 + }, + { + "heading": "Status", + "level": 2, + "line": 11 + }, + { + "heading": "Captions, sources and notes", + "level": 2, + "line": 27 + }, + { + "heading": "Figure 1. Task and heterogeneous graph overview", + "level": 3, + "line": 29 + }, + { + "heading": "Figure 2. Dataset sparsity and long-tail degree structure", + "level": 3, + "line": 35 + }, + { + "heading": "Figure 3. Performance evolution roadmap", + "level": 3, + "line": 41 + }, + { + "heading": "Figure 4. Final pipeline architecture", + "level": 3, + "line": 47 + }, + { + "heading": "Figure 5. Ablation of high-order propagation", + "level": 3, + "line": 53 + }, + { + "heading": "Figure 6. Rank-cutoff vs probability-threshold robustness", + "level": 3, + "line": 59 + }, + { + "heading": "Figure 7. Error bucket heatmap", + "level": 3, + "line": 65 + }, + { + "heading": "Appendix Figure A1. LightGCN hyperparameter sweep", + "level": 3, + "line": 71 + }, + { + "heading": "Appendix Figure A2. Random-walk ensemble size vs F1", + "level": 3, + "line": 77 + }, + { + "heading": "Appendix Figure A3. Feature-group contribution", + "level": 3, + "line": 83 + }, + { + "heading": "Appendix Figure A4. OOF discrimination across stages", + "level": 3, + "line": 89 + }, + { + "heading": "Inserting into LaTeX (ACM sigconf)", + "level": 2, + "line": 95 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 16 + } + }, + { + "path": "figures_paper/scripts/fig1_graph_overview.py", + "language": "python", + "fileCategory": "code", + "totalLines": 96, + "nonEmptyLines": 82, + "functions": [ + { + "name": "make", + "startLine": 16, + "endLine": 90, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "make", + "line": 16, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "make", + "callee": "apply", + "lineNumber": 17 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 18 + }, + { + "caller": "make", + "callee": "ax.set_xlim", + "lineNumber": 19 + }, + { + "caller": "make", + "callee": "ax.set_ylim", + "lineNumber": 19 + }, + { + "caller": "make", + "callee": "ax.axis", + "lineNumber": 19 + }, + { + "caller": "lane", + "callee": "ax.add_patch", + "lineNumber": 22 + }, + { + "caller": "lane", + "callee": "FancyBboxPatch", + "lineNumber": 22 + }, + { + "caller": "lane", + "callee": "ax.text", + "lineNumber": 24 + }, + { + "caller": "make", + "callee": "lane", + "lineNumber": 26 + }, + { + "caller": "make", + "callee": "lane", + "lineNumber": 27 + }, + { + "caller": "make", + "callee": "ax.add_patch", + "lineNumber": 32 + }, + { + "caller": "make", + "callee": "Circle", + "lineNumber": 32 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "ax.add_patch", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "Rectangle", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 36 + }, + { + "caller": "edge", + "callee": "ax.add_patch", + "lineNumber": 40 + }, + { + "caller": "edge", + "callee": "FancyArrowPatch", + "lineNumber": 40 + }, + { + "caller": "make", + "callee": "edge", + "lineNumber": 45 + }, + { + "caller": "make", + "callee": "edge", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "edge", + "lineNumber": 47 + }, + { + "caller": "make", + "callee": "edge", + "lineNumber": 48 + }, + { + "caller": "make", + "callee": "edge", + "lineNumber": 50 + }, + { + "caller": "make", + "callee": "edge", + "lineNumber": 51 + }, + { + "caller": "make", + "callee": "edge", + "lineNumber": 53 + }, + { + "caller": "make", + "callee": "edge", + "lineNumber": 54 + }, + { + "caller": "make", + "callee": "edge", + "lineNumber": 58 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 59 + }, + { + "caller": "make", + "callee": "ax.add_patch", + "lineNumber": 62 + }, + { + "caller": "make", + "callee": "FancyBboxPatch", + "lineNumber": 62 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 64 + }, + { + "caller": "make", + "callee": "Line2D", + "lineNumber": 70 + }, + { + "caller": "make", + "callee": "Line2D", + "lineNumber": 71 + }, + { + "caller": "make", + "callee": "Line2D", + "lineNumber": 72 + }, + { + "caller": "make", + "callee": "Line2D", + "lineNumber": 73 + }, + { + "caller": "make", + "callee": "ax.legend", + "lineNumber": 75 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 79 + }, + { + "caller": "make", + "callee": "ax.set_title", + "lineNumber": 82 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 83 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 84 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/fig2_sparsity.py", + "language": "python", + "fileCategory": "code", + "totalLines": 91, + "nonEmptyLines": 77, + "functions": [ + { + "name": "_ccdf", + "startLine": 17, + "endLine": 24, + "params": [ + "deg" + ] + }, + { + "name": "_panel_ccdf", + "startLine": 27, + "endLine": 35, + "params": [ + "ax", + "deg", + "color", + "title" + ] + }, + { + "name": "make", + "startLine": 38, + "endLine": 85, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "_ccdf", + "line": 17, + "isDefault": false + }, + { + "name": "_panel_ccdf", + "line": 27, + "isDefault": false + }, + { + "name": "make", + "line": 38, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "_ccdf", + "callee": "np.sort", + "lineNumber": 18 + }, + { + "caller": "_ccdf", + "callee": "np.unique", + "lineNumber": 19 + }, + { + "caller": "_ccdf", + "callee": "np.cumsum", + "lineNumber": 20 + }, + { + "caller": "_ccdf", + "callee": "len", + "lineNumber": 21 + }, + { + "caller": "_ccdf", + "callee": "np.polyfit", + "lineNumber": 23 + }, + { + "caller": "_ccdf", + "callee": "np.log10", + "lineNumber": 23 + }, + { + "caller": "_ccdf", + "callee": "np.log10", + "lineNumber": 23 + }, + { + "caller": "_panel_ccdf", + "callee": "_ccdf", + "lineNumber": 28 + }, + { + "caller": "_panel_ccdf", + "callee": "ax.loglog", + "lineNumber": 29 + }, + { + "caller": "_panel_ccdf", + "callee": "np.log10", + "lineNumber": 30 + }, + { + "caller": "_panel_ccdf", + "callee": "np.polyfit", + "lineNumber": 31 + }, + { + "caller": "_panel_ccdf", + "callee": "np.log10", + "lineNumber": 31 + }, + { + "caller": "_panel_ccdf", + "callee": "np.linspace", + "lineNumber": 32 + }, + { + "caller": "_panel_ccdf", + "callee": "x.min", + "lineNumber": 32 + }, + { + "caller": "_panel_ccdf", + "callee": "x.max", + "lineNumber": 32 + }, + { + "caller": "_panel_ccdf", + "callee": "ax.loglog", + "lineNumber": 33 + }, + { + "caller": "_panel_ccdf", + "callee": "ax.text", + "lineNumber": 34 + }, + { + "caller": "_panel_ccdf", + "callee": "ax.set_title", + "lineNumber": 35 + }, + { + "caller": "_panel_ccdf", + "callee": "ax.set_xlabel", + "lineNumber": 35 + }, + { + "caller": "_panel_ccdf", + "callee": "ax.set_ylabel", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "apply", + "lineNumber": 39 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 42 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 43 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 44 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "np.bincount", + "lineNumber": 49 + }, + { + "caller": "make", + "callee": "np.concatenate", + "lineNumber": 49 + }, + { + "caller": "make", + "callee": "co[0].to_numpy", + "lineNumber": 49 + }, + { + "caller": "make", + "callee": "co[1].to_numpy", + "lineNumber": 49 + }, + { + "caller": "make", + "callee": "np.bincount", + "lineNumber": 50 + }, + { + "caller": "make", + "callee": "cite[1].to_numpy", + "lineNumber": 50 + }, + { + "caller": "make", + "callee": "np.bincount", + "lineNumber": 51 + }, + { + "caller": "make", + "callee": "read[1].to_numpy", + "lineNumber": 51 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 53 + }, + { + "caller": "make", + "callee": "_panel_ccdf", + "lineNumber": 54 + }, + { + "caller": "make", + "callee": "_panel_ccdf", + "lineNumber": 55 + }, + { + "caller": "make", + "callee": "_panel_ccdf", + "lineNumber": 56 + }, + { + "caller": "make", + "callee": "np.arange", + "lineNumber": 63 + }, + { + "caller": "make", + "callee": "np.array", + "lineNumber": 64 + }, + { + "caller": "make", + "callee": "(v == k).mean", + "lineNumber": 64 + }, + { + "caller": "make", + "callee": "ax.bar", + "lineNumber": 65 + }, + { + "caller": "make", + "callee": "ax.set_title", + "lineNumber": 67 + }, + { + "caller": "make", + "callee": "ax.set_xlabel", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "ax.set_ylabel", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "ax.set_xticks", + "lineNumber": 69 + }, + { + "caller": "make", + "callee": "range", + "lineNumber": 69 + }, + { + "caller": "make", + "callee": "ax.legend", + "lineNumber": 69 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 70 + }, + { + "caller": "make", + "callee": "fig.suptitle", + "lineNumber": 74 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 75 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 76 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 78 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 78 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 79 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 3, + "functionCount": 3, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/fig3_roadmap.py", + "language": "python", + "fileCategory": "code", + "totalLines": 90, + "nonEmptyLines": 76, + "functions": [ + { + "name": "make", + "startLine": 27, + "endLine": 84, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "make", + "line": 27, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "make", + "callee": "apply", + "lineNumber": 28 + }, + { + "caller": "make", + "callee": "np.array", + "lineNumber": 31 + }, + { + "caller": "make", + "callee": "np.array", + "lineNumber": 32 + }, + { + "caller": "make", + "callee": "np.arange", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "len", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "ax.axvspan", + "lineNumber": 41 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 42 + }, + { + "caller": "make", + "callee": "ax.plot", + "lineNumber": 44 + }, + { + "caller": "make", + "callee": "ax.plot", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "zip", + "lineNumber": 50 + }, + { + "caller": "make", + "callee": "ax.annotate", + "lineNumber": 51 + }, + { + "caller": "make", + "callee": "ax.add_patch", + "lineNumber": 58 + }, + { + "caller": "make", + "callee": "FancyArrowPatch", + "lineNumber": 58 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 59 + }, + { + "caller": "make", + "callee": "ax.plot", + "lineNumber": 62 + }, + { + "caller": "make", + "callee": "ax.annotate", + "lineNumber": 63 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 66 + }, + { + "caller": "make", + "callee": "ax.set_xticks", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "ax.set_xticklabels", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "ax.set_ylabel", + "lineNumber": 69 + }, + { + "caller": "make", + "callee": "ax.set_ylim", + "lineNumber": 69 + }, + { + "caller": "make", + "callee": "ax.legend", + "lineNumber": 70 + }, + { + "caller": "make", + "callee": "ax.set_title", + "lineNumber": 71 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 72 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 73 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/fig4_architecture.py", + "language": "python", + "fileCategory": "code", + "totalLines": 87, + "nonEmptyLines": 72, + "functions": [ + { + "name": "_box", + "startLine": 16, + "endLine": 20, + "params": [ + "ax", + "x", + "y", + "w", + "h", + "text", + "color", + "fs", + "fc_alpha", + "weight" + ] + }, + { + "name": "_arrow", + "startLine": 23, + "endLine": 24, + "params": [ + "ax", + "a", + "b", + "color", + "lw" + ] + }, + { + "name": "make", + "startLine": 27, + "endLine": 81, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "_box", + "line": 16, + "isDefault": false + }, + { + "name": "_arrow", + "line": 23, + "isDefault": false + }, + { + "name": "make", + "line": 27, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "_box", + "callee": "ax.add_patch", + "lineNumber": 17 + }, + { + "caller": "_box", + "callee": "FancyBboxPatch", + "lineNumber": 17 + }, + { + "caller": "_box", + "callee": "ax.text", + "lineNumber": 19 + }, + { + "caller": "_arrow", + "callee": "ax.add_patch", + "lineNumber": 24 + }, + { + "caller": "_arrow", + "callee": "FancyArrowPatch", + "lineNumber": 24 + }, + { + "caller": "make", + "callee": "apply", + "lineNumber": 28 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 29 + }, + { + "caller": "make", + "callee": "ax.set_xlim", + "lineNumber": 30 + }, + { + "caller": "make", + "callee": "ax.set_ylim", + "lineNumber": 30 + }, + { + "caller": "make", + "callee": "ax.axis", + "lineNumber": 30 + }, + { + "caller": "make", + "callee": "_box", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "_box", + "lineNumber": 44 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 45 + }, + { + "caller": "make", + "callee": "_arrow", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "ax.add_patch", + "lineNumber": 49 + }, + { + "caller": "make", + "callee": "FancyBboxPatch", + "lineNumber": 49 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 52 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 53 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 54 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 55 + }, + { + "caller": "make", + "callee": "_arrow", + "lineNumber": 58 + }, + { + "caller": "make", + "callee": "_arrow", + "lineNumber": 61 + }, + { + "caller": "make", + "callee": "_box", + "lineNumber": 62 + }, + { + "caller": "make", + "callee": "_arrow", + "lineNumber": 63 + }, + { + "caller": "make", + "callee": "_box", + "lineNumber": 64 + }, + { + "caller": "make", + "callee": "_arrow", + "lineNumber": 65 + }, + { + "caller": "make", + "callee": "_box", + "lineNumber": 66 + }, + { + "caller": "make", + "callee": "ax.set_title", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 69 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 70 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 3, + "functionCount": 3, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/fig5_ablation_highorder.py", + "language": "python", + "fileCategory": "code", + "totalLines": 96, + "nonEmptyLines": 85, + "functions": [ + { + "name": "make", + "startLine": 31, + "endLine": 90, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "make", + "line": 31, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "make", + "callee": "apply", + "lineNumber": 32 + }, + { + "caller": "make", + "callee": "csv.exists", + "lineNumber": 34 + }, + { + "caller": "make", + "callee": "pd.read_csv(csv).set_index", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 37 + }, + { + "caller": "make", + "callee": "FALLBACK.set_index", + "lineNumber": 39 + }, + { + "caller": "make", + "callee": "df.validation_f1.to_numpy", + "lineNumber": 44 + }, + { + "caller": "make", + "callee": "df.auc.to_numpy", + "lineNumber": 45 + }, + { + "caller": "make", + "callee": "df.n_features.to_numpy", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "f1.min", + "lineNumber": 47 + }, + { + "caller": "make", + "callee": "f1.max", + "lineNumber": 47 + }, + { + "caller": "make", + "callee": "f1.min", + "lineNumber": 47 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 49 + }, + { + "caller": "make", + "callee": "np.arange", + "lineNumber": 50 + }, + { + "caller": "make", + "callee": "len", + "lineNumber": 50 + }, + { + "caller": "make", + "callee": "ax.bar", + "lineNumber": 52 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 53 + }, + { + "caller": "make", + "callee": "range", + "lineNumber": 55 + }, + { + "caller": "make", + "callee": "len", + "lineNumber": 55 + }, + { + "caller": "make", + "callee": "len", + "lineNumber": 56 + }, + { + "caller": "make", + "callee": "ax.bar", + "lineNumber": 57 + }, + { + "caller": "make", + "callee": "ax.plot", + "lineNumber": 59 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 61 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 63 + }, + { + "caller": "make", + "callee": "ax.set_xticks", + "lineNumber": 65 + }, + { + "caller": "make", + "callee": "ax.set_xticklabels", + "lineNumber": 66 + }, + { + "caller": "make", + "callee": "ax.set_ylabel", + "lineNumber": 67 + }, + { + "caller": "make", + "callee": "ax.set_ylim", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "f1.max", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "ax.twinx", + "lineNumber": 71 + }, + { + "caller": "make", + "callee": "ax2.plot", + "lineNumber": 72 + }, + { + "caller": "make", + "callee": "ax2.set_ylabel", + "lineNumber": 73 + }, + { + "caller": "make", + "callee": "ax2.set_ylim", + "lineNumber": 74 + }, + { + "caller": "make", + "callee": "auc.min", + "lineNumber": 74 + }, + { + "caller": "make", + "callee": "auc.max", + "lineNumber": 74 + }, + { + "caller": "make", + "callee": "ax2.tick_params", + "lineNumber": 75 + }, + { + "caller": "make", + "callee": "ax2.grid", + "lineNumber": 76 + }, + { + "caller": "make", + "callee": "zip", + "lineNumber": 77 + }, + { + "caller": "make", + "callee": "ax2.text", + "lineNumber": 78 + }, + { + "caller": "make", + "callee": "ax.set_title", + "lineNumber": 80 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 81 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 82 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/fig6_rank_vs_threshold.py", + "language": "python", + "fileCategory": "code", + "totalLines": 88, + "nonEmptyLines": 77, + "functions": [ + { + "name": "make", + "startLine": 21, + "endLine": 82, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "make", + "line": 21, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "make", + "callee": "apply", + "lineNumber": 22 + }, + { + "caller": "make", + "callee": "pd.read_csv(ratio_csv).sort_values", + "lineNumber": 26 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 26 + }, + { + "caller": "make", + "callee": "ratio_csv.exists", + "lineNumber": 26 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 27 + }, + { + "caller": "make", + "callee": "thr_csv.exists", + "lineNumber": 27 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 29 + }, + { + "caller": "make", + "callee": "p.exists", + "lineNumber": 29 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "axL.plot", + "lineNumber": 37 + }, + { + "caller": "make", + "callee": "axL.fill_between", + "lineNumber": 38 + }, + { + "caller": "make", + "callee": "axL.axvline", + "lineNumber": 39 + }, + { + "caller": "make", + "callee": "axL.plot", + "lineNumber": 40 + }, + { + "caller": "make", + "callee": "(ratio.ratio - 0.5).abs().argmin", + "lineNumber": 40 + }, + { + "caller": "make", + "callee": "(ratio.ratio - 0.5).abs", + "lineNumber": 40 + }, + { + "caller": "make", + "callee": "axL.axvline", + "lineNumber": 42 + }, + { + "caller": "make", + "callee": "axL.plot", + "lineNumber": 43 + }, + { + "caller": "make", + "callee": "np.interp", + "lineNumber": 44 + }, + { + "caller": "make", + "callee": "axL.set_xlabel", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "axL.set_ylabel", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "axL.set_title", + "lineNumber": 47 + }, + { + "caller": "make", + "callee": "axL.legend", + "lineNumber": 48 + }, + { + "caller": "make", + "callee": "np.arange", + "lineNumber": 54 + }, + { + "caller": "make", + "callee": "axR.bar", + "lineNumber": 55 + }, + { + "caller": "make", + "callee": "axR.bar", + "lineNumber": 56 + }, + { + "caller": "make", + "callee": "zip", + "lineNumber": 57 + }, + { + "caller": "make", + "callee": "axR.text", + "lineNumber": 58 + }, + { + "caller": "make", + "callee": "axR.text", + "lineNumber": 59 + }, + { + "caller": "make", + "callee": "abs", + "lineNumber": 60 + }, + { + "caller": "make", + "callee": "axR.set_xticks", + "lineNumber": 61 + }, + { + "caller": "make", + "callee": "axR.set_xticklabels", + "lineNumber": 61 + }, + { + "caller": "make", + "callee": "axR.set_ylabel", + "lineNumber": 62 + }, + { + "caller": "make", + "callee": "axR.set_ylim", + "lineNumber": 62 + }, + { + "caller": "make", + "callee": "axR.set_title", + "lineNumber": 63 + }, + { + "caller": "make", + "callee": "axR.legend", + "lineNumber": 64 + }, + { + "caller": "make", + "callee": "axR.text", + "lineNumber": 66 + }, + { + "caller": "make", + "callee": "thr.threshold.min", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "thr.threshold.max", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "fig.suptitle", + "lineNumber": 71 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 73 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 74 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/fig7_error_heatmap.py", + "language": "python", + "fileCategory": "code", + "totalLines": 92, + "nonEmptyLines": 80, + "functions": [ + { + "name": "_bucket_order_key", + "startLine": 27, + "endLine": 37, + "params": [ + "b" + ] + }, + { + "name": "make", + "startLine": 40, + "endLine": 86, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "_bucket_order_key", + "line": 27, + "isDefault": false + }, + { + "name": "make", + "line": 40, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "_bucket_order_key", + "callee": "re.findall", + "lineNumber": 30 + }, + { + "caller": "_bucket_order_key", + "callee": "v.endswith", + "lineNumber": 33 + }, + { + "caller": "_bucket_order_key", + "callee": "vals.append", + "lineNumber": 34 + }, + { + "caller": "_bucket_order_key", + "callee": "v.startswith", + "lineNumber": 34 + }, + { + "caller": "_bucket_order_key", + "callee": "vals.append", + "lineNumber": 36 + }, + { + "caller": "_bucket_order_key", + "callee": "float", + "lineNumber": 36 + }, + { + "caller": "make", + "callee": "apply", + "lineNumber": 41 + }, + { + "caller": "make", + "callee": "csv.exists", + "lineNumber": 43 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 44 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 44 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "df[df.bucket_type == bt].copy", + "lineNumber": 50 + }, + { + "caller": "make", + "callee": "sub.bucket.apply", + "lineNumber": 51 + }, + { + "caller": "make", + "callee": "sub.sort_values", + "lineNumber": 52 + }, + { + "caller": "make", + "callee": "sub.iterrows", + "lineNumber": 53 + }, + { + "caller": "make", + "callee": "r.bucket.replace(bt, \"\").strip", + "lineNumber": 54 + }, + { + "caller": "make", + "callee": "r.bucket.replace", + "lineNumber": 54 + }, + { + "caller": "make", + "callee": "rows.append", + "lineNumber": 55 + }, + { + "caller": "make", + "callee": "rowlabels.append", + "lineNumber": 56 + }, + { + "caller": "make", + "callee": "rowcolors.append", + "lineNumber": 57 + }, + { + "caller": "make", + "callee": "weak.append", + "lineNumber": 58 + }, + { + "caller": "make", + "callee": "np.array", + "lineNumber": 59 + }, + { + "caller": "make", + "callee": "sns.color_palette", + "lineNumber": 61 + }, + { + "caller": "make", + "callee": "enumerate", + "lineNumber": 61 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 63 + }, + { + "caller": "make", + "callee": "sns.heatmap", + "lineNumber": 64 + }, + { + "caller": "make", + "callee": "ax.set_xticklabels", + "lineNumber": 67 + }, + { + "caller": "make", + "callee": "ax.get_xticklabels", + "lineNumber": 67 + }, + { + "caller": "make", + "callee": "ax.set_yticklabels", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "ax.get_yticklabels", + "lineNumber": 68 + }, + { + "caller": "make", + "callee": "zip", + "lineNumber": 70 + }, + { + "caller": "make", + "callee": "ax.get_yticklabels", + "lineNumber": 70 + }, + { + "caller": "make", + "callee": "tick.set_color", + "lineNumber": 71 + }, + { + "caller": "make", + "callee": "enumerate", + "lineNumber": 73 + }, + { + "caller": "make", + "callee": "ax.add_patch", + "lineNumber": 75 + }, + { + "caller": "make", + "callee": "plt.Rectangle", + "lineNumber": 75 + }, + { + "caller": "make", + "callee": "ax.set_title", + "lineNumber": 76 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 77 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 78 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 79 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 2, + "functionCount": 2, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/figA1_hyperparam.py", + "language": "python", + "fileCategory": "code", + "totalLines": 51, + "nonEmptyLines": 43, + "functions": [ + { + "name": "make", + "startLine": 14, + "endLine": 45, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "make", + "line": 14, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "make", + "callee": "apply", + "lineNumber": 15 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 17 + }, + { + "caller": "make", + "callee": "df[df.split == \"dynamic_seed202\"].copy", + "lineNumber": 18 + }, + { + "caller": "parse", + "callee": "re.search", + "lineNumber": 21 + }, + { + "caller": "parse", + "callee": "pd.Series", + "lineNumber": 22 + }, + { + "caller": "parse", + "callee": "int", + "lineNumber": 22 + }, + { + "caller": "parse", + "callee": "m.group", + "lineNumber": 22 + }, + { + "caller": "parse", + "callee": "int", + "lineNumber": 22 + }, + { + "caller": "parse", + "callee": "m.group", + "lineNumber": 22 + }, + { + "caller": "make", + "callee": "df.run.apply", + "lineNumber": 24 + }, + { + "caller": "make", + "callee": "df.dropna", + "lineNumber": 25 + }, + { + "caller": "make", + "callee": "df.groupby([\"dim\", \"layers\"]).f1.max().unstack", + "lineNumber": 26 + }, + { + "caller": "make", + "callee": "df.groupby([\"dim\", \"layers\"]).f1.max", + "lineNumber": 26 + }, + { + "caller": "make", + "callee": "df.groupby", + "lineNumber": 26 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 28 + }, + { + "caller": "make", + "callee": "sns.heatmap", + "lineNumber": 29 + }, + { + "caller": "make", + "callee": "list(piv.columns).index", + "lineNumber": 32 + }, + { + "caller": "make", + "callee": "list", + "lineNumber": 32 + }, + { + "caller": "make", + "callee": "list(piv.index).index", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "list", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "ax.add_patch", + "lineNumber": 34 + }, + { + "caller": "make", + "callee": "plt.Rectangle", + "lineNumber": 34 + }, + { + "caller": "make", + "callee": "ax.set_xlabel", + "lineNumber": 37 + }, + { + "caller": "make", + "callee": "ax.set_ylabel", + "lineNumber": 37 + }, + { + "caller": "make", + "callee": "ax.set_title", + "lineNumber": 38 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 39 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 40 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 41 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/figA2_rw_ablation.py", + "language": "python", + "fileCategory": "code", + "totalLines": 44, + "nonEmptyLines": 38, + "functions": [ + { + "name": "make", + "startLine": 11, + "endLine": 38, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "make", + "line": 11, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "make", + "callee": "apply", + "lineNumber": 12 + }, + { + "caller": "make", + "callee": "pd.read_csv(RW / \"small_ablation_table.csv\").validation_F1.max", + "lineNumber": 15 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 15 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 16 + }, + { + "caller": "make", + "callee": "pd.read_csv", + "lineNumber": 17 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 20 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 20 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 24 + }, + { + "caller": "make", + "callee": "ax.plot", + "lineNumber": 25 + }, + { + "caller": "make", + "callee": "zip", + "lineNumber": 26 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 27 + }, + { + "caller": "make", + "callee": "ax.set_xlabel", + "lineNumber": 28 + }, + { + "caller": "make", + "callee": "ax.set_ylabel", + "lineNumber": 28 + }, + { + "caller": "make", + "callee": "ax.set_xticks", + "lineNumber": 29 + }, + { + "caller": "make", + "callee": "ax.set_ylim", + "lineNumber": 30 + }, + { + "caller": "make", + "callee": "min", + "lineNumber": 30 + }, + { + "caller": "make", + "callee": "max", + "lineNumber": 30 + }, + { + "caller": "make", + "callee": "ax.set_title", + "lineNumber": 31 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 32 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 34 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/figA3_feature_importance.py", + "language": "python", + "fileCategory": "code", + "totalLines": 50, + "nonEmptyLines": 43, + "functions": [ + { + "name": "make", + "startLine": 25, + "endLine": 44, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "make", + "line": 25, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "make", + "callee": "apply", + "lineNumber": 26 + }, + { + "caller": "make", + "callee": "sum", + "lineNumber": 28 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 29 + }, + { + "caller": "make", + "callee": "ax.barh", + "lineNumber": 30 + }, + { + "caller": "make", + "callee": "range", + "lineNumber": 30 + }, + { + "caller": "make", + "callee": "len", + "lineNumber": 30 + }, + { + "caller": "make", + "callee": "ax.set_yticks", + "lineNumber": 31 + }, + { + "caller": "make", + "callee": "range", + "lineNumber": 31 + }, + { + "caller": "make", + "callee": "len", + "lineNumber": 31 + }, + { + "caller": "make", + "callee": "ax.set_yticklabels", + "lineNumber": 31 + }, + { + "caller": "make", + "callee": "ax.invert_yaxis", + "lineNumber": 32 + }, + { + "caller": "make", + "callee": "enumerate", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "ax.text", + "lineNumber": 34 + }, + { + "caller": "make", + "callee": "ax.set_xlabel", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "ax.set_xlim", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "ax.set_title", + "lineNumber": 36 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 37 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 38 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/figA4_oof_pr.py", + "language": "python", + "fileCategory": "code", + "totalLines": 61, + "nonEmptyLines": 54, + "functions": [ + { + "name": "make", + "startLine": 19, + "endLine": 55, + "params": [ + "root", + "out" + ] + } + ], + "exports": [ + { + "name": "make", + "line": 19, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "make", + "callee": "apply", + "lineNumber": 20 + }, + { + "caller": "make", + "callee": "ypath.exists", + "lineNumber": 23 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 24 + }, + { + "caller": "make", + "callee": "np.load(ypath).astype", + "lineNumber": 27 + }, + { + "caller": "make", + "callee": "np.load", + "lineNumber": 27 + }, + { + "caller": "make", + "callee": "plt.subplots", + "lineNumber": 29 + }, + { + "caller": "make", + "callee": "p.exists", + "lineNumber": 33 + }, + { + "caller": "make", + "callee": "np.load(p).astype", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "np.load", + "lineNumber": 35 + }, + { + "caller": "make", + "callee": "loaded.append", + "lineNumber": 36 + }, + { + "caller": "make", + "callee": "precision_recall_curve", + "lineNumber": 37 + }, + { + "caller": "make", + "callee": "average_precision_score", + "lineNumber": 38 + }, + { + "caller": "make", + "callee": "ax1.plot", + "lineNumber": 39 + }, + { + "caller": "make", + "callee": "ax2.hist", + "lineNumber": 40 + }, + { + "caller": "make", + "callee": "ax1.set_xlabel", + "lineNumber": 41 + }, + { + "caller": "make", + "callee": "ax1.set_ylabel", + "lineNumber": 41 + }, + { + "caller": "make", + "callee": "ax1.set_ylim", + "lineNumber": 41 + }, + { + "caller": "make", + "callee": "ax1.set_title", + "lineNumber": 42 + }, + { + "caller": "make", + "callee": "ax1.legend", + "lineNumber": 43 + }, + { + "caller": "make", + "callee": "ax2.set_xlabel", + "lineNumber": 44 + }, + { + "caller": "make", + "callee": "ax2.set_ylabel", + "lineNumber": 44 + }, + { + "caller": "make", + "callee": "ax2.set_title", + "lineNumber": 45 + }, + { + "caller": "make", + "callee": "fig.suptitle", + "lineNumber": 46 + }, + { + "caller": "make", + "callee": "len", + "lineNumber": 47 + }, + { + "caller": "make", + "callee": "len", + "lineNumber": 47 + }, + { + "caller": "make", + "callee": "save", + "lineNumber": 48 + }, + { + "caller": "make", + "callee": "dict", + "lineNumber": 49 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 50 + }, + { + "caller": "make", + "callee": "str", + "lineNumber": 50 + }, + { + "caller": "make", + "callee": "(VR / m[1]).exists", + "lineNumber": 50 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 1, + "functionCount": 1, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/make_all_figures.py", + "language": "python", + "fileCategory": "code", + "totalLines": 119, + "nonEmptyLines": 104, + "functions": [ + { + "name": "_load", + "startLine": 38, + "endLine": 42, + "params": [ + "fname", + "scripts" + ] + }, + { + "name": "main", + "startLine": 45, + "endLine": 69, + "params": [] + }, + { + "name": "_write_readme", + "startLine": 72, + "endLine": 113, + "params": [ + "root", + "results" + ] + } + ], + "exports": [ + { + "name": "_load", + "line": 38, + "isDefault": false + }, + { + "name": "main", + "line": 45, + "isDefault": false + }, + { + "name": "_write_readme", + "line": 72, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "_load", + "callee": "importlib.util.spec_from_file_location", + "lineNumber": 39 + }, + { + "caller": "_load", + "callee": "importlib.util.module_from_spec", + "lineNumber": 40 + }, + { + "caller": "_load", + "callee": "spec.loader.exec_module", + "lineNumber": 41 + }, + { + "caller": "main", + "callee": "argparse.ArgumentParser", + "lineNumber": 46 + }, + { + "caller": "main", + "callee": "ap.add_argument", + "lineNumber": 47 + }, + { + "caller": "main", + "callee": "ap.parse_args", + "lineNumber": 48 + }, + { + "caller": "main", + "callee": "Path(args.package_root).resolve", + "lineNumber": 49 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 49 + }, + { + "caller": "main", + "callee": "Path(__file__).resolve", + "lineNumber": 50 + }, + { + "caller": "main", + "callee": "Path", + "lineNumber": 50 + }, + { + "caller": "main", + "callee": "style.ensure_dirs", + "lineNumber": 51 + }, + { + "caller": "main", + "callee": "_load", + "lineNumber": 56 + }, + { + "caller": "main", + "callee": "mod.make", + "lineNumber": 57 + }, + { + "caller": "main", + "callee": "dict", + "lineNumber": 59 + }, + { + "caller": "main", + "callee": "type", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "traceback.format_exc", + "lineNumber": 60 + }, + { + "caller": "main", + "callee": "results.append", + "lineNumber": 62 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 63 + }, + { + "caller": "main", + "callee": "res.get", + "lineNumber": 63 + }, + { + "caller": "main", + "callee": "_write_readme", + "lineNumber": 65 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 66 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 68 + }, + { + "caller": "main", + "callee": "r.get", + "lineNumber": 68 + }, + { + "caller": "main", + "callee": "', '.join", + "lineNumber": 68 + }, + { + "caller": "main", + "callee": "r.get", + "lineNumber": 68 + }, + { + "caller": "main", + "callee": "print", + "lineNumber": 69 + }, + { + "caller": "_write_readme", + "callee": "r.get", + "lineNumber": 84 + }, + { + "caller": "_write_readme", + "callee": "\", \".join", + "lineNumber": 85 + }, + { + "caller": "_write_readme", + "callee": "r.get", + "lineNumber": 85 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 86 + }, + { + "caller": "_write_readme", + "callee": "r.get", + "lineNumber": 86 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 87 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 89 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 90 + }, + { + "caller": "_write_readme", + "callee": "r.get", + "lineNumber": 90 + }, + { + "caller": "_write_readme", + "callee": "r.get", + "lineNumber": 91 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 92 + }, + { + "caller": "_write_readme", + "callee": "\"; \".join", + "lineNumber": 92 + }, + { + "caller": "_write_readme", + "callee": "r.get", + "lineNumber": 93 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 94 + }, + { + "caller": "_write_readme", + "callee": "\", \".join", + "lineNumber": 94 + }, + { + "caller": "_write_readme", + "callee": "r.get(\"caption\", \"\").strip", + "lineNumber": 96 + }, + { + "caller": "_write_readme", + "callee": "r.get", + "lineNumber": 96 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 98 + }, + { + "caller": "_write_readme", + "callee": "r.get", + "lineNumber": 99 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 100 + }, + { + "caller": "_write_readme", + "callee": "r.get", + "lineNumber": 101 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 102 + }, + { + "caller": "_write_readme", + "callee": "lines.append", + "lineNumber": 103 + }, + { + "caller": "_write_readme", + "callee": "(root / \"figures_paper\" / \"README_figures.md\").write_text", + "lineNumber": 113 + }, + { + "caller": "_write_readme", + "callee": "\"\\n\".join", + "lineNumber": 113 + } + ], + "metrics": { + "importCount": 1, + "exportCount": 3, + "functionCount": 3, + "classCount": 0 + } + }, + { + "path": "figures_paper/scripts/style.py", + "language": "python", + "fileCategory": "code", + "totalLines": 67, + "nonEmptyLines": 56, + "functions": [ + { + "name": "apply", + "startLine": 20, + "endLine": 45, + "params": [] + }, + { + "name": "ensure_dirs", + "startLine": 48, + "endLine": 55, + "params": [ + "root" + ] + }, + { + "name": "save", + "startLine": 58, + "endLine": 63, + "params": [ + "fig", + "name", + "out" + ] + }, + { + "name": "stat_box", + "startLine": 66, + "endLine": 67, + "params": [ + "ax", + "x", + "y", + "s", + "fs" + ] + } + ], + "exports": [ + { + "name": "apply", + "line": 20, + "isDefault": false + }, + { + "name": "ensure_dirs", + "line": 48, + "isDefault": false + }, + { + "name": "save", + "line": 58, + "isDefault": false + }, + { + "name": "stat_box", + "line": 66, + "isDefault": false + } + ], + "callGraph": [ + { + "caller": "apply", + "callee": "sns.set_theme", + "lineNumber": 21 + }, + { + "caller": "apply", + "callee": "mpl.rcParams.update", + "lineNumber": 22 + }, + { + "caller": "ensure_dirs", + "callee": "Path", + "lineNumber": 49 + }, + { + "caller": "ensure_dirs", + "callee": "d.mkdir", + "lineNumber": 53 + }, + { + "caller": "save", + "callee": "fig.savefig", + "lineNumber": 60 + }, + { + "caller": "save", + "callee": "fig.savefig", + "lineNumber": 61 + }, + { + "caller": "save", + "callee": "fig.savefig", + "lineNumber": 62 + }, + { + "caller": "save", + "callee": "plt.close", + "lineNumber": 63 + }, + { + "caller": "stat_box", + "callee": "ax.text", + "lineNumber": 67 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 4, + "functionCount": 4, + "classCount": 0 + } + }, + { + "path": "notes/experiment_history.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 319, + "nonEmptyLines": 221, + "sections": [ + { + "heading": "Experiment History", + "level": 1, + "line": 1 + }, + { + "heading": "1. Official Notebook Baseline", + "level": 2, + "line": 5 + }, + { + "heading": "2. Improved Heterogeneous GNN", + "level": 2, + "line": 30 + }, + { + "heading": "3. SAGEConv + BPR Ranking", + "level": 2, + "line": 58 + }, + { + "heading": "4. Vanilla LightGCN Main Line", + "level": 2, + "line": 83 + }, + { + "heading": "5. Confirmed 6-Model LightGCN Ensemble", + "level": 2, + "line": 126 + }, + { + "heading": "6. L2-Normalized LightGCN Variant", + "level": 2, + "line": 166 + }, + { + "heading": "7. LightGBM Structural Feature Model", + "level": 2, + "line": 184 + }, + { + "heading": "8. BPR/MF-Style Baseline", + "level": 2, + "line": 219 + }, + { + "heading": "9. GNN Architecture Search", + "level": 2, + "line": 240 + }, + { + "heading": "10. Later Threshold and Force/No-Force Experiments", + "level": 2, + "line": 273 + }, + { + "heading": "Practical Recommendation", + "level": 2, + "line": 302 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 12 + } + }, + { + "path": "README.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 253, + "nonEmptyLines": 194, + "sections": [ + { + "heading": "CS3319 Project 2 Final Deliverable", + "level": 1, + "line": 1 + }, + { + "heading": "Best Confirmed Result", + "level": 2, + "line": 7 + }, + { + "heading": "What Is Included", + "level": 2, + "line": 20 + }, + { + "heading": "Main Stages Preserved", + "level": 2, + "line": 38 + }, + { + "heading": "Core Scripts", + "level": 2, + "line": 48 + }, + { + "heading": "Final Method Summary", + "level": 2, + "line": 64 + }, + { + "heading": "Environment", + "level": 2, + "line": 93 + }, + { + "heading": "Quick Verification", + "level": 2, + "line": 118 + }, + { + "heading": "Command Reproduction", + "level": 2, + "line": 147 + }, + { + "heading": "Reports", + "level": 2, + "line": 244 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 10 + } + }, + { + "path": "reports/exploration_summary.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 861, + "nonEmptyLines": 618, + "sections": [ + { + "heading": "CS3319 Recommendation Exploration Summary", + "level": 1, + "line": 1 + }, + { + "heading": "1. 目标与验证协议", + "level": 2, + "line": 5 + }, + { + "heading": "2. LightGCN 主线", + "level": 2, + "line": 22 + }, + { + "heading": "3. 失败或收益有限的方向", + "level": 2, + "line": 52 + }, + { + "heading": "4. 有效突破:Hybrid Stacking / Rank Calibration", + "level": 2, + "line": 71 + }, + { + "heading": "4.1 输入特征", + "level": 3, + "line": 79 + }, + { + "heading": "4.2 OOF 训练方式", + "level": 3, + "line": 99 + }, + { + "heading": "4.3 动态 split 结果", + "level": 3, + "line": 108 + }, + { + "heading": "5. Test 正例比例校准", + "level": 2, + "line": 119 + }, + { + "heading": "6. 已生成文件", + "level": 2, + "line": 166 + }, + { + "heading": "7. 当前结论", + "level": 2, + "line": 205 + }, + { + "heading": "8. Post-0.95 incremental ablation", + "level": 2, + "line": 219 + }, + { + "heading": "9. Post-0.95 submission generation", + "level": 2, + "line": 257 + }, + { + "heading": "10. XGBoost second-stage trial", + "level": 2, + "line": 317 + }, + { + "heading": "11. Extra non-LightGCN score sources", + "level": 2, + "line": 349 + }, + { + "heading": "12. Rich feature.pkl content features", + "level": 2, + "line": 418 + }, + { + "heading": "13. Threshold refinement around current best", + "level": 2, + "line": 470 + }, + { + "heading": "14. DeepWalk / Node2Vec score sources", + "level": 2, + "line": 516 + }, + { + "heading": "15. Random-walk systematic ablation", + "level": 2, + "line": 590 + }, + { + "heading": "16. Public feedback after larger random-walk ensembles", + "level": 2, + "line": 651 + }, + { + "heading": "17. High-order citation propagation breakthrough", + "level": 2, + "line": 679 + }, + { + "heading": "17.1 方法动机", + "level": 3, + "line": 690 + }, + { + "heading": "17.2 数学形式", + "level": 3, + "line": 714 + }, + { + "heading": "17.3 Validation 和 public 结果", + "level": 3, + "line": 766 + }, + { + "heading": "18. Validation threshold vs test rank cutoff", + "level": 2, + "line": 797 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 25 + } + }, + { + "path": "reports/final_report.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 202, + "nonEmptyLines": 141, + "sections": [ + { + "heading": "Final Report: Citation-Aware High-Order Graph Recommendation", + "level": 1, + "line": 1 + }, + { + "heading": "Abstract", + "level": 2, + "line": 3 + }, + { + "heading": "Data", + "level": 2, + "line": 12 + }, + { + "heading": "Baseline And Early Models", + "level": 2, + "line": 25 + }, + { + "heading": "First Major Breakthrough: Feature Stacking", + "level": 2, + "line": 46 + }, + { + "heading": "Second Major Breakthrough: DeepWalk / Node2Vec", + "level": 2, + "line": 62 + }, + { + "heading": "Third Major Breakthrough: High-Order Citation Propagation", + "level": 2, + "line": 77 + }, + { + "heading": "Validation Results", + "level": 3, + "line": 121 + }, + { + "heading": "Threshold Calibration Observation", + "level": 2, + "line": 136 + }, + { + "heading": "Final Files", + "level": 2, + "line": 165 + }, + { + "heading": "Conclusion", + "level": 2, + "line": 191 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 11 + } + }, + { + "path": "reports/paper_writing_guide.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 321, + "nonEmptyLines": 261, + "sections": [ + { + "heading": "CS3319 论文写作辅助文档(Paper Writing Guide)", + "level": 1, + "line": 1 + }, + { + "heading": "0. 一页速览(TL;DR)", + "level": 2, + "line": 7 + }, + { + "heading": "1. 论文定位与核心卖点", + "level": 2, + "line": 20 + }, + { + "heading": "1.1 定位", + "level": 3, + "line": 22 + }, + { + "heading": "1.2 三个核心卖点(每个都要在论文里给证据)", + "level": 3, + "line": 27 + }, + { + "heading": "1.3 一句话主旨(可放 Introduction 末尾)", + "level": 3, + "line": 35 + }, + { + "heading": "2. 建议的论文结构与逐章写作指南", + "level": 2, + "line": 40 + }, + { + "heading": "Abstract(模板,中英可填)", + "level": 3, + "line": 42 + }, + { + "heading": "1 Introduction", + "level": 3, + "line": 45 + }, + { + "heading": "2 Related Work", + "level": 3, + "line": 56 + }, + { + "heading": "3 Problem Formulation & Dataset", + "level": 3, + "line": 63 + }, + { + "heading": "4 Method(论文核心章)", + "level": 3, + "line": 70 + }, + { + "heading": "5 Experiments", + "level": 3, + "line": 96 + }, + { + "heading": "6 Analysis & Discussion", + "level": 3, + "line": 103 + }, + { + "heading": "7 Conclusion", + "level": 3, + "line": 109 + }, + { + "heading": "3. 核心数据表格(可直接复制进论文)", + "level": 2, + "line": 114 + }, + { + "heading": "3.1 Table 1 — Dataset Statistics", + "level": 3, + "line": 116 + }, + { + "heading": "3.2 Table 2 — Performance Progression(主角表 ★)", + "level": 3, + "line": 137 + }, + { + "heading": "3.3 Table 3 — Feature-Group Ablation(同 split,逐步增益)", + "level": 3, + "line": 154 + }, + { + "heading": "3.4 Table 4 — High-Order Propagation Ablation(创新点消融 ★)", + "level": 3, + "line": 166 + }, + { + "heading": "3.5 Table 5 — Error Analysis by Group(支撑 Discussion)", + "level": 3, + "line": 174 + }, + { + "heading": "3.6 Table 6 — Decision Rule Robustness(支撑 rank-cutoff 论点)", + "level": 3, + "line": 184 + }, + { + "heading": "3.7 LightGCN 架构敏感性(支撑 5.4)", + "level": 3, + "line": 193 + }, + { + "heading": "4. 方法描述素材(可直接改写进 Method 章)", + "level": 2, + "line": 200 + }, + { + "heading": "4.1 LightGCN(Stage-1 主力)", + "level": 3, + "line": 202 + }, + { + "heading": "4.2 259 维特征完整构成(放 Method 或附录)", + "level": 3, + "line": 205 + }, + { + "heading": "4.3 七个随机游走配置(放 Method/附录)", + "level": 3, + "line": 223 + }, + { + "heading": "4.4 高阶传播(创新点,精炼描述)", + "level": 3, + "line": 236 + }, + { + "heading": "4.5 决策规则(精炼描述)", + "level": 3, + "line": 239 + }, + { + "heading": "5. 图表规划清单(每张图的位置/目的/caption)", + "level": 2, + "line": 244 + }, + { + "heading": "6. Research Questions 与实验对应(advice.md 建议加 RQ)", + "level": 2, + "line": 260 + }, + { + "heading": "7. 写作注意事项(reviewer 视角)", + "level": 2, + "line": 272 + }, + { + "heading": "8. 中英术语对照", + "level": 2, + "line": 284 + }, + { + "heading": "附录 A:关键文件速查(写论文/核对数据用)", + "level": 2, + "line": 308 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 34 + } + }, + { + "path": "reports/preliminary_report.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 175, + "nonEmptyLines": 110, + "sections": [ + { + "heading": "基于异构 LightGCN 的学术论文推荐系统初步报告", + "level": 1, + "line": 1 + }, + { + "heading": "摘要", + "level": 2, + "line": 3 + }, + { + "heading": "1. 任务背景", + "level": 2, + "line": 7 + }, + { + "heading": "2. 数据与特征", + "level": 2, + "line": 19 + }, + { + "heading": "3. 方法", + "level": 2, + "line": 37 + }, + { + "heading": "3.1 异构图构建", + "level": 3, + "line": 39 + }, + { + "heading": "3.2 LightGCN 主模型", + "level": 3, + "line": 50 + }, + { + "heading": "3.3 训练目标与负采样", + "level": 3, + "line": 62 + }, + { + "heading": "3.4 集成与后处理", + "level": 3, + "line": 72 + }, + { + "heading": "4. 实验过程", + "level": 2, + "line": 81 + }, + { + "heading": "4.1 官方 baseline", + "level": 3, + "line": 83 + }, + { + "heading": "4.2 SAGEConv 异构 GNN", + "level": 3, + "line": 87 + }, + { + "heading": "4.3 LightGBM 结构特征模型", + "level": 3, + "line": 91 + }, + { + "heading": "4.4 LightGCN 主线实验", + "level": 3, + "line": 95 + }, + { + "heading": "5. 当前结果", + "level": 2, + "line": 111 + }, + { + "heading": "6. 分析", + "level": 2, + "line": 141 + }, + { + "heading": "7. 复现环境", + "level": 2, + "line": 149 + }, + { + "heading": "8. 后续工作", + "level": 2, + "line": 163 + }, + { + "heading": "9. 结论", + "level": 2, + "line": 173 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 19 + } + }, + { + "path": "WORKSPACE_STATUS.md", + "language": "markdown", + "fileCategory": "docs", + "totalLines": 263, + "nonEmptyLines": 223, + "sections": [ + { + "heading": "WORKSPACE STATUS — CS3319 Project 2 Final Deliverable", + "level": 1, + "line": 1 + }, + { + "heading": "一、项目简介", + "level": 2, + "line": 8 + }, + { + "heading": "1.1 项目定位", + "level": 3, + "line": 10 + }, + { + "heading": "1.2 核心技术栈", + "level": 3, + "line": 23 + }, + { + "heading": "1.3 数据来源", + "level": 3, + "line": 31 + }, + { + "heading": "二、目录结构解析", + "level": 2, + "line": 38 + }, + { + "heading": "三、运行与配置", + "level": 2, + "line": 101 + }, + { + "heading": "3.1 环境配置(⚠️ 配置文件当前缺失)", + "level": 3, + "line": 103 + }, + { + "heading": "3.2 快速验证最终结果(只读)", + "level": 3, + "line": 117 + }, + { + "heading": "3.3 复现最终高阶堆叠方法(⚠️ 依赖缺失,当前可能不可运行)", + "level": 3, + "line": 132 + }, + { + "heading": "3.4 复现早期 6 模型 LightGCN 集成(⚠️ 权重缺失)", + "level": 3, + "line": 143 + }, + { + "heading": "四、当前状态与进度", + "level": 2, + "line": 153 + }, + { + "heading": "4.1 开发阶段(已完成,据 `notes/experiment_history.md`)", + "level": 3, + "line": 155 + }, + { + "heading": "4.2 ⚠️ 仓库当前状态(重要)", + "level": 3, + "line": 167 + }, + { + "heading": "4.3 未完成 / 受限事项", + "level": 3, + "line": 186 + }, + { + "heading": "五、核心脚本速查表", + "level": 2, + "line": 194 + }, + { + "heading": "训练 / 基线类", + "level": 3, + "line": 196 + }, + { + "heading": "动态验证 / 集成训练类(README 核心)", + "level": 3, + "line": 209 + }, + { + "heading": "消融 / 特征构建类", + "level": 3, + "line": 219 + }, + { + "heading": "提交生成类", + "level": 3, + "line": 230 + }, + { + "heading": "堆叠 / 校准 / 搜索类", + "level": 3, + "line": 245 + }, + { + "heading": "六、建议阅读顺序(熟悉项目)", + "level": 2, + "line": 257 + } + ], + "metrics": { + "importCount": 0, + "exportCount": 0, + "functionCount": 0, + "classCount": 0, + "sectionCount": 22 + } + } + ] +} \ No newline at end of file diff --git a/.understand-anything/tmp/validate_graph.cjs b/.understand-anything/tmp/validate_graph.cjs new file mode 100644 index 0000000000000000000000000000000000000000..53d210ac9c4a22de5c247f4940ecc55624f94591 --- /dev/null +++ b/.understand-anything/tmp/validate_graph.cjs @@ -0,0 +1,48 @@ +// Validate knowledge-graph.json against the core Zod schema (Phase 6 inline check) +const { createRequire } = require('module'); +const { resolve } = require('path'); +const { pathToFileURL } = require('url'); +const { readFileSync, writeFileSync } = require('fs'); + +const PLUGIN_ROOT = "C:/Users/c5gal/.claude/plugins/cache/understand-anything/understand-anything/2.8.0"; +const require2 = createRequire(resolve(PLUGIN_ROOT, 'package.json')); +let core; +(async () => { + try { + core = await import(pathToFileURL(require2.resolve('@understand-anything/core')).href); + } catch { + core = await import(pathToFileURL(resolve(PLUGIN_ROOT, 'packages/core/dist/index.js')).href); + } + const { validateGraph, autoFixGraph, sanitizeGraph } = core; + const root = "D:/reps/26H1_cs3319_final_deliverable"; + const kgPath = resolve(root, '.understand-anything/knowledge-graph.json'); + let raw = JSON.parse(readFileSync(kgPath, 'utf-8')); + + // sanitize then autofix then validate + const sanitized = sanitizeGraph ? sanitizeGraph(raw) : raw; + const fixed = autoFixGraph(sanitized); + if (fixed.issues && fixed.issues.length) { + console.log("=== autoFix issues ==="); + for (const i of fixed.issues) console.log(` [${i.level}] ${i.category}: ${i.message}`); + } else { + console.log("autoFix: no issues"); + } + const result = validateGraph(fixed.data); + console.log("\n=== validateGraph ==="); + console.log("success:", result.success); + if (result.fatal) console.log("FATAL:", result.fatal); + if (result.issues && result.issues.length) { + for (const i of result.issues) console.log(` [${i.level}] ${i.category}: ${i.message}${i.path?` (@${i.path})`:''}`); + } + if (result.success) { + const d = result.data; + console.log(`\nVALID graph: ${d.nodes.length} nodes, ${d.edges.length} edges, ${d.layers.length} layers, ${d.tour.length} tour steps`); + // write back the validated/cleaned graph + writeFileSync(kgPath, JSON.stringify(d, null, 1), 'utf-8'); + // also refresh assembled-graph.json intermediate + writeFileSync(resolve(root, '.understand-anything/intermediate/assembled-graph.json'), JSON.stringify(d, null, 1), 'utf-8'); + console.log("Wrote back cleaned knowledge-graph.json + assembled-graph.json"); + } else { + console.log("\nGraph FAILED validation — not writing back. Inspect issues above."); + } +})(); diff --git a/.understand-anything/tmp/verify_integrity.py b/.understand-anything/tmp/verify_integrity.py new file mode 100644 index 0000000000000000000000000000000000000000..1c8c12fa7c637a33140acd4bcf882380e745c6a6 --- /dev/null +++ b/.understand-anything/tmp/verify_integrity.py @@ -0,0 +1,207 @@ +#!/usr/bin/env python3 +"""Knowledge graph integrity verifier.""" +import json, sys, math +from collections import Counter + +GRAPH = "D:/reps/26H1_cs3319_final_deliverable/.understand-anything/knowledge-graph.json" + +with open(GRAPH, "r", encoding="utf-8") as f: + data = json.load(f) + +nodes = data.get("nodes", []) +edges = data.get("edges", []) +layers = data.get("layers", []) +tour_steps = data.get("tour", []) + +# Build node id set +node_ids = [n["id"] for n in nodes] +node_id_set = set(node_ids) +node_id_counter = Counter(node_ids) + +# 1. Duplicate node ids +dup_node_ids = [nid for nid, cnt in node_id_counter.items() if cnt > 1] + +# 2. Dangling edges +dangling = 0 +dangling_examples = [] +for e in edges: + s, t = e["source"], e["target"] + if s not in node_id_set: + dangling += 1 + if len(dangling_examples) < 5: + dangling_examples.append(f" edge source={s!r} target={t!r} type={e.get('type')}") + if t not in node_id_set: + dangling += 1 + if len(dangling_examples) < 5: + dangling_examples.append(f" edge source={s!r} target={t!r} type={e.get('type')}") + +# 3. Duplicate edges +edge_keys = [(e["source"], e["target"], e["type"]) for e in edges] +edge_counter = Counter(edge_keys) +dup_edge_count = sum(1 for k, c in edge_counter.items() if c > 1) + +# 4. Orphan nodes +touched = set() +for e in edges: + touched.add(e["source"]) + touched.add(e["target"]) +orphans = sorted(node_id_set - touched) +orphan_count = len(orphans) +orphan_examples = orphans[:5] + +# 5. Invalid layer nodeIds +invalid_layer_refs = [] +for layer in layers: + for nid in layer.get("nodeIds", []): + if nid not in node_id_set: + invalid_layer_refs.append((layer.get("id", "?"), nid)) + +# 6. Invalid tour nodeIds +invalid_tour_refs = [] +for step in tour_steps: + for nid in step.get("nodeIds", []): + if nid not in node_id_set: + invalid_tour_refs.append((step.get("order", "?"), nid)) + +# 7. Enum validity +VALID_COMPLEXITY = {"simple", "moderate", "complex"} +VALID_EDGE_TYPE = {"contains", "calls", "imports", "documents"} +VALID_DIRECTION = {"forward", "backward", "bidirectional"} +VALID_NODE_TYPE = {"file", "function", "class", "config", "document"} + +invalid_complexity = [n["id"] for n in nodes if n.get("complexity") not in VALID_COMPLEXITY] +invalid_edge_type = [f" edge src={e['source']} tgt={e['target']} type={e.get('type')}" for e in edges if e.get("type") not in VALID_EDGE_TYPE] +invalid_direction = [f" edge src={e['source']} tgt={e['target']} dir={e.get('direction')}" for e in edges if e.get("direction") not in VALID_DIRECTION] +invalid_node_type = [n["id"] for n in nodes if n.get("type") not in VALID_NODE_TYPE] + +# 8. Weight range +weights = [e["weight"] for e in edges] +numeric_weights = [w for w in weights if isinstance(w, (int, float)) and not (isinstance(w, float) and math.isnan(w))] +nan_weights = [e for e in edges if isinstance(e.get("weight"), float) and math.isnan(e["weight"])] +non_numeric_weights = [e for e in edges if not isinstance(e.get("weight"), (int, float))] +weight_min = min(numeric_weights) if numeric_weights else None +weight_max = max(numeric_weights) if numeric_weights else None + +# 9. Required-field presence +NODE_REQUIRED = {"id", "type", "name", "summary", "tags", "complexity"} +EDGE_REQUIRED = {"source", "target", "type", "direction", "weight"} + +missing_node_fields = 0 +empty_summary_nodes = [] +non_list_tags_nodes = [] +for n in nodes: + for f in NODE_REQUIRED: + if f not in n: + missing_node_fields += 1 + if "summary" in n and (not isinstance(n["summary"], str) or n["summary"].strip() == ""): + empty_summary_nodes.append(n["id"]) + if "tags" in n and not isinstance(n["tags"], list): + non_list_tags_nodes.append(n["id"]) + +missing_edge_fields = 0 +for e in edges: + for f in EDGE_REQUIRED: + if f not in e: + missing_edge_fields += 1 + +# Print report +print("=" * 60) +print("KNOWLEDGE GRAPH INTEGRITY REPORT") +print("=" * 60) +print(f"Total nodes: {len(nodes)}") +print(f"Total edges: {len(edges)}") +print(f"Total layers: {len(layers)}") +print(f"Total tour steps: {len(tour_steps)}") +print() + +print("--- 1. Duplicate Node IDs ---") +print(f"Count: {len(dup_node_ids)}") +for d in dup_node_ids[:10]: + print(f" {d}") + +print() +print("--- 2. Dangling Edges ---") +print(f"Count: {dangling}") +for ex in dangling_examples: + print(ex) + +print() +print("--- 3. Duplicate Edges (same source+target+type) ---") +print(f"Count: {dup_edge_count}") +if dup_edge_count: + for k, c in edge_counter.items(): + if c > 1: + print(f" {k} x{c}") + +print() +print("--- 4. Orphan Nodes ---") +print(f"Count: {orphan_count}") +for o in orphan_examples: + print(f" {o}") + +print() +print("--- 5. Invalid Layer NodeRefs ---") +print(f"Count: {len(invalid_layer_refs)}") +for layer_id, nid in invalid_layer_refs[:10]: + print(f" layer={layer_id} ref={nid}") + +print() +print("--- 6. Invalid Tour NodeRefs ---") +print(f"Count: {len(invalid_tour_refs)}") +for step_id, nid in invalid_tour_refs[:10]: + print(f" step={step_id} ref={nid}") + +print() +print("--- 7. Enum Validity ---") +print(f"Invalid complexity: {len(invalid_complexity)}") +for x in invalid_complexity[:10]: + print(f" {x}") +print(f"Invalid edge.type: {len(invalid_edge_type)}") +for x in invalid_edge_type[:10]: + print(x) +print(f"Invalid edge.direction: {len(invalid_direction)}") +for x in invalid_direction[:10]: + print(x) +print(f"Invalid node.type: {len(invalid_node_type)}") +for x in invalid_node_type[:10]: + print(f" {x}") + +print() +print("--- 8. Edge Weight Range ---") +print(f"Min: {weight_min}") +print(f"Max: {weight_max}") +print(f"NaN weights: {len(nan_weights)}") +print(f"Non-numeric weights: {len(non_numeric_weights)}") + +print() +print("--- 9. Required Field Presence ---") +print(f"Missing node fields: {missing_node_fields}") +print(f"Empty summary nodes: {len(empty_summary_nodes)}") +for x in empty_summary_nodes[:10]: + print(f" {x}") +print(f"Non-list tags nodes: {len(non_list_tags_nodes)}") +for x in non_list_tags_nodes[:10]: + print(f" {x}") +print(f"Missing edge fields: {missing_edge_fields}") + +print() +print("=" * 60) + +# Verdict +failures = [ + ("Dangling edges", dangling), + ("Duplicate node IDs", len(dup_node_ids)), + ("Invalid enum values", len(invalid_complexity) + len(invalid_edge_type) + len(invalid_direction) + len(invalid_node_type)), + ("Invalid layer refs", len(invalid_layer_refs)), + ("Invalid tour refs", len(invalid_tour_refs)), +] +total_fails = sum(v for _, v in failures) +for name, count in failures: + print(f" {name}: {count}") + +if total_fails == 0: + verdict = "PASS" +else: + verdict = "FAIL" +print(f"\nVERDICT: {verdict}") +print("=" * 60) diff --git a/.understand-anything/tmp/verify_schema.cjs b/.understand-anything/tmp/verify_schema.cjs new file mode 100644 index 0000000000000000000000000000000000000000..d28e3bb0c96e35bab2bea47330f1b0d986fb84cb --- /dev/null +++ b/.understand-anything/tmp/verify_schema.cjs @@ -0,0 +1,23 @@ +const { readFileSync } = require('fs'); +const { createRequire } = require('module'); +const { resolve } = require('path'); +const { pathToFileURL } = require('url'); + +(async () => { + const PLUGIN_ROOT = "C:/Users/c5gal/.claude/plugins/cache/understand-anything/understand-anything/2.8.0"; + const rq = createRequire(resolve(PLUGIN_ROOT, 'package.json')); + let core; + try { core = await import(pathToFileURL(rq.resolve('@understand-anything/core')).href); } + catch { core = await import(pathToFileURL(resolve(PLUGIN_ROOT,'packages/core/dist/index.js')).href); } + + const { validateGraph, autoFixGraph } = core; + const raw = JSON.parse(readFileSync('D:/reps/26H1_cs3319_final_deliverable/.understand-anything/knowledge-graph.json','utf-8')); + const fixed = autoFixGraph(raw); + console.log('AUTOFIX_ISSUES=' + (fixed.issues||[]).length); + for (const i of (fixed.issues||[])) console.log(' ' + i.level + ': ' + i.message); + const r = validateGraph(fixed.data); + console.log('SUCCESS=' + r.success); + console.log('FATAL=' + (r.fatal||'none')); + for (const i of (r.issues||[])) console.log(' ISSUE ' + i.level + ': ' + i.category + ' - ' + i.message); + if (r.data) console.log('NODES=' + r.data.nodes.length + ' EDGES=' + r.data.edges.length + ' LAYERS=' + r.data.layers.length + ' TOUR=' + r.data.tour.length); +})(); diff --git a/ACM_Conference_Proceedings_Primary_Article_Template/ACM-Reference-Format.bst b/ACM_Conference_Proceedings_Primary_Article_Template/ACM-Reference-Format.bst new file mode 100644 index 0000000000000000000000000000000000000000..ca1b3bea69be7a3050bc9c617c6f72c92ddaafc6 --- /dev/null +++ b/ACM_Conference_Proceedings_Primary_Article_Template/ACM-Reference-Format.bst @@ -0,0 +1,3224 @@ +%%% -*-BibTeX-*- +%%% ==================================================================== +%%% @BibTeX-style-file{ +%%% author = "Nelson H. F. Beebe, Boris Veytsman and Gerald Murray", +%%% version = "2.1", +%%% acmart-version = "1.90", +%%% date = "Mar 26 2023", +%%% filename = "ACM-Reference-Format.bst", +%%% email = "borisv@lk.net, boris@varphi.com", +%%% codetable = "ISO/ASCII", +%%% keywords = "ACM Transactions bibliography style; BibTeX", +%%% license = "public domain", +%%% supported = "yes", +%%% abstract = "", +%%% } +%%% ==================================================================== + +%%% Revision history: see source in git + +ENTRY + { address + advisor + archiveprefix + author + booktitle + chapter + city + date + edition + editor + eprint + eprinttype + eprintclass + howpublished + institution + journal + key + location + month + note + number + organization + pages + primaryclass + publisher + school + series + title + type + volume + year + % New keys recognized + issue % UTAH: used in, e.g., ACM SIGSAM Bulletin and ACM Communications in Computer Algebra + articleno + eid + day % UTAH: needed for newspapers, weeklies, bi-weeklies + doi % UTAH + url % UTAH + bookpages % UTAH + numpages + lastaccessed % UTAH: used only for @Misc{...} + coden % UTAH + isbn % UTAH + isbn-13 % UTAH + issn % UTAH + lccn % UTAH + distinctURL % whether to print url if doi is present + archived % Where the url is archived + venue % for presentations + } + {} + { label.year extra.label sort.year sort.label basic.label.year} + +INTEGERS { output.state before.all mid.sentence after.sentence after.block } + +INTEGERS { show-isbn-10-and-13 } % initialized below in begin.bib + +INTEGERS { nameptr namesleft numnames } + +INTEGERS { multiresult } + +INTEGERS { len } + +INTEGERS { last.extra.num } + +STRINGS { s t t.org u } + +STRINGS { last.label next.extra } + +STRINGS { p1 p2 p3 page.count } + + +FUNCTION { not } +{ + { #0 } + { #1 } + if$ +} + +FUNCTION { and } +{ + 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION { or } +{ + { pop$ #1 } + 'skip$ + if$ +} + + +FUNCTION { dump.stack.1 } +{ + duplicate$ "STACK[top] = [" swap$ * "]" * warning$ +} + +FUNCTION { dump.stack.2 } +{ + duplicate$ "STACK[top ] = [" swap$ * "]" * warning$ + swap$ + duplicate$ "STACK[top-1] = [" swap$ * "]" * warning$ + swap$ +} + +FUNCTION { empty.or.unknown } +{ + %% Examine the top stack entry, and push 1 if it is empty, or + %% consists only of whitespace, or is a string beginning with two + %% queries (??), and otherwise, push 0. + %% + %% This function provides a replacement for empty$, with the + %% convenient feature that unknown values marked by two leading + %% queries are treated the same as missing values, and thus, do not + %% appear in the output .bbl file, and yet, their presence in .bib + %% file(s) serves to mark values which are temporarily missing, but + %% are expected to be filled in eventually once more data is + %% obtained. The TeX User Group and BibNet bibliography archives + %% make extensive use of this practice. + %% + %% An empty string cannot serve the same purpose, because just as in + %% statistics data processing, an unknown value is not the same as an + %% empty value. + %% + %% At entry: stack = ... top:[string] + %% At exit: stack = ... top:[0 or 1] + + duplicate$ empty$ + { pop$ #1 } + { #1 #2 substring$ "??" = } + if$ +} + +FUNCTION { empty.or.zero } +{ + %% Examine the top entry and push 1 if it is empty, or is zero + duplicate$ empty$ + { pop$ #1 } + { "0" = } + if$ +} + + +FUNCTION { writeln } +{ + %% In BibTeX style files, the sequences + %% + %% ... "one" "two" output + %% ... "one" "two" output.xxx + %% + %% ship "one" to the output file, possibly following by punctuation, + %% leaving the stack with + %% + %% ... "two" + %% + %% There is thus a one-string lag in output processing that must be + %% carefully handled to avoid duplicating a string in the output + %% file. Unless otherwise noted, all output.xxx functions leave + %% just one new string on the stack, and that model should be born + %% in mind when reading or writing function code. + %% + %% BibTeX's asynchronous buffering of output from strings from the + %% stack is confusing because newline$ bypasses the buffer. It + %% would have been so much easier for newline to be a character + %% rather than a state of the output-in-progress. + %% + %% The documentation in btxhak.dvi is WRONG: it says + %% + %% newline$ Writes onto the bbl file what's accumulated in the + %% output buffer. It writes a blank line if and only + %% if the output buffer is empty. Since write$ does + %% reasonable line breaking, you should use this + %% function only when you want a blank line or an + %% explicit line break. + %% + %% write$ Pops the top (string) literal and writes it on the + %% output buffer (which will result in stuff being + %% written onto the bbl file when the buffer fills + %% up). + %% + %% Examination of the BibTeX source code shows that write$ does + %% indeed behave as claimed, but newline$ sends a newline character + %% directly to the output file, leaving the stack unchanged. The + %% first line "Writes onto ... buffer." is therefore wrong. + %% + %% The original BibTeX style files almost always use "write$ newline$" + %% in that order, so it makes sense to hide that pair in a private + %% function like this one, named after a statement in Pascal, + %% the programming language embedded in the BibTeX Web program. + + write$ % output top-of-stack string + newline$ % immediate write of newline (not via stack) +} + +FUNCTION { init.state.consts } +{ + #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +FUNCTION { output.nonnull } +{ % Stack in: ... R S T Stack out: ... R T File out: S + 's := + output.state mid.sentence = + { + ", " * write$ + } + { + output.state after.block = + { + add.period$ writeln + "\newblock " write$ + } + { + output.state before.all = + { + write$ + } + { + add.period$ " " * write$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION { output.nonnull.dot.space } +{ % Stack in: ... R S T Stack out: ... R T File out: S + 's := + output.state mid.sentence = % { ". " * write$ } + { + ". " * write$ + } + { + output.state after.block = + { + add.period$ writeln "\newblock " write$ + } + { + output.state before.all = + { + write$ + } + { + add.period$ " " * write$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION { output.nonnull.remove } +{ % Stack in: ... R S T Stack out: ... R T File out: S + 's := + output.state mid.sentence = + { + " " * write$ + } + { + output.state after.block = + { + add.period$ writeln "\newblock " write$ + } + { + output.state before.all = + { + write$ + } + { + add.period$ " " * write$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION { output.nonnull.removenospace } +{ % Stack in: ... R S T Stack out: ... R T File out: S + 's := + output.state mid.sentence = + { + "" * write$ + } + { + output.state after.block = + { + add.period$ writeln "\newblock " write$ + } + { + output.state before.all = + { + write$ + } + { + add.period$ " " * write$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION { output } +{ % discard top token if empty, else like output.nonnull + duplicate$ empty.or.unknown + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION { output.dot.space } +{ % discard top token if empty, else like output.nonnull.dot.space + duplicate$ empty.or.unknown + 'pop$ + 'output.nonnull.dot.space + if$ +} + +FUNCTION { output.removenospace } +{ % discard top token if empty, else like output.nonnull.removenospace + duplicate$ empty.or.unknown + 'pop$ + 'output.nonnull.removenospace + if$ +} + +FUNCTION { output.check } +{ % like output, but warn if key name on top-of-stack is not set + 't := + duplicate$ empty.or.unknown + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION { bibinfo.output.check } +{ % like output.check, adding bibinfo field + 't := + duplicate$ empty.or.unknown + { pop$ "empty " t * " in " * cite$ * warning$ } + { "\bibinfo{" t "}{" * * swap$ * "}" * + output.nonnull } + if$ +} + +FUNCTION { output.check.dot.space } +{ % like output.dot.space, but warn if key name on top-of-stack is not set + 't := + duplicate$ empty.or.unknown + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull.dot.space + if$ +} + +FUNCTION { fin.block } +{ % functionally, but not logically, identical to fin.entry + add.period$ + writeln +} + +FUNCTION { fin.entry } +{ + add.period$ + writeln +} + +FUNCTION { new.sentence } +{ % update sentence state, with neither output nor stack change + output.state after.block = + 'skip$ + { + output.state before.all = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ +} + +FUNCTION { fin.sentence } +{ + add.period$ + write$ + new.sentence + "" +} + +FUNCTION { new.block } +{ + output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION { output.coden } % UTAH +{ % output non-empty CODEN as one-line sentence (stack untouched) + coden empty.or.unknown + { } + { "\showCODEN{" coden * "}" * writeln } + if$ +} + +% +% Sometimes articleno starts with the word 'Article' or 'Paper. +% (this is a bug of acmdl, sigh) +% We strip them. We assume eid or articleno is already on stack +% + +FUNCTION { strip.articleno.or.eid } +{ + 't := + t #1 #7 substring$ "Article" = + {t #8 t text.length$ substring$ 't :=} + { } + if$ + t #1 #7 substring$ "article" = + {t #8 t text.length$ substring$ 't :=} + { } + if$ + t #1 #5 substring$ "Paper" = + {t #6 t text.length$ substring$ 't :=} + { } + if$ + t #1 #5 substring$ "paper" = + {t #6 t text.length$ substring$ 't :=} + { } + if$ + % Strip any left trailing space or ~ + t #1 #1 substring$ " " = + {t #2 t text.length$ substring$ 't :=} + { } + if$ + t #1 #1 substring$ "~" = + {t #2 t text.length$ substring$ 't :=} + { } + if$ + t +} + + +FUNCTION { format.articleno } +{ + articleno empty.or.unknown not eid empty.or.unknown not and + { "Both articleno and eid are defined for " cite$ * warning$ } + 'skip$ + if$ + articleno empty.or.unknown eid empty.or.unknown and + { "" } + { + numpages empty.or.unknown + { "articleno or eid field, but no numpages field, in " + cite$ * warning$ } + { } + if$ + eid empty.or.unknown + { "Article \bibinfo{articleno}{" articleno strip.articleno.or.eid * "}" * } + { "Article \bibinfo{articleno}{" eid strip.articleno.or.eid * "}" * } + if$ + } + if$ +} + +FUNCTION { format.year } +{ % push year string or "[n.\,d.]" onto output stack + %% Because year is a mandatory field, we always force SOMETHING + %% to be output. If we do not know year but know date, we push date + %% as the last resort + "\bibinfo{year}{" + year empty.or.unknown + { date empty.or.unknown + { "[n.\,d.]" } + { date #1 #4 substring$ } + if$ + } + { year } + if$ + * "}" * +} + +FUNCTION { format.day.month } +{ % push "day month " or "month " or "" onto output stack + day empty.or.unknown + { + month empty.or.unknown + { "" } + { "\bibinfo{date}{" month * "} " *} + if$ + } + { + month empty.or.unknown + { "" } + { "\bibinfo{date}{" day * " " * month * "} " *} + if$ + } + if$ +} + +FUNCTION { format.day.month.year } % UTAH +{ % if month is empty, push "" else push "(MON.)" or "(DD MON.)" + % Needed for frequent periodicals: 2008. ... New York Times C-1, C-2, C-17 (23 Oct.) + % acm-*.bst addition: prefix parenthesized date string with + % ", Article nnn " + articleno empty.or.unknown eid empty.or.unknown and + { "" } + { output.state after.block = + {", " format.articleno * } + { format.articleno } + if$ + } + if$ + " (" * format.day.month * format.year * ")" * +} + +FUNCTION { output.day.month.year } % UTAH +{ % if month is empty value, do nothing; else output stack top and + % leave with new top string "(MON.)" or "(DD MON.)" + % Needed for frequent periodicals: 2008. ... New York Times C-1, C-2, C-17 (23 Oct.) + format.day.month.year + output.nonnull.remove +} + +FUNCTION { strip.doi } % UTAH +{ % Strip any Web address prefix to recover the bare DOI, leaving the + % result on the output stack, as recommended by CrossRef DOI + % documentation. + % For example, reduce "http://doi.acm.org/10.1145/1534530.1534545" to + % "10.1145/1534530.1534545". A suitable URL is later typeset and + % displayed as the LAST item in the reference list entry. Publisher Web + % sites wrap this with a suitable link to a real URL to resolve the DOI, + % and the master https://doi.org/ address is preferred, since publisher- + % specific URLs can disappear in response to economic events. All + % journals are encouraged by the DOI authorities to use that typeset + % format and link procedures for uniformity across all publications that + % include DOIs in reference lists. + % The numeric prefix is guaranteed to start with "10.", so we use + % that as a test. + % 2017-02-04 Added stripping of https:// (Boris) + doi #1 #3 substring$ "10." = + { doi } + { + doi 't := % get modifiable copy of DOI + + % Change https:// to http:// to strip both prefixes (BV) + + t #1 #8 substring$ "https://" = + { "http://" t #9 t text.length$ #8 - substring$ * 't := } + { } + if$ + + t #1 #7 substring$ "http://" = + { + t #8 t text.length$ #7 - substring$ 't := + + "INTERNAL STYLE-FILE ERROR" 's := + + % search for next "/" and assign its suffix to s + + { t text.length$ } + { + t #1 #1 substring$ "/" = + { + % save rest of string as true DOI (should be 10.xxxx/yyyy) + t #2 t text.length$ #1 - substring$ 's := + "" 't := % empty string t terminates the loop + } + { + % discard first character and continue loop: t <= substring(t,2,last) + t #2 t text.length$ #1 - substring$ 't := + } + if$ + } + while$ + + % check for valid DOI (should be 10.xxxx/yyyy) + s #1 #3 substring$ "10." = + { } + { "unrecognized DOI substring " s * " in DOI value [" * doi * "]" * warning$ } + if$ + + s % push the stripped DOI on the output stack + + } + { + "unrecognized DOI value [" doi * "]" * warning$ + doi % push the unrecognized original DOI on the output stack + } + if$ + } + if$ +} + +% +% Change by BV: added standard prefix to URL +% +FUNCTION { output.doi } % UTAH +{ % output non-empty DOI as one-line sentence (stack untouched) + doi empty.or.unknown + { } + { + "\href{https://doi.org/" strip.doi * "}{doi:\nolinkurl{" * + strip.doi * "}}" * writeln + } + if$ +} + +FUNCTION { output.isbn } % UTAH +{ % output non-empty ISBN-10 and/or ISBN-13 as one-line sentences (stack untouched) + show-isbn-10-and-13 + { + %% show both 10- and 13-digit ISBNs + isbn empty.or.unknown + { } + { + "\showISBNx{" isbn * "}" * writeln + } + if$ + isbn-13 empty.or.unknown + { } + { + "\showISBNxiii{" isbn-13 * "}" * writeln + } + if$ + } + { + %% show 10-digit ISBNs only if 13-digit ISBNs not available + isbn-13 empty.or.unknown + { + isbn empty.or.unknown + { } + { + "\showISBNx{" isbn * "}" * writeln + } + if$ + } + { + "\showISBNxiii{" isbn-13 * "}" * writeln + } + if$ + } + if$ +} + +FUNCTION { output.issn } % UTAH +{ % output non-empty ISSN as one-line sentence (stack untouched) + issn empty.or.unknown + { } + { "\showISSN{" issn * "}" * writeln } + if$ +} + +FUNCTION { output.issue } +{ % output non-empty issue number as a one-line sentence (stack untouched) + issue empty.or.unknown + { } + { "Issue " issue * "." * writeln } + if$ +} + +FUNCTION { output.lccn } % UTAH +{ % return with stack untouched + lccn empty.or.unknown + { } + { "\showLCCN{" lccn * "}" * writeln } + if$ +} + +FUNCTION { output.note } % UTAH +{ % return with stack empty + note empty.or.unknown + { } + { "\shownote{" note * "}" add.period$ * writeln } + if$ +} + +FUNCTION { output.note.check } % UTAH +{ % return with stack empty + note empty.or.unknown + { "empty note in " cite$ * warning$ } + { "\shownote{" note * "}" add.period$ * writeln } + if$ +} + +FUNCTION { output.eprint } % +{ % return with stack empty + eprint empty.or.unknown + { } + { "\showeprint" + archiveprefix empty.or.unknown + { eprinttype empty.or.unknown + { } + { "[" eprinttype "]" * * * } + if$ + } + { "[" archiveprefix "l" change.case$ "]" * * * } + if$ + "{" eprint "}" * * * + primaryclass empty.or.unknown + { eprintclass empty.or.unknown + { } + { "~[" eprintclass "]" * * * } + if$ + } + { "~[" primaryclass "]" * * * } + if$ + writeln + } + if$ +} + + +% +% Changes by BV 2011/04/15. Do not output +% url if doi is defined +% +% +% Changes by BV 2021/11/26. Output url even if doi is defined +% if distinctURL is not zero. +% +FUNCTION { output.url } % UTAH +{ % return with stack untouched + % output URL and associated lastaccessed fields + doi empty.or.unknown distinctURL empty.or.zero not or + { + url empty.or.unknown + { } + { new.sentence + %% Use \urldef, outside \showURL, so that %nn, #, etc in URLs work + %% correctly. Put the actual URL on its own line to reduce the + %% likelihood of BibTeX's nasty line wrapping after column 79. + %% \url{} can undo this, but if that doesn't work for some reason + %% the .bbl file would have to be repaired manually. + "\urldef\tempurl%" writeln + "\url{" url * "}" * writeln + + "\showURL{%" writeln + lastaccessed empty.or.unknown + { "" } + { "Retrieved " lastaccessed * " from " * } + if$ + "\tempurl" * + archived empty.or.unknown + { } + {"\urldef\tempurla%" writeln + "\url{" archived * "}%" * writeln + ", archived at [\tempurla]" * + } + if$ + "}" * writeln + } + if$ + } + { } + if$ +} + +FUNCTION { output.year.check } +{ % warn if year empty, output top string and leave " YEAR