Csed-dev commited on
Commit
f1d50c0
·
verified ·
1 Parent(s): c101c02

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +165 -0
README.md ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - tabular-regression
5
+ tags:
6
+ - sparse-matrices
7
+ - linear-systems
8
+ - preconditioners
9
+ - numerical-linear-algebra
10
+ - suitesparse
11
+ - scientific-computing
12
+ - benchmark
13
+ size_categories:
14
+ - n<1K
15
+ configs:
16
+ - config_name: manifest
17
+ data_files: manifest.parquet
18
+ ---
19
+
20
+ # MatrixPFN SuiteSparse Evaluation Set
21
+
22
+ A curated subset of the [SuiteSparse Matrix Collection](https://sparse.tamu.edu/) for benchmarking learned preconditioners on sparse linear systems, matching the evaluation criteria from the GNP paper ([arXiv 2406.00809v3](https://arxiv.org/abs/2406.00809v3)).
23
+
24
+ ## Dataset Description
25
+
26
+ - **Source:** [SuiteSparse Matrix Collection](https://sparse.tamu.edu/)
27
+ - **License:** CC-BY 4.0
28
+ - **Total matrices:** 867
29
+ - **Format:** Matrix Market (.mtx)
30
+ - **Size on disk:** ~5.7 GB
31
+
32
+ | Property | Value |
33
+ |---|---|
34
+ | Rows/Cols | 1,000 - 100,000 |
35
+ | Nonzeros | 1,314 - 1,990,919 |
36
+ | Shape | Square |
37
+ | Type | Real, non-SPD |
38
+ | Problem domains | 50 categories |
39
+
40
+ ### Domain Distribution (top 10)
41
+
42
+ | Count | Domain |
43
+ |---|---|
44
+ | 123 | Circuit simulation |
45
+ | 75 | Computational fluid dynamics |
46
+ | 69 | Optimization |
47
+ | 67 | Optimal control |
48
+ | 59 | Economic |
49
+ | 49 | Chemical process simulation |
50
+ | 47 | Undirected weighted graph |
51
+ | 32 | Circuit simulation (frequency-domain) |
52
+ | 31 | 2D/3D problem |
53
+ | 30 | Eigenvalue/model reduction |
54
+
55
+ ## Dataset Structure
56
+
57
+ ```
58
+ .
59
+ ├── README.md
60
+ ├── manifest.parquet # Matrix metadata (id, group, name, rows, cols, nnz, kind)
61
+ ├── suitesparse/
62
+ │ ├── 2D_27628_bjtcai/
63
+ │ │ └── 2D_27628_bjtcai.mtx
64
+ │ ├── ACTIVSg2000/
65
+ │ │ └── ACTIVSg2000.mtx
66
+ │ └── ... # 867 matrix directories
67
+ └── benchmark_results/
68
+ └── benchmark_gnp_paper.jsonl # FGMRES benchmark with 6 preconditioners
69
+ ```
70
+
71
+ ### manifest.parquet
72
+
73
+ Browsable in the HuggingFace Dataset Viewer. Fields:
74
+
75
+ | Column | Type | Description |
76
+ |---|---|---|
77
+ | `id` | int | SuiteSparse matrix ID |
78
+ | `group` | str | Collection group (e.g. "HB", "SNAP") |
79
+ | `name` | str | Matrix name |
80
+ | `rows` | int | Number of rows |
81
+ | `cols` | int | Number of columns |
82
+ | `nnz` | int | Number of nonzeros |
83
+ | `kind` | str | Problem domain |
84
+
85
+ ### benchmark_results/
86
+
87
+ JSONL file with FGMRES solver results per matrix for 6 preconditioners: None, Jacobi, Block Jacobi, ILU(0), AMG (AIR), GMRES-Inner. Includes convergence status, iteration count, residual history, and AUC metrics.
88
+
89
+ ## Dataset Creation
90
+
91
+ ### Selection Criteria
92
+
93
+ Matches the GNP paper evaluation set:
94
+ - Square matrices only (`rows == cols`)
95
+ - Real-valued (not complex)
96
+ - Non-SPD (not symmetric positive definite)
97
+ - 1,000 to 100,000 rows
98
+ - Less than 2,000,000 nonzeros
99
+
100
+ ### Source Data
101
+
102
+ All matrices originate from the [SuiteSparse Matrix Collection](https://sparse.tamu.edu/), downloaded unmodified in Matrix Market format via [ssgetpy](https://github.com/drdarshan/ssgetpy).
103
+
104
+ ## Usage
105
+
106
+ ```python
107
+ from scipy.io import mmread
108
+ from huggingface_hub import hf_hub_download
109
+
110
+ path = hf_hub_download(
111
+ repo_id="Csed-dev/matrixpfn-base",
112
+ filename="suitesparse/ACTIVSg2000/ACTIVSg2000.mtx",
113
+ repo_type="dataset",
114
+ )
115
+ matrix = mmread(path)
116
+ print(f"Shape: {matrix.shape}, NNZ: {matrix.nnz}")
117
+ ```
118
+
119
+ ```python
120
+ from datasets import load_dataset
121
+
122
+ manifest = load_dataset("Csed-dev/matrixpfn-base", "manifest")
123
+ print(manifest["train"].to_pandas().head())
124
+ ```
125
+
126
+ ## Considerations
127
+
128
+ - Matrix Market (.mtx) files are not natively streamable via `datasets`. Use `hf_hub_download` or `snapshot_download` for the sparse matrices.
129
+ - Some matrices may have near-singular or zero diagonals, causing preconditioner construction failures (documented in benchmark results).
130
+ - The benchmark results use spectral-radius scaling (dividing by the infinity norm) before solving.
131
+
132
+ ## Citation
133
+
134
+ This dataset is a redistribution of matrices from the SuiteSparse Matrix Collection under the CC-BY 4.0 license.
135
+
136
+ **Required citations:**
137
+
138
+ ```bibtex
139
+ @article{Davis2011,
140
+ author = {Timothy A. Davis and Yifan Hu},
141
+ title = {The University of Florida Sparse Matrix Collection},
142
+ journal = {ACM Transactions on Mathematical Software},
143
+ volume = {38},
144
+ number = {1},
145
+ year = {2011},
146
+ doi = {10.1145/2049662.2049663}
147
+ }
148
+
149
+ @article{Kolodziej2019,
150
+ author = {Scott P. Kolodziej and Mohsen Aznaveh and Matthew Bullock and Jarrett David and Timothy A. Davis and Matthew Henderson and Yifan Hu and Read Sandstrom},
151
+ title = {The SuiteSparse Matrix Collection Website Interface},
152
+ journal = {Journal of Open Source Software},
153
+ volume = {4},
154
+ number = {35},
155
+ pages = {1244},
156
+ year = {2019},
157
+ doi = {10.21105/joss.01244}
158
+ }
159
+ ```
160
+
161
+ Individual matrices may have additional citations. See https://sparse.tamu.edu/ for per-matrix metadata.
162
+
163
+ ## License
164
+
165
+ CC-BY 4.0 (inherited from SuiteSparse Matrix Collection)