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

Warnings in hard_case_DMRnet_insurance.R #33

Closed
SzymonNowakowski opened this issue Sep 21, 2022 · 5 comments
Closed

Warnings in hard_case_DMRnet_insurance.R #33

SzymonNowakowski opened this issue Sep 21, 2022 · 5 comments
Assignees
Labels
0.3.1 DMRnet version 0.3.1 0.3.2 DMRnet version 0.3.2 bug Something isn't working

Comments

@SzymonNowakowski
Copy link
Owner

There was a warning

Warning message:
In min(sp[[kt]][sp[[kt]] != 1]) :
  no non-missing arguments to min; returning Inf

in tests conducted for 0.3.1 version (see the relevant tag)

@SzymonNowakowski SzymonNowakowski added bug Something isn't working 0.3.1 DMRnet version 0.3.1 labels Sep 21, 2022
@SzymonNowakowski SzymonNowakowski self-assigned this Sep 21, 2022
@SzymonNowakowski SzymonNowakowski changed the title Warnings in hard_case_DMRnet_insurance Warnings in hard_case_DMRnet_insurance.R Oct 2, 2022
@SzymonNowakowski
Copy link
Owner Author

SzymonNowakowski commented Oct 2, 2022

Not observed in hard_case_DMRnet_insurance.R results for 0.3.2. Maybe a different machine was involved. See the relevant link for this tag

Action: Check if it is the computer settings related to warning printout that are involved in printing/not printing this warning.
Action: try repeating the commit 3091ad4 hard_case... tests

@SzymonNowakowski
Copy link
Owner Author

I rerun the tests for commit 3091ad4 on three machines: dw, dr and dg. The tests on dw and dr were positive (=reproduced the issue) , while the test on dg was not (=not reproduced). It is unclear for me why it is not present on dg.

Thus I further worked on dw. I was able to reproduce the issue on 0.3.2.9001 version:

Loading required package: usethis
ℹ Loading DMRnet
Loaded DMRnet version 0.3.2.9001
Warning messages:
1: In FUN(X[[i]], ...) :
  input string '紐約, NY, United States' cannot be translated to UTF-8, is it valid in 'CP1250'?
2: In FUN(X[[i]], ...) :
  input string 'Бруклин , NY, United States' cannot be translated to UTF-8, is it valid in 'CP1250'?
3: In FUN(X[[i]], ...) :
  input string '布鲁克林, NY, United States' cannot be translated to UTF-8, is it valid in 'CP1250'?
glamer single 2-level factor column:
dmrnet single 2-level factor column:
dmr single 2-level factor column:
glamer:
dmrnet:
cv.dmrnet:
dmr:
cv.dmr:
binomial glamer single 2-level factor column:
binomial dmrnet single 2-level factor column:
binomial dmr single 2-level factor column:
binomial glamer:
binomial dmrnet:
binomial cv.dmrnet:
Warning message:
In min(sp[[kt]][sp[[kt]] != 1]) :
  no non-missing arguments to min; returning Inf
binomial dmr:
binomial cv.dmr:
completed

The three warnings just after the package got loaded are related to the airbnb dataset present in testing_branch, it is not present in master branch, so they are not of our concern now.

What is of our concern is the successful reproduction of

Warning message:
In min(sp[[kt]][sp[[kt]] != 1]) :
  no non-missing arguments to min; returning Inf

@SzymonNowakowski SzymonNowakowski added the 0.3.2 DMRnet version 0.3.2 label Oct 18, 2022
@SzymonNowakowski
Copy link
Owner Author

The min(sp string can be found in 6 files:

$ grep "min(sp" R/*.R
R/clusters_4glm_help.R:        dod <- min(sp[[kt]][sp[[kt]] != 1])
R/clusters_4glm_help.R:          sp[[kt]][sp[[kt]] != 1] <- sp[[kt]][sp[[kt]] != 1] + dod - min(sp[[kt]][sp[[kt]] != 1])
R/clusters_4lm_help.R:        dod <- min(sp[[kt]][sp[[kt]] != 1])
R/clusters_4lm_help.R:          sp[[kt]][sp[[kt]] != 1] <- sp[[kt]][sp[[kt]] != 1] + dod - min(sp[[kt]][sp[[kt]] != 1])
R/DMR4glm_help.R:           dod <- min(sp[[kt]][sp[[kt]] != 1])
R/DMR4glm_help.R:                                       sp[[kt]][sp[[kt]] != 1] <- sp[[kt]][sp[[kt]] != 1] + dod - min(sp[[kt]][sp[[kt]] != 1])
R/DMR4glm.R:           dod <- min(sp[[kt]][sp[[kt]] != 1])
R/DMR4glm.R:                                       sp[[kt]][sp[[kt]] != 1] <- sp[[kt]][sp[[kt]] != 1] + dod - min(sp[[kt]][sp[[kt]] != 1])
R/DMR4lm_help.R:           dod <- min(sp[[kt]][sp[[kt]] != 1])
R/DMR4lm_help.R:                                       sp[[kt]][sp[[kt]] != 1] <- sp[[kt]][sp[[kt]] != 1] + dod - min(sp[[kt]][sp[[kt]] != 1])
R/DMR4lm.R:           dod <- min(sp[[kt]][sp[[kt]] != 1])
R/DMR4lm.R:                                       sp[[kt]][sp[[kt]] != 1] <- sp[[kt]][sp[[kt]] != 1] + dod - min(sp[[kt]][sp[[kt]] != 1])

@SzymonNowakowski
Copy link
Owner Author

Candidate fix issued in 0.3.2.9004

SzymonNowakowski added a commit that referenced this issue Oct 27, 2022
candidate fix for issue #33. Yet to be tested.
@SzymonNowakowski
Copy link
Owner Author

fixed in 0.3.3 - see the relevant tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.3.1 DMRnet version 0.3.1 0.3.2 DMRnet version 0.3.2 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant