-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 1.0.0.rc1 #76
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A first version has been produced with central tumor locations that seems to work out. Further refinement of the module comming in next push
The midline model was further expanded to have similar funcitonalities as the old model. Additionally, the code style was made more conformal with the bilateral module. Right now the code is not functional.
The new modality sync makes sure that both models stay updated
New key assignment for midline model where 'ipsi' is removed to ensure correct assignment
fixed the non mixture midline extension model and added documentation
We have added a mixin class that allows the delegation and synchronization of attributes. This may replace the convoluted and unreadable callback functions we used to sync some properties Related: #74
Two new helper function in relation to getting and setting params.
The API of all `get_params()` methods is now nice and uniform, allowing arbitrary chaining of these methods. BREAKING CHANGE: The `get_params()` methods don't accept the `param` argument anymore.
The API of all `set_params()` methods is now nice and uniform, allowing arbitrary chaining of these methods. BREAKING CHANGE: The `assign_params()` method has been removed and some `set_params()` methods work differently than before.
It does make sense to "use up" the positional arguments one by one in the `set_params()` methods, but doing the same thing with keyword arguments is pointless, difficult and error prone. BREAKING CHANGE: `set_params()` only returns one tuple of floats.
In the `Edge` class, the `name` property is replaced by a function `get_name()` that is more flexible and allows us to have edge names without underscores when we need it. BREAKING CHANGE: `Edge.name` is replaced by `Edge.get_name()`
This will once again manage the symmetry of the `Bilateral` class's different ipsi- and contralateral attributes.
Instead of a dict that holds the T-stages and corresponding distributions over diagnose times, this implements them as a composite pattern. This replaces the dict-like API entirely with methods. This has several advantages: 1. It is more explicit and thus more readable 2. The composite pattern is designed to work naturally with tree-like structures, which we have here when dealing with bilateral models. 3. This separates a lot of the logic into separate abstract classes, further separating concerns. BREAKING CHANGES: The old API of setting and getting distributions will not work anymore.
Instead of a dict that holds the names and corresponding sens/spec for diagnostic modalities, this implements them as a composite pattern. This replaces the dict-like API entirely with methods. This has several advantages: 1. It is more explicit and thus more readable 2. The composite pattern is designed to work naturally with tree-like structures, which we have here when dealing with bilateral models. 3. This separates a lot of the logic into separate abstract classes, further separating concerns. BREAKING CHANGES: The old API of setting and getting modalities will not work anymore.
I added an abstract base class from which all model-like classes should inherit. It defines all the methods that need to be present in a model. The idea behind this is that any subclass of this can be part of a composite that correctly delegates getting/setting parameters, diagnose time distributions, and modalities.
… 'dev' This unexpectedly turned out to be another large refactoring of much of the codebase... However, now the management of the modalities and the distributions over diagnose times both are implemented using a composite pattern. This also decouples the respective logics from the individual models. Eventually, this should also allow one to build mixtures of these models and just use setters and getters of diagnose distributions and modalities without much changes. Another big feature of this merge is that the midline model is now back again! Though it is still largely untested and it is still lacking the treatment of the midline extension as a random variable. Fixes: #74
The `Unilateral, `Bilateral`, and `Midline` model now all have the six methods `set_tumor_spread_params`, `set_lnl_spread_params`, `set_spread_params`, `set_params`, `get_tumor_spread_params`, `get_lnl_spread_params`, `get_spread_params`, and `get_params`.
The midline evolution that Lars Widmer worked on is now reimplemented. However, although this implementation is analogous to the one used in previsou version of the code and should thus work, it is still untested at this point.
The new helper function`draw_diagnoses` is a re-implementation of the `Unilateral` class's method with the same name for easier reusing.
This is implemented differently than before: If data with unknown midline extension is added, it gets loaded into an attribute named `unknown`, which is a `Bilateral` model only used to store that data and generate diagnose matrices.
Some bugs in the method for drawing synthetic patients from the `Midline` were fixed. This seems to be working now.
The parameters of call signatures now each get their own line, making it much more readable.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.