Metadata-Version: 2.4
Name: brainnet-graph
Version: 0.3.0.dev1
Summary: Source-aware ROI graph construction and method reference registry
Author: Songlin Zhao
License-Expression: MIT
Project-URL: PyPI, https://pypi.org/project/brainnet-graph/
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.26
Requires-Dist: scipy>=1.11
Provides-Extra: legacy
Requires-Dist: pandas; extra == "legacy"
Requires-Dist: torch; extra == "legacy"
Requires-Dist: torch-geometric; extra == "legacy"
Requires-Dist: scikit-learn; extra == "legacy"
Requires-Dist: tqdm; extra == "legacy"
Requires-Dist: matplotlib; extra == "legacy"
Requires-Dist: pingouin; extra == "legacy"
Requires-Dist: statsmodels; extra == "legacy"
Requires-Dist: seaborn; extra == "legacy"
Requires-Dist: lingam; extra == "legacy"
Provides-Extra: test
Requires-Dist: pytest>=8; extra == "test"
Dynamic: license-file

# BrainNet Graph

Development preview 0.3.0.dev1, based on the PyPI 0.2.2 source distribution. This is an alpha release, not a full reproduction of all listed methods.

The source-aware API indexes 63 methods: 24 local formula-level implementations and 39 reference-only guides. A reference-only entry is not an implemented estimator. Each `describe()` record includes papers, author-code findings, graph readouts, and limitations. The installed package also includes `METHODS_GUIDE.md`.

Install this explicit preview with `python -m pip install brainnet-graph==0.3.0.dev1`. Python 3.10 or newer is required.

```python
from brainnet_graph import BrainNetGraph

library = BrainNetGraph()
graph = library.compute("pearson_correlation", X)
graphs = library.compute("sliding_window_pearson", X, window_length=30)
guide = library.compute_or_guide("fbnetgen")
card = library.describe("fbnetgen")
```

Inputs are finite real arrays with shape `(T, N)`. Graph axes always preserve input ROI order. Timepoint, state, frequency, subject and layer axes are not interchangeable. Algorithms keep their native diagonals, signs, and directions; distance matrices remain distances. Correlation methods reject constant ROIs. No automatic filtering, thresholding, symmetrization or training occurs.

Core dependencies are NumPy and SciPy. Legacy `brainnet_graph.methods`, `construction`, and the `construct-graph` command require the `legacy` extra: `python -m pip install "brainnet-graph[legacy]==0.3.0.dev1"`. Their code is unchanged from 0.2.2; compatibility is source-level only and the heavy legacy environment has not been tested in this preview. The old cross-correlation function equals Pearson, old Granger returns p-values, and old Patel/generalised-synchronisation implementations have unresolved formula mismatches. Use the catalogue before scientific use.

This package retains the project's MIT licensing. Third-party implementations and model weights are not bundled; linked repositories retain their own licenses. Public availability of a repository is not permission to redistribute it.

The current project HOFC file is copied unchanged under `reference/project_hofc.py`. Its dHOFC returns an edge-space matrix. The new ROI API separately implements Zhao 2020 Eq. 5 and requires `paper_version="zhao2020_roi"`; it does not substitute the low-order intermediate or silently alter the old function. Project aHOFC is generally asymmetric and is labeled as the project variant.

The independent `brainnet_graph.reference.fbnetgen.FBNetGenAdapter` accepts an already loaded, trusted official model and training normalization. Its NumPy preprocessing has been tested; its PyTorch forward path has not. No weights or upstream FBNetGen code are bundled.
