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

Amendments and additional test for PR #624 (issue #620) #630

Merged
merged 2 commits into from
Apr 13, 2017

Conversation

m-dz
Copy link
Contributor

@m-dz m-dz commented Apr 5, 2017

Amendments and additional test for PR #624 (issue #620).

format() is added to facets' labels (which I am not sure is needed, as it is more a matter of taste and consistency), without it test labels were as follows:

  1. "Subsample Ratio of Columns: 1e-04";
  2. "Subsample Ratio of Columns: 0.01";
  3. "Subsample Ratio of Columns: 1";

which is now changed to:

  1. "Subsample Ratio of Columns: 1e-04";
  2. "Subsample Ratio of Columns: 1e-02";
  3. "Subsample Ratio of Columns: 1e+00".

Also additional test for ordering of facets' labels is added and packages kernlab and xgboost are explicitly loaded as the "missing package" error message when using library() is much clearer compared to the whole call stack print without it:

Error message with library():

Failed -------------------------------------------------------------------------
1. Error: ggplot.train correctly orders factors (@test_ggplot.R#5) -------------
there is no package called 'kernlab'
1: library(kernlab) at [removed]\caret\pkg\caret/tests/testthat/test_ggplot.R:5
2: stop(txt, domain = NA)

and without:

Test ggplot: 1 package is needed for this model and is not installed. (kernlab). Would you like to try to install it now?1..

Failed -------------------------------------------------------------------------
1. Error: ggplot.train correctly orders factors (@test_ggplot.R#7) -------------

1: train(mpg ~ cyl + disp, data = mtcars, method = "svmRadial", tuneGrid = expand.grid(C = 1:2, 
       sigma = c(1e-04, 0.01, 1))) at [removed]\caret\pkg\caret/tests/testthat/test_ggplot.R:7
2: train.formula(mpg ~ cyl + disp, data = mtcars, method = "svmRadial", tuneGrid = expand.grid(C = 1:2, 
       sigma = c(1e-04, 0.01, 1))) at [removed]\caret\pkg\caret/R/train.default.R:217
3: train(x, y, weights = w, ...) at [removed]\caret\pkg\caret/R/train.default.R:912
4: train.default(x, y, weights = w, ...) at [removed]\caret\pkg\caret/R/train.default.R:217
5: checkInstall(models$library) at [removed]\caret\pkg\caret/R/train.default.R:251
6: stop() at [removed]\caret\pkg\caret/R/modelLookup.R:110

@m-dz
Copy link
Contributor Author

m-dz commented Apr 6, 2017

I can see that tests are failing on loading xgboost ("there is no package called 'xgboost'" in the Travis log), should I remove this test or the missing package can somehow be added?

topepo added a commit that referenced this pull request Apr 10, 2017
@topepo
Copy link
Owner

topepo commented Apr 10, 2017

I added xgboost to the travis installer code.

I'd like to avoid adding xgboost to the DESCRIPTION field so can you add an "skip on cran" flag on that particular test and then double check that R CMD check --as-cran doesn't complain?

topepo added a commit that referenced this pull request Apr 10, 2017
@topepo
Copy link
Owner

topepo commented Apr 10, 2017

Can you sync your repo? That will update the travis file on your end.

@m-dz
Copy link
Contributor Author

m-dz commented Apr 10, 2017

I will do my best!

@m-dz
Copy link
Contributor Author

m-dz commented Apr 10, 2017

After adding skip_on_cran() I was able to build the package and "almost successfully" check it with --as-cran with 3 distinct warnings:

and a "pdflatex is not available" error when building vignettes.

I would risk to say those can be ignored, but I would try to fix "pdflatex" anyway (I am not sure where to start as pdflatex --version is working correctly returning version 2.9.6211).

Edit: And apologies for the "Merge remote-tracking branch 'upstream/master' into fix_620-patch" commit, had to merge your master to my fix_620-patch. Now I think I could have amended the whole merging commit or something...

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.5%) to 16.997% when pulling 3008a10 on m-dz:fix_620-patch into bb1d58b on topepo:master.

@m-dz
Copy link
Contributor Author

m-dz commented Apr 10, 2017

Unfortunately it is xgboost again in NOT_CRAN="true" job, I will get back to it tomorrow evening (UTC).

@topepo
Copy link
Owner

topepo commented Apr 11, 2017

One easy fix would be to use another model that is not in xgboost as a test case, preferably one that is already in a package loaded by .travis.yml :-/

@m-dz
Copy link
Contributor Author

m-dz commented Apr 11, 2017

Yes, that is one way to go I thought about, but to test this we need to have a model with at least 3 parameters, preferably in the 0-1 interval, and if I remember right I could not find the right one in the packages already in travis. I will have a second look!

@topepo
Copy link
Owner

topepo commented Apr 11, 2017

Maybe RDA or polynomial SVMs?

@coveralls
Copy link

coveralls commented Apr 12, 2017

Coverage Status

Coverage increased (+0.07%) to 19.573% when pulling 142abb3 on m-dz:fix_620-patch into e5ae884 on topepo:master.

@coveralls
Copy link

coveralls commented Apr 12, 2017

Coverage Status

Coverage increased (+0.07%) to 19.573% when pulling 142abb3 on m-dz:fix_620-patch into e5ae884 on topepo:master.

@m-dz
Copy link
Contributor Author

m-dz commented Apr 12, 2017

Looks like everything is working, if you are happy with it I will clean the branch tomorrow (i.e. remove this PR and do another one with a single commit).

@topepo
Copy link
Owner

topepo commented Apr 12, 2017

Thanks

@topepo topepo closed this Apr 12, 2017
@topepo topepo reopened this Apr 12, 2017
@topepo
Copy link
Owner

topepo commented Apr 12, 2017

Ooops. Sorry to accidentally close it. I'd like to merge soon to get it into the CRAN submission tomorrow.

@coveralls
Copy link

coveralls commented Apr 12, 2017

Coverage Status

Coverage increased (+0.07%) to 19.573% when pulling 142abb3 on m-dz:fix_620-patch into e5ae884 on topepo:master.

@m-dz
Copy link
Contributor Author

m-dz commented Apr 12, 2017

Sure, I will prepare the new pull request tomorrow morning at the latest. Are you happy with all changes?

@topepo
Copy link
Owner

topepo commented Apr 12, 2017 via email

@coveralls
Copy link

coveralls commented Apr 12, 2017

Coverage Status

Coverage increased (+0.07%) to 19.573% when pulling 7967d20 on m-dz:fix_620-patch into aae4ee4 on topepo:master.

@m-dz
Copy link
Contributor Author

m-dz commented Apr 12, 2017

Should be ready to merge.

@topepo topepo merged commit 8d09280 into topepo:master Apr 13, 2017
@topepo
Copy link
Owner

topepo commented Apr 13, 2017

Thanks

@m-dz m-dz deleted the fix_620-patch branch April 14, 2017 21:49
@m-dz
Copy link
Contributor Author

m-dz commented Apr 14, 2017

It was a pleasure and a great exercise, thanks as well.

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

3 participants