https://github.com/axsk/pccaplus.jl
Julia implementation of PCCA+
https://github.com/axsk/pccaplus.jl
julia package pcca zib
Last synced: 2 days ago
JSON representation
Julia implementation of PCCA+
- Host: GitHub
- URL: https://github.com/axsk/pccaplus.jl
- Owner: axsk
- License: mit
- Created: 2021-11-03T16:47:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-15T11:18:02.000Z (over 1 year ago)
- Last Synced: 2025-02-20T21:18:09.407Z (over 1 year ago)
- Topics: julia, package, pcca, zib
- Language: Julia
- Homepage:
- Size: 130 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.bib
Awesome Lists containing this project
README
# PCCAPlus
[](https://axsk.github.io/PCCAPlus.jl/stable)
[](https://axsk.github.io/PCCAPlus.jl/dev)
[](https://github.com/axsk/PCCAPlus.jl/actions/workflows/CI.yml?query=branch%3Amain)
[](https://codecov.io/gh/axsk/PCCAPlus.jl)
A [KISS](https://en.wikipedia.org/wiki/KISS_principle) style implementation of PCCA+ (Robust Perron Cluster Analysis) [1,2] with support for non-reversible systems [3].
For a similar python implementation see also the [cmdtools](https://github.com/zib-cmd/cmdtools/) package.
## Basic usage
```julia
using PCCAPlus
P=rand(10,10)
P = P ./ sum(P, dims=2) # row stochastic matrix
# basic PCCA+ clustering with 2 clusters (using no weighting and the ISA initial guess only)
chi = pcca(P, 2)
using KrylovKit
using SparseArrays
P = sprand(100,100, 0.1)
P = P ./ sum(P, dims=2) # sparse row stochastic matrix
# solve the PCCA+ problem weighted with the stationary density
# and optimize for crispness, using the KrylovKit.jl eigensolver
chi = pcca(P, 2; pi=:stationary, optimize=true, solver=KrylovSolver())
```
For sparse matrix support, add either the `ArnoldiMethod.jl` or `KrylovKit.jl` and pass the corresponding `ArnoldiSolver()` or `KrylovSolver()` as a solver.
## References
1. [2006, M. Weber: Meshless Methods in Conformation Dynamics](https://opus4.kobv.de/opus4-zib/frontdoor/deliver/index/docId/1023/file/promotionweber.pdf)
2. [2013, S. Röblitz, M. Weber: Fuzzy Spectral Clustering by PCCA+](https://doi.org/10.1007/s11634-013-0134-6)
3. [2018, K. Fackeldey, A. Sikorski, M. Weber: Spectral Clustering for Non-Reversible Markov Chains](https://doi.org/10.1007/s40314-018-0697-0)