Hoosier-Clusters / clusim

An extended package for clustering similarity
MIT License
63 stars 15 forks source link

Error in 'CluSim Examples - basic element-centric similarity.ipynb' #22

Closed rajat-kabra-sp closed 5 years ago

rajat-kabra-sp commented 5 years ago

In example, 'CluSim Examples - basic element-centric similarity.ipynb' when the second cell is executed, there is an error saying that name 'make_phctag' is not defined. The function 'make_phctag' is not available at the location specified or anywhere else in the code

screen shot 2018-09-28 at 12 04 53 pm

.

rajat-kabra-sp commented 5 years ago

I can see in the code that there is a function in clusimelement.py that is make_cielg. Is it a simple renaming issue?

rajat-kabra-sp commented 5 years ago

Same type of error is in other notebooks too.

Error

~/Library/Python/3.6/lib/python/site-packages/clusim/sim.py in sample_expected_sim(clustering1, clustering2, measure, random_model, n_samples, keep_samples) 817 n_elements=clustering1.n_elements, n_clusters=clustering1.n_clusters, 818 clu_size_seq=clustering1.clu_size_seq, random_model=random_model, --> 819 tol=1.0e-15) for isample in range(nsamples)] 820 821 if '1' in random_model: NameError: name 'nsamples' is not defined

In the code on github,  random_clustering1_list = [clugen.make_random_clustering(  # TODO: func undefined         n_elements=clustering1.n_elements, n_clusters=clustering1.n_clusters,         clu_size_seq=clustering1.clu_size_seq, random_model=random_model,         tol=1.0e-15) for isample in range(n_samples)]

Is it nsamples and n_samples problem?

ajgates42 commented 5 years ago

Hi rajat-kabra-sp.

Yes, these are just naming problems between versions. I'm sorry for the inconvenience. I think I have now fixed them all in the GitHub and released a new pypi version, but please let me know if any further issues arise.