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

Allow `Tumor` nodes to have states (aka T-categories) as well #66

Open rmnldwg opened 6 months ago

rmnldwg commented 6 months ago

Given our new implementation of the graph representation and particularly the Tumor node implementation, it should be straightforward to enable tracking a tumor's T-category as a random variable:

We basically need to give the Tumor node the allowed_states = [0, 1, 2, 3, 4] and add an Edge instance that has this Tumor node both as start and as end (similar to the growth edges). This edge would then be parametrized with a probability that during one time-step the T-category increases by one.

If then functions like the generate_transition() don't just iterate over LNLs, but over all nodes and consider their possible evolutions, this Tumor node's state would be automatically incorporated and tracked as a random variable, just like all other LymphNodeLevel node's states.

When tracking T-category as a random variable, the distributions over diagnose times make no sense anymore and we would need to define a "diagnosis probability" that depends on all the node's states. We discussed this idea already.