Datasets:
Tasks:
Tabular Regression
Formats:
parquet
Size:
< 1K
ArXiv:
Tags:
sparse-matrices
linear-systems
preconditioners
numerical-linear-algebra
suitesparse
scientific-computing
License:
Update dataset card: fix repo ID, add tar.gz download instructions
Browse files
README.md
CHANGED
|
@@ -57,13 +57,15 @@ A curated subset of the [SuiteSparse Matrix Collection](https://sparse.tamu.edu/
|
|
| 57 |
```
|
| 58 |
.
|
| 59 |
├── README.md
|
| 60 |
-
├── manifest.parquet # Matrix metadata (
|
| 61 |
-
├──
|
| 62 |
-
|
| 63 |
-
│
|
| 64 |
-
│
|
| 65 |
-
│
|
| 66 |
-
│
|
|
|
|
|
|
|
| 67 |
└── benchmark_results/
|
| 68 |
└── benchmark_gnp_paper.jsonl # FGMRES benchmark with 6 preconditioners
|
| 69 |
```
|
|
@@ -103,23 +105,41 @@ All matrices originate from the [SuiteSparse Matrix Collection](https://sparse.t
|
|
| 103 |
|
| 104 |
## Usage
|
| 105 |
|
|
|
|
|
|
|
| 106 |
```python
|
| 107 |
-
|
|
|
|
| 108 |
from huggingface_hub import hf_hub_download
|
| 109 |
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
|
|
|
|
|
|
| 113 |
repo_type="dataset",
|
|
|
|
|
|
|
| 114 |
)
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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-
|
| 123 |
print(manifest["train"].to_pandas().head())
|
| 124 |
```
|
| 125 |
|
|
|
|
| 57 |
```
|
| 58 |
.
|
| 59 |
├── README.md
|
| 60 |
+
├── manifest.parquet # Matrix metadata (browsable in HF Dataset Viewer)
|
| 61 |
+
├── suitesparse_manifest.json # Full manifest with all 867 matrix metadata
|
| 62 |
+
├── suitesparse.tar.gz # All 867 matrices (1.8 GB compressed, ~5.7 GB extracted)
|
| 63 |
+
│ └── suitesparse/
|
| 64 |
+
│ ├── 2D_27628_bjtcai/
|
| 65 |
+
│ │ └── 2D_27628_bjtcai.mtx
|
| 66 |
+
│ ├── ACTIVSg2000/
|
| 67 |
+
│ │ └── ACTIVSg2000.mtx
|
| 68 |
+
│ └── ... # 867 matrix directories
|
| 69 |
└── benchmark_results/
|
| 70 |
└── benchmark_gnp_paper.jsonl # FGMRES benchmark with 6 preconditioners
|
| 71 |
```
|
|
|
|
| 105 |
|
| 106 |
## Usage
|
| 107 |
|
| 108 |
+
### Download and extract all matrices
|
| 109 |
+
|
| 110 |
```python
|
| 111 |
+
import subprocess
|
| 112 |
+
from pathlib import Path
|
| 113 |
from huggingface_hub import hf_hub_download
|
| 114 |
|
| 115 |
+
DATA_DIR = Path("data")
|
| 116 |
+
DATA_DIR.mkdir(exist_ok=True)
|
| 117 |
+
|
| 118 |
+
hf_hub_download(
|
| 119 |
+
repo_id="Csed-dev/matrixpfn-suitesparse",
|
| 120 |
repo_type="dataset",
|
| 121 |
+
filename="suitesparse.tar.gz",
|
| 122 |
+
local_dir=DATA_DIR,
|
| 123 |
)
|
| 124 |
+
subprocess.run(["tar", "xzf", str(DATA_DIR / "suitesparse.tar.gz"), "-C", str(DATA_DIR)], check=True)
|
| 125 |
+
(DATA_DIR / "suitesparse.tar.gz").unlink()
|
| 126 |
+
```
|
| 127 |
+
|
| 128 |
+
### Load a single matrix
|
| 129 |
+
|
| 130 |
+
```python
|
| 131 |
+
from scipy.io import mmread
|
| 132 |
+
|
| 133 |
+
matrix = mmread("data/suitesparse/ACTIVSg2000/ACTIVSg2000.mtx")
|
| 134 |
print(f"Shape: {matrix.shape}, NNZ: {matrix.nnz}")
|
| 135 |
```
|
| 136 |
|
| 137 |
+
### Browse the manifest
|
| 138 |
+
|
| 139 |
```python
|
| 140 |
from datasets import load_dataset
|
| 141 |
|
| 142 |
+
manifest = load_dataset("Csed-dev/matrixpfn-suitesparse", "manifest")
|
| 143 |
print(manifest["train"].to_pandas().head())
|
| 144 |
```
|
| 145 |
|