-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update based on some recent developments #379
Conversation
* parallelization working * updating tests * styling * updating test * added info about parallelization
* added prior sampling * updating news * deleting submission file * fixing the prior sampling * styling * added unit test for SMC starting from prior * added test for sample_prior * updating test after merging with TBB * styling * updating news
* fixing item name issue * updating a unit test * styling
* added handling of vector data #361 * styling
* updated set_priors function * closes #370
* updated set_priors function * closes #370 * fixed forgotten implementation
@wleoncio the CodeFactor issues look like false positives to me, since the code it is referring to is in |
Sure, we could add something like this to the top level (no indent) of codecov.yml ignore:
- "work-docs" |
Strange. Maybe CF is not even reading the config file? 🤔 |
Just edited https://www.codefactor.io/repository/github/ocbe-uio/bayesmallows/ignore accordingly, maybe that'll do it. |
Could it be so that it checks the config file that is on the master branch?? |
I'm not even sure it's reading any file at all. On my other projects I don't even have a config file for CodeFactor 😅 |
Anyway, we can address all code smells on a different PR, I'll review the code now. |
pi <- compute_posterior_intervals(mod2) | ||
expect_equal(pi$parameter, "alpha") | ||
expect_equal(pi$median, "2.744") | ||
expect_equal(pi$hpdi, "[2.015,3.476]") | ||
expect_equal(pi$central_interval, "[2.047,3.530]") | ||
expect_equal(pi$median, "2.745") | ||
expect_equal(pi$hpdi, "[2.009,3.517]") | ||
expect_equal(pi$central_interval, "[2.016,3.519]") | ||
|
||
mod3 <- update_mallows( | ||
mod2, | ||
new_data = setup_rank_data(potato_visual[10:12, ]) | ||
) | ||
|
||
pi <- compute_posterior_intervals(mod3, decimals = 2) | ||
expect_equal(pi$hpdi, "[2.18,3.75]") | ||
expect_equal(pi$hpdi, "[2.23,3.74]") | ||
pi <- compute_posterior_intervals(mod3, parameter = "rho") | ||
expect_equal(pi$hpdi[[20]], "[1,5]") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is alright, but for future-proofing, perhaps we could compare numbers with a high tolerance (like 0.1)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I just have to figure out the random number generation stuff on my M1 mac. On all other platforms the results are reproduced, but M1 mac seems to work differently, even though I use Rcpp's random number generators which are designed to by platform independent. I don't know if it's the RNGs fault or if there are differences in floating point representations or something like that which causes the input to the functions for generating random numbers to differ. I think my next laptop will run Linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job!
No problem, looks good. We'll fight CodeFactor later... |
No description provided.