rmnldwg / lymph

Python package for statistical modelling of lymphatic metastatic spread in head & neck cancer.
https://lymph-model.readthedocs.io
MIT License
5 stars 4 forks source link

package does not follow separation of concerns #44

Closed rmnldwg closed 10 months ago

rmnldwg commented 1 year ago

Currently, the Unilateral class handles passing spread probabilities to the Node instances to help it compute its trans_prob. But the Node class should be able to do that itself based on its incoming Edge instances.

rmnldwg commented 1 year ago

To wrap this up a little more:

  1. The class Unilateral should request transition probabilities from the Node class, and send new parameters to the Edge class.
  2. The Node class should request the parameters to compute its transition probability from the incoming Edge classes, and send the computed probability to the Unilateral class.
  3. The Edge class should receive new spread probabilities from the Unilateral class, and send then to the Node class it points to upon request.

That way, everything is nicely encapsulated and modular. For example, if we want to change the parametrization, we would only need to modify the implementation in the Unilateral class.

YoelPH commented 1 year ago

This is solved with the latest update. What has not been implemented so far is the splitting of the Node class into tumor node and LNL node (we can discuss this on Wednesday). Additionally I sampled both a trinary and binary model and achieved full conformity with the former model before the adaptations. --> Seems like the adaptations are fully functional, but tests still need to be developed for the new code. (To be done after discussion whether the implementation is fine)