Comments (6)
That's good to know this. I'm happy for the issue to be closed. We know what the issue is and can avoid creating problematic hypergraphs. A warning from the Julia interface could be useful to help others diagnose such issues.
from kahypar.jl.
Hi,
thanks for reaching out.
@jalving I currently don't have a working Julia installation available and I am not familiar with SparseArrays
. Do you have any thoughts on would could have gone wrong here?
I first guess would be that this creates a hypergraph that does not adhere to the hMetis format (see http://glaros.dtc.umn.edu/gkhome/fetch/sw/hmetis/manual.pdf Section 3.4).
from kahypar.jl.
Hi @SebastianSchlag , thanks for your reply. I looked into the hypergraph structure a little more and found there are many vertices that did not have any edges connected and many edges that do not connect any vertices. After removing these it is working. See example
using KaHyPar
using CSV
using DataFrames
using SparseArrays
df = CSV.read("problem_matrix.csv", DataFrame)
A = sparse(df.rows, df.cols, df.values)
non_empty_rows = findall(x -> x != 0, [nnz(A[i,:]) for i in 1:size(A)[1]])
non_empty_cols = findall(x -> x != 0, [nnz(A[:,i]) for i in 1:size(A)[2]])
B = A[non_empty_rows,non_empty_cols]
h = KaHyPar.hypergraph(B)
partitions = KaHyPar.partition(h, 2, configuration=:edge_cut)
from kahypar.jl.
Great! Thanks for clarifying. 👍 In genreal, vertices without any edges should not be a problem. However "empty" hyperedges won't work. Would it be okay to close this issue then?
from kahypar.jl.
@SebastianSchlag Thanks for addressing this so quickly. If it works for a correct hypergraph I think we can close.
It might be worth adding some input checks on the hypergraph structure. I could add this to the Julia interface unless you think input checking should go into the KaHyPar source.
from kahypar.jl.
Hi @jalving, if you find the time, I think it would be cool if you could add some general sanity checks to the Julia interface - then users could get native error messages in case the hypergraph is inconsistent.
from kahypar.jl.
Related Issues (17)
- Improve initial partition with fixed vertices HOT 15
- Testing KaHyPar mistakes HOT 2
- I try it in linux. Still have problem. I tried julia 1.05 and Julia 1.54. It failed to clone. HOT 5
- Registration HOT 14
- TagBot trigger issue HOT 4
- feature request: non-integer edge weights HOT 3
- How to turn off runtime messages HOT 5
- Can not load KaHyPar shared object file HOT 10
- macOS support HOT 3
- Partition based on minimizing the number of edge cuts HOT 4
- in partition occurs signal (11): Segmentation fault: 11 HOT 3
- KaHyPar.jl not supported for Julia on MacBook M1 HOT 7
- Partition leads to invalid object identifier error [KaHyPar v1.3.0] HOT 5
- ERROR: LoadError: UndefVarError: libkahypar not defined HOT 5
- Clarify macOS instructions HOT 1
- Bug report. Platform not support 'x86_64-w64-mingw32'. Thank you. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kahypar.jl.