Metadata-Version: 2.4
Name: xgi_optimized
Version: 0.11
Summary: XGI extension for faster hypergraph operations
Author: Evgeniyy2004a, TimurPshITMO, Samoylo57
Author-email: MrDragar <yshhenyaev@mail.ru>
Maintainer: Evgeniyy2004a, TimurPshITMO, Samoylo57
Maintainer-email: MrDragar <yshhenyaev@mail.ru>
License-Expression: BSD-3-Clause
Project-URL: Documentation, https://xgi.readthedocs.io/en/stable/
Project-URL: Bug Reports, https://github.com/xgi-org/xgi/issues
Project-URL: Source, https://github.com/xgi-org/xgi
Project-URL: PyPI, https://pypi.org/project/xgi/
Project-URL: GitHub Discussions, https://github.com/xgi-org/xgi/discussions
Keywords: igraph,C++,networks,higher-order,higher-order network,hypergraph,simplicial complex,network science
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.23.5
Requires-Dist: scipy>=1.15
Requires-Dist: pandas>=1.3
Requires-Dist: networkx>=2.7
Requires-Dist: requests>=2.0
Requires-Dist: matplotlib>=3.4
Requires-Dist: seaborn>=0.10
Requires-Dist: igraph>=0.11.8
Requires-Dist: pybind11>=2.13.6
Requires-Dist: xgi
Provides-Extra: benchmark
Requires-Dist: pytest>=7.2; extra == "benchmark"
Requires-Dist: pytest-benchmark>=5.0; extra == "benchmark"
Provides-Extra: developer
Requires-Dist: black[jupyter]>=24.3; extra == "developer"
Requires-Dist: isort==5.10.1; extra == "developer"
Requires-Dist: pylint>=3.0; extra == "developer"
Requires-Dist: nbqa; extra == "developer"
Provides-Extra: docs
Requires-Dist: sphinx~=6.0; extra == "docs"
Requires-Dist: sphinx_copybutton; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.2; extra == "docs"
Requires-Dist: numpydoc>=1.1; extra == "docs"
Requires-Dist: pillow>=8.2; extra == "docs"
Requires-Dist: matplotlib>=3.3; extra == "docs"
Requires-Dist: sphinx-design; extra == "docs"
Requires-Dist: ipykernel; extra == "docs"
Requires-Dist: nbsphinx; extra == "docs"
Requires-Dist: nbsphinx-link; extra == "docs"
Requires-Dist: pydata-sphinx-theme; extra == "docs"
Requires-Dist: sphinx-gallery; extra == "docs"
Provides-Extra: release
Requires-Dist: twine>=3.4; extra == "release"
Requires-Dist: build>=1.2.1; extra == "release"
Requires-Dist: wheel>=0.36; extra == "release"
Provides-Extra: test
Requires-Dist: pytest>=7.2; extra == "test"
Requires-Dist: pytest-cov>=4.0; extra == "test"
Provides-Extra: tutorial
Requires-Dist: jupyter>=1.0; extra == "tutorial"
Requires-Dist: ipython<=8.12.0; extra == "tutorial"
Provides-Extra: all
Requires-Dist: xgi_optimized[benchmark,developer,docs,release,test,tutorial]; extra == "all"

### What has been done?: ###
- [Metrics computation has been updated](#updated-metrics-calculation)
- [The implementation of bipartite graphs has been changed](#getting-started)
- [Application of graph and hypergraph metrics to improve ML models](#graph-usage)
- [Cpp implementation of linegraph](#cpp-imp)


## Metrics computation has been updated<a id="updated-metrics-calculation"></a>

The computation of the linegraph vector centrality metric was accelerated by using the igraph library instead of networkx . For comparison, implementations using the networkx.Graph class were retained.
```python
H_enron = xgi.load_xgi_data("plant-pollinator-mpl-034")
H_enron_cleaned = H_enron.cleanup(
    multiedges=False, singletons=False, isolates=False, relabel=True, in_place=False
)
start_time = time.time()

xgi.centrality.line_vector_centrality(H_enron_cleaned)

middle_time = time.time()

xgi.centrality.fast_line_vector_centrality(H_enron_cleaned)

end_time = time.time()

print(f"Время выполнения nx: {(middle_time-start_time):.6f} секунд")
print(f"Время выполнения ig: {(end_time-middle_time):.6f} секунд")
```

## The implementation of bipartite graphs has been changed. <a id="getting-started"></a>
The implementation for working with bipartite graphs was modified: the igraph.Graph class is 
now used instead of networkx.Graph for converting from a Hypergraph to a bipartite graph and back to a Hypergraph .
```python
hg = xgi.Hypergraph()
hg.add_edges_from(
    [[1, 2, 3], [3, 4, 5,8], [1, 4, 10, 11, 12], [7,0,8], [5,7,2]]
)

bpg = xgi.convert.to_bipartite_graph(hg)
plot(bpg,vertex_label=bpg.vs.indices,layout = Graph.layout_bipartite(bpg), bbox=(0, 0, 500,500))
```

## Application of graph and hypergraph metrics to improve ML models<a id="graph-usage"></a> 
[In the file](https://github.com/Samoylo57/iHyperGraph/blob/Matvei/OGBN-MAG/ogbn-mag.ipynb)
 for solving the classification problem, in addition to 
article embeddings, article identifiers, and author IDs used as features, 
metrics such as eigenvector centrality of the graph and vector centrality of 
the hypergraph were also utilized.

## Cpp implementation of linegraph<a id="cpp-imp"></a>
* **In progress...**
