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

Fix galambox #220

Merged
merged 6 commits into from
Sep 19, 2024
Merged

Fix galambox #220

merged 6 commits into from
Sep 19, 2024

Conversation

lrnv
Copy link
Owner

@lrnv lrnv commented Sep 19, 2024

Should supplant #219 if @Santymax98 you agree ?

	modified:   src/UnivariateDistribution/ExtremeDist.jl
	modified:   test/Extreme_value_test.jl
@lrnv lrnv mentioned this pull request Sep 19, 2024
@Santymax98
Copy link
Contributor

I just checked, it's perfect... I had tried it quite a bit. I'm a little busy... I think this is good. We should look for which values ​​of the parameters give numerical problems, for example for galambos it was approximately "19.6"... it would be interesting to see if the same thing happens with other types of copulas and determine in which parameters the generation of samples begins to fail to repair it. So far I can't find it but it would be interesting.

@lrnv
Copy link
Owner Author

lrnv commented Sep 19, 2024

Maybe you could add here a test on the problematic parametrisation for galambos ?

@Santymax98
Copy link
Contributor

Are you referring to examples where the parameter is greater than 19.6? With this solution that we implemented we are getting good samples... for large parameters in fact for parameters greater than "75" which I believe is the maximum limit in the copula package of R.

@lrnv
Copy link
Owner Author

lrnv commented Sep 19, 2024

Yes exactly, maybe we should write that down in the tests ? So that if, someday, we modify the algorithm and the samples are not as good, we'll know about it imediately

@Santymax98
Copy link
Contributor

understood. I'm going to do it...

@lrnv
Copy link
Owner Author

lrnv commented Sep 19, 2024

Sorry I did not remember that you added an example in #219 ! I just added a test correpsonding to your example, is that enough in your oppinon ? If so we can merge.

@Santymax98
Copy link
Contributor

Santymax98 commented Sep 19, 2024

yes... I was doing this...

@testitem "small extreme sampling test" begin
    using Copulas, Distributions
    
    params = [20, 60, 70, 80, 120, 210]
    for θ in params 
        cop = GalambosCopula(θ)
        data = rand(cop, 10^4)
        
        # Check data size
        @test size(data) == (2, 100)
    end
    @test true
end

@lrnv
Copy link
Owner Author

lrnv commented Sep 19, 2024

I simply refactored the test files because they were very verbose. I'll wait for the online CI to go green and then I'll merge this. TY Santiago :)

@Santymax98
Copy link
Contributor

Santymax98 commented Sep 19, 2024 via email

@lrnv lrnv merged commit 4d31e10 into main Sep 19, 2024
5 checks passed
@lrnv lrnv deleted the fix_galambox branch September 19, 2024 17:08
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