Coder Social home page Coder Social logo

mdbloice / pyrea Goto Github PK

View Code? Open in Web Editor NEW
20.0 2.0 3.0 226 KB

Multi-view clustering with flexible ensemble structures.

Home Page: https://pyrea.readthedocs.io

License: MIT License

Python 51.73% C++ 9.01% Jupyter Notebook 39.26%
clustering data-fusion multi-view enembles

pyrea's Issues

TypeError: np.matrix is not supported. Please convert to a numpy array with np.asarray.

Hi, when I use the package, I have the following issues:
code is:
d1 = np.random.rand(100,10)
d2 = np.random.rand(100,10)
d3 = np.random.rand(100,10)
data = [d1,d2,d3]
params = pyrea.parea_2_genetic(data, k_min=2, k_max=5)

it returns the error:
TypeError Traceback (most recent call last)
Cell In[14], line 1
----> 1 params_hierarchical = pyrea.parea_1_genetic(data, k_min=2, k_max=5, k_final=3, n_generations=10, n_population=10)

File ~/anaconda3/envs/eval/lib/python3.10/site-packages/pyrea/core.py:833, in parea_1_genetic(data, k_min, k_max, k_final, n_population, n_generations)
830 stats.register("max", np.max)
832 # Run the genetic algorithm
--> 833 pop, log = algorithms.eaSimple(population, toolbox, cxpb=0.7, mutpb=0.2, ngen=n_generations, stats=stats, halloffame=hall_of_fame, verbose=True)
835 print(f"\nSummary:\n{log}")
837 return hall_of_fame[0]

File ~/anaconda3/envs/eval/lib/python3.10/site-packages/deap/algorithms.py:151, in eaSimple(population, toolbox, cxpb, mutpb, ngen, stats, halloffame, verbose)
149 invalid_ind = [ind for ind in population if not ind.fitness.valid]
150 fitnesses = toolbox.map(toolbox.evaluate, invalid_ind)
--> 151 for ind, fit in zip(invalid_ind, fitnesses):
152 ind.fitness.values = fit
154 if halloffame is not None:

File ~/anaconda3/envs/eval/lib/python3.10/site-packages/pyrea/core.py:795, in parea_1_genetic..evaluate(individual)
792 with warnings.catch_warnings():
793 warnings.simplefilter("ignore")
--> 795 sil = parea_1(data,
796 individual[0],
797 individual[1],
...
839 xp, is_array_api_compliant = get_namespace(array)
841 # store reference to original array to check if copy is needed when
842 # function returns
TypeError: np.matrix is not supported. Please convert to a numpy array with np.asarray.

Do you know how to fix it?
Thanks.

Implementation Idea and pseudo-code analysis of HC-fused

Hi author, I read the pseudocode of the paper “A hierarchical clustering and data fusion approach for disease subtype discovery” you mentioned, but didn't quite understand how clusters c1 and c2 are obtained, and how in each view, each data is reused until there is only one cluster per view?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.