Skip to content

Enable bounds for multiple LR-systems at once#78

Closed
LvdHam wants to merge 1 commit intomainfrom
bounds_compatible_with_mcmc
Closed

Enable bounds for multiple LR-systems at once#78
LvdHam wants to merge 1 commit intomainfrom
bounds_compatible_with_mcmc

Conversation

@LvdHam
Copy link
Contributor

@LvdHam LvdHam commented Nov 25, 2025

Add support for multiple LR-systems during bounding, required for LR-systems based on MCMC-simulations.

Copy link
Contributor

@wowtor wowtor left a comment

Choose a reason for hiding this comment

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

Deze PR moet het makkelijker maken om de bounds voor meerdere systemen in eens te berekenen.

Ik mis denk ik wat context. Hoe zou dit toegepast moeten worden in een pipeline? En is dit alleen voor MCMC relevant of ook andere systemen? Zo nee, is dit onnodig ingrijpend voor alle andere systemen? Misschien is het eenvoudiger om het systeem binnen MCMC op te lossen. Of een parallelle set bounders op te zetten die het allemaal in een keer doen en dat ook efficient kunnen. Wat betreft de implementatie vind ik dat er veel impliciete semantiek in zit, wat code complexer en foutgevoeliger maakt.

Comment on lines +59 to +60
self.lower_llr_bound = np.ones(llrs.shape[1]) * np.nan
self.upper_llr_bound = np.ones(llrs.shape[1]) * np.nan
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.lower_llr_bound = np.ones(llrs.shape[1]) * np.nan
self.upper_llr_bound = np.ones(llrs.shape[1]) * np.nan
self.lower_llr_bound = np.empty(llrs.shape[1])
self.upper_llr_bound = np.empty(llrs.shape[1])

def calculate_bounds(self, llrs: np.ndarray, labels: np.ndarray) -> tuple[float | None, float | None]:
def calculate_bounds(
self, llrs: np.ndarray, labels: np.ndarray
) -> tuple[float | np.ndarray | None, float | np.ndarray | None]:
Copy link
Contributor

Choose a reason for hiding this comment

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

Dit is een abstract method die een andere return type geeft. Alle subklassen moeten dit weten en aangepast worden zodat ze hier mee om kunnen gaan. Is dat echt nodig?

@LvdHam
Copy link
Contributor Author

LvdHam commented Nov 26, 2025

Ik heb nu geprobeerd het op een andere manier in NetherlandsForensicInstitute/lr_module_scratch#15 op te lossen. Lijkt dat jouw een betere aanvliegroute?

@LvdHam LvdHam marked this pull request as draft November 26, 2025 14:29
@wowtor
Copy link
Contributor

wowtor commented Nov 27, 2025

Ik heb nu geprobeerd het op een andere manier in NetherlandsForensicInstitute/lr_module_scratch#15 op te lossen. Lijkt dat jouw een betere aanvliegroute?

Ik zou voor die route kiezen inderdaad, omdat ik denk dat het eenvoudiger is, en beter te begrijpen.

@LvdHam
Copy link
Contributor Author

LvdHam commented Dec 2, 2025

Via de andere route geimplementeerd

@LvdHam LvdHam closed this Dec 2, 2025
@LvdHam LvdHam deleted the bounds_compatible_with_mcmc branch December 2, 2025 10:29
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.

2 participants