Comments (6)
Thank you very much for your feedback.
This has been fixed (please check the develop branch; will be available in the next release).
from scikit-network.
Thank you so much for your prompt response! I updated the functions in the hierarchy module, but am running into another error:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-50-33674d51a39e> in <module>
----> 1 labels = cut_straight_dev(dendrogram, n_clusters=100, return_dendrogram=True)
<ipython-input-7-adb9d8c1d297> in cut_straight_dev(dendrogram, n_clusters, threshold, sort_clusters, return_dendrogram)
92 cluster[n + t] = cluster.pop(i) + cluster.pop(j)
93
---> 94 return get_labels_dev(dendrogram, cluster, sort_clusters, return_dendrogram)
<ipython-input-7-adb9d8c1d297> in get_labels_dev(dendrogram, cluster, sort_clusters, return_dendrogram)
19 current_cluster_new = len(clusters)
20 for i, j, height, _ in dendrogram:
---> 21 i_new = cluster_index.pop(int(i))
22 j_new = cluster_index.pop(int(j))
23 if i_new != j_new:
KeyError: 59725
Since there are several inf
values in the height column of my dendrogram, reorder_dendrogram
is comparing two rows with the same inf
height, and thus the order of the dendrogram doesn't change. The cut
variable in cut_straight()
is also equal to inf
.
This KeyError occurs the first time if i_new != j_new:
is True
in get_labels()
. Could this have to do with how my dendrogram is ordered?
Please let me know if I can clarify anything!
from scikit-network.
Hard to debug without the dendrogram
variable. Is there a way to share it?
from scikit-network.
Yes I just emailed the dendrogram to you, let me know if you have issues with opening it!
from scikit-network.
Hi @ninasachdev
I seems that there is an inversion in your dendrogram (on row 5663, the merge is done at a height lower that those of the clusters), causing the error in the cut.
So the problem is probably in the generation of the dendrogram. Could you please send me the original graph?
Thanks.
from scikit-network.
I'm closing this issue. Feel free to reopen it if needed.
from scikit-network.
Related Issues (20)
- Feature Request - Graph Isomorphism HOT 1
- Confusing results from shuffle_nodes in Louvain algorithm HOT 4
- Cannot load package HOT 4
- data.load_edge_list is missing in 0.26.0 version HOT 1
- Single commodity flow feature HOT 1
- umpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObjec HOT 5
- python -m pip install scikit-network/ fails because it is looking for /triangles.cpp: HOT 1
- Installing the latest version HOT 2
- Verbose argument not expected in regression.Dirichlet fit_transform method though in description HOT 4
- Original node name mappings HOT 1
- PageRank-based recommendations HOT 1
- module 'sknetwork.data' has no attribute 'from_edge_list' HOT 5
- KMeans does not work with numpy.ndarray HOT 1
- Feature Request GNN for KNN HOT 7
- Error installing on Linux for Python 3.11 HOT 2
- cython: linetrace=True causes TypeError: 'NoneType' object is not callable error HOT 8
- from sknetwork.utils import edgelist2adjacency, edgelist2biadjacency HOT 1
- do you have some where description for bimodularity HOT 5
- From Louvain to Leiden: guaranteeing well-connected communities. HOT 2
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 scikit-network.