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

Add tests; make some minor code changes #20

Merged
merged 14 commits into from Feb 10, 2018
Merged

Conversation

lukesonnet
Copy link
Owner

@lukesonnet lukesonnet commented Feb 8, 2018

  1. Changes default returnopt to FALSE and actually returns it when the user wants it. We could remove this later if we want, but I think returning the value and the optim metadata is useful for people trying different hyperparameters.

  2. Makes the package overall a bit more CRAN friendly. Much more has to be done here, but just in terms of how we import, export, and register functions. This is because the previous solution throws warnings in R CMD check, which will slow down CRAN submission. Note, it looks like someone already did this in July for the main branch of KRLS to keep it on CRAN.

  3. Adds tests. The important one demonstrates that indeed the analytical gradient and hessian we have in the .cpp are correct, using numerical derivatives to test. You can see this in tests/testthat/test_krlogit_fns.R

  4. Extends our CI to include test coverage and more R releases and operating systems.

@lukesonnet lukesonnet merged commit 37f2384 into master Feb 10, 2018
@lukesonnet lukesonnet deleted the lukesonnet/tests branch February 10, 2018 20:26
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.

None yet

1 participant