Skip to content
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

Normalized cell divisions feature #69

Merged
merged 15 commits into from
Feb 21, 2024

Conversation

stefanhahmann
Copy link
Collaborator

This PR adds the new feature normalized cell division

Resolves #64

@stefanhahmann stefanhahmann force-pushed the normalized_cell_divisions_feature branch from c1d7e11 to ba9fda6 Compare January 24, 2024 11:51
@stefanhahmann stefanhahmann self-assigned this Jan 24, 2024
@stefanhahmann stefanhahmann force-pushed the normalized_cell_divisions_feature branch from efae600 to eec08ce Compare January 24, 2024 14:52
@stefanhahmann stefanhahmann requested review from maarzt and removed request for maarzt February 9, 2024 10:35
Copy link
Collaborator

@maarzt maarzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good code. Good unit tests. But I still see two problem:

  • A "+ 1" is needed for the computation of the branch duration to make it more consistent.
  • The algorithm for the computation of the branch duration and number of leaves is not efficient. You recompute similar values a lot. For example when computing the cell division frequency for this graph:
   A
  / \
 B   C
    / \
   D   E

The duration for branch spot D and E will be computed 3 times. The duration of branch spot C is computed 2 times. The same is done for the number of leaves. It would make sense to cache intermediate results.

@stefanhahmann
Copy link
Collaborator Author

Good code. Good unit tests. But I still see two problem:

* A "+ 1" is needed for the computation of the branch duration to make it more consistent.

* The algorithm for the computation of the branch duration and number of leaves is not efficient. You recompute similar values a lot. For example when computing the cell division frequency for this graph:
   A
  / \
 B   C
    / \
   D   E

The duration for branch spot D and E will be computed 3 times. The duration of branch spot C is computed 2 times. The same is done for the number of leaves. It would make sense to cache intermediate results.

Thanks for the advice.

  • I changed the +1 issue in duration
  • I eliminated redundant computation by using a caching approach similar as in branch n leaves feature.

…d of ObjPropertyMap

* Reasoning: ObjPropertyMap supports undo/redo, which is not required for a value cache that is only used during feature computation. Thus presumably RefObjectMap is a bit more performant
…settableFeatureComputer to an AbstractCancelableFeatureComputer

* Reasoning: partial re-computation of this feature is difficult, since results along the tree depend on each other.
Copy link

sonarcloud bot commented Feb 21, 2024

@stefanhahmann stefanhahmann merged commit f253959 into master Feb 21, 2024
3 checks passed
@stefanhahmann stefanhahmann deleted the normalized_cell_divisions_feature branch March 8, 2024 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Normalised number of cell divisions in track
2 participants