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

A question for the grid search #15

Open
ChairManMeow-SY opened this issue Jun 10, 2022 · 2 comments
Open

A question for the grid search #15

ChairManMeow-SY opened this issue Jun 10, 2022 · 2 comments

Comments

@ChairManMeow-SY
Copy link

Hi Zhengzhong,

I noticed in your evaluate script (demo_eval_BVQA_feats_all_combined.py), a grid search is used to obtain a best [gamma, c] for each iteration.

This may bring a problem: for each iteration (the 8-2 division) the best gamma c will be different.

If we have 100 params pairs, and 100 iterations. Then we should have a 100x100 searching matrix, naming K. Usually I take the median for each row (i.e. each iteration with a fixed param pair), then the max value to select the best param pair.

It takes the np.max(np.median(K, 1)) as the final result, here the np denotes numpy.

The current script essentially takes the np.median(np.max(K, 0)).

I don't think these two ways will make the same results ---- the latter one may offer a better score but it can not tell us what's the best params in the whole dataset.

Please correct me if I misunderstand anything....

@ChairManMeow-SY
Copy link
Author

ChairManMeow-SY commented Jun 10, 2022

Read the code again... sorry I see the param k-fold procedure.

It's absolutely right to select the param with y_param_valid set.


Finally just curious, which is better, np.max(np.median(K,1)) or the processing in your script? 😂

@vztu
Copy link
Owner

vztu commented Jul 25, 2022

It depends on the model and dataset. You can just try and see which one is better 😂

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

No branches or pull requests

2 participants