8000 Implementation of stride grid search by mpecha · Pull Request #9 · permon/permonsvm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 15 commits into from
Jan 16, 2020

Conversation

mpecha
Copy link
Member
@mpecha mpecha commented Jan 8, 2020

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.

@mpecha mpecha self-assigned this Jan 8, 2020
}

if (m == 1) {
PetscInfo2(svm,"selected best C=%.4f (score=%f)\n",grid[p],score_best);
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

@mpecha mpecha requested a review from jkruzik January 13, 2020 12:23
@mpecha mpecha merged commit e5eb7ed into master Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants
0