Skip to content

Raise ValueError on normalizing a zero ProbDist, keep the domains in RandomForest - #1400

Merged
dmeoli merged 2 commits into
masterfrom
fix/last-defects
Dec 2, 2026
Merged

dmeoli merged 2 commits into
masterfrom
fix/last-defects

Conversation

@dmeoli

@dmeoli dmeoli commented Dec 2, 2026

Copy link
Copy Markdown
Member

ProbDist.normalize raises ValueError on a total of 0, as rejection_sampling and likelihood_weighting already do, instead of ZeroDivisionError

the trees of RandomForest keep the attribute domains of the whole data set, so a tree still knows a value its bootstrap sample misses

test_value_iteration also checks that the pinned values, those at the stop, are within epsilon of the converged utilities

…RandomForest

ProbDist.normalize divided by a total of 0, and the bootstrap samples of
RandomForest lost the values of the attributes they did not contain. The
value iteration test also checks that the pinned values, those at the stop,
are within epsilon of the converged utilities.
@dmeoli
dmeoli marked this pull request as ready for review December 2, 2026 14:00
@dmeoli
dmeoli merged commit f2b817e into master Dec 2, 2026
4 checks passed
@dmeoli
dmeoli deleted the fix/last-defects branch December 2, 2026 14:00
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.

1 participant