You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I wonder if the integer division is really what’s wanted here.
In method log_likelihood line 26 with this part -(rd**2)/2/sigma2[i] since rd is an integer when I go through your test case I obtain 6.328759366440833e-15 instead of 1.2091379396665127e-07 the first time it hits line 26.
(at first rd is -1 so: (-1)²=1 -> 1/2=0 instead of 0.5)
Is this the desired behaviour ?
If this is the calculation of the normal distribution I think it should be a floating point division.
With floating point division I got a different result for the first day, then it converges.
yours -> mine
-102.65265035957913 -> -69.65648196168772
-1.9397850625546684 -> -1.9397850625546684
-2.1269280110429727 -> -2.1269280110429727
-0.6931471805599453 -> -0.6931471805599453
@pfmonville
I confirmed that, in the latest commit, result for the test is same as your result.
I'm not good at Ruby, so, thank you again for pointing out my mistake.
This file contains hidden or 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
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.
There is wrong statement in the function
log_likelihood.Specifically, there is an error in the calculation of the normal distribution, which I would like to correct with this request.