Skip to content

error after reinstall #43

@robban80

Description

@robban80

Hi,
I have recently reinstalled my operating system and all python packages needed for the element-centric similarity score. When I rerun code that worked in my old setup I get an error.

I'm following the example here to compare two hierarchical clusterings:
https://github.com/Hoosier-Clusters/clusim/blob/master/examples/CluSim%20Examples%20-%20application%20with%20hierarchical%20clustering.ipynb

from clusim.clustering import Clustering, remap2match
import clusim.sim as sim

cinp = Clustering().from_scipy_linkage(l1, dist_rescaled = True)
cout = Clustering().from_scipy_linkage(l2, dist_rescaled = True)

elsim = sim.element_sim(cinp, cout, r=1.0, alpha=0.9)

and get the following error:

line 977, in print_elementcentric_similarity
elsim = sim.element_sim(cinp, cout, r=r, alpha=alpha)
File "/home/robert/.local/lib/python3.10/site-packages/clusim/clusimelement.py", line 60, in element_sim
result_tuple = element_sim_elscore(clustering1, clustering2, alpha=alpha,
File "/home/robert/.local/lib/python3.10/site-packages/clusim/clusimelement.py", line 130, in element_sim_elscore
clu_affinity_matrix1 = make_affinity_matrix(clustering1, alpha=alpha, r=r,
File "/home/robert/.local/lib/python3.10/site-packages/clusim/clusimelement.py", line 221, in make_affinity_matrix
cielg = make_cielg(clustering=clustering, r=r,
File "/home/robert/.local/lib/python3.10/site-packages/clusim/clusimelement.py", line 338, in make_cielg
cielg = igraph.Graph.Weighted_Adjacency(projected_adj.tolist(),
AttributeError: 'csr_matrix' object has no attribute 'tolist'. Did you mean: 'tolil'?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions