mdbloice / pyrea Goto Github PK
View Code? Open in Web Editor NEWMulti-view clustering with flexible ensemble structures.
Home Page: https://pyrea.readthedocs.io
License: MIT License
Multi-view clustering with flexible ensemble structures.
Home Page: https://pyrea.readthedocs.io
License: MIT License
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.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.