Giter Club home page Giter Club logo

pykda's Issues

Feedback

@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.

Docs

Code

  • Style:
    • Ik zou 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.
  • Typing:
    • np.ndarray or list[list] or str -> Union[np.ndarray, list[list], str] of je kunt | gebruiken
    • Vanaf Python 3.9 kun je list gebruiken in plaats van typing.List. Zelfde met dict en tuple.
    • -> None output kun je weglaten, dat is namelijk impliciet
  • Features
    • Heb je 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.
    • normalizer argument wordt niet gebruikt in load_predefined_transition_matrix
      • In 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.
      • normalizer_type = Callable[[np.ndarray], np.ndarray]
    • Het 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.

Test in Python 3.12

Add to the testing workflow on Github that it is also tested in Python 3.12.

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.