joostberkhout / pykda Goto Github PK
View Code? Open in Web Editor NEWPython package for the Kemeny Decomposition Algorithm (KDA) together with some Markov chain tooling.
Home Page: https://joostberkhout.github.io/PyKDA/
License: MIT License
Python package for the Kemeny Decomposition Algorithm (KDA) together with some Markov chain tooling.
Home Page: https://joostberkhout.github.io/PyKDA/
License: MIT License
Hé @JoostBerkhout, ik dacht het is wel zo makkelijk om feedback op Github te doen - dan kan ik ook refereren naar code en kunnen we dit interactiever bespreken.
CITATION.cff
file toe te voegen aan je repository. Zie https://github.com/N-Wouda/ALNS/blob/master/CITATION.cff. Dan krijg je citation data in de sidebar.Markov_chain.py
veranderen naar MarkovChain.py
or markov_chain.py
. Eerste is PascalCase' stijl en tweede is Python stijl. De huidige file name zit er tussenin en valt buiten de conventies.cached_property
echt nodig op je MarkovChain class? Ik ken je algoritme niet dus ik weet niet hoe vaak bepaalde properties worden aangeroepen. Maar MarkovChain
heeft veel internal state en lijkt redelijk vaak te updaten. cached_property
cachet een property, maar als je interne variabelen veranderen, dan wordt dit dus niet meer geupdated. Een robustere design keuze is om niet te cachen en om property
te gebruiken.
Line 65 in 166c6e4
normalizer
argument wordt niet gebruikt in load_predefined_transition_matrix
normalizer.py
kun je normalizer_type = Callable[[np.ndarray], np.ndarray]
het best bovenaan zetten (is meteen duidelijk) en hebt best met _
prefix odat je daarmee niet perongeluk user variables overschrijft. Dus _normalizer_type
.Line 95 in 166c6e4
KDA
algoritme neemt nu als input een markov chain en slaat deze op, en past dit telkens aan als je run
aanroept. Een robuustere interface is als volgt: je slaat de MC chain niet op, maar geeft dit mee als argument in run
. Als output krijg je je nieuwe MC terug. Hetzelfde kun je doen met cut_edges
.
Line 43 in 166c6e4
Add to the testing workflow on Github that it is also tested in Python 3.12.
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.