-
8000
-
Notifications
You must be signed in to change notification settings - Fork 3
Implementation of stride grid search #9
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
Conversation
} | ||
|
||
if (m == 1) { | ||
PetscInfo2(svm,"selected best C=%.4f (score=%f)\n",grid[p],score_best); |
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.
use %g and cast to double
See PETSc dev guide section 2.2.3 19.
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.
The issue also appears in other parts of code. I think it is better to do it in another PR related to fixing code-style.
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 think we should not introduce a potential bug (not casting will be undefined behaviour when PetscReal is not double/float?) just because it is somewhere else in the code.
I added note in #3 to fix this in other parts of the code.
This feature contains a new implementation (say reimplementation) of hyper optimization technique, namely grid search, such that one can specify the start and endpoints of a grid, and newly discretization step. It also supports going through a grid in reverse order.