-
Notifications
You must be signed in to change notification settings - Fork 19
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
scores array has nan values #3
Comments
Have you solved this problem? I also encountered the same problem. TT |
Do you experience low accuracy when running this program? My accuracy is only around 9%. Have you encountered this situation? |
delete ’pseudo_candidates=True‘ |
Hi, I realized that pseudocost scores are not calculated for candidates with an integral value in the LP solution and those candidates receive a nan. For some reason, python picks the first such element as argmax. Therefore, when the solver is performing pseudocost branching, such a candidate will be chosen for branching (if it exists). The data from such nodes is not scored, it is only stored during strong branching in which case nan scores do not arise.
In my experience setting pseudo_candidates to True or False might change the accuracy a bit, but not too drastically. |
Translated text:I am a Chinese student and my English is not very good. I am using a translator to respond to you, so please forgive any inaccuracies. The errors in the action concentration occurred because the pseudo_candidates was set to TRUE. The scores of these erroneous actions were "nan," which led to a series of mistakes. If you set the pseudo-cost to FALSE and generate a small dataset (for example, 1000 samples), you will find that the accuracy rate increases to 50%. 原文:我是一名中国学生并且我的英语并不好,我在使用翻译器来回答你,请见谅。 Here is the result after set pseudo_candidates to False: |
Are you using a different problem family than the ones in the paper? The paper of this study reports high accuracies for the problem families when pseudo_candidates = True. I believe this is intuitive because even when all free integer variables are branching candidates (pseudo_candidates = True), the best ones will mostly likely be fractional, which is equivalent to having pseudo_candidates = False. |
Translation:The problem families I am using are consistent with those in the paper "Exact Combinatorial Optimization with Graph Convolutional Neural Networks," which employs strong branching without using pseudo costs or hybrid rules. For MILP problems, after the solver obtains a linear solution, it will perform branching selection. At this point, all continuous variables and integer variables with integer values in the linear solution are fixed, so their strong branching scores are nan. The action_set only contains integer variables with non-integer values in the linear solution. However, when using pseudo costs, some integer variables with integer values in the linear solution appear in the action_set. Their score was nan, which resulted in an error. 原文:我使用的问题类别与Exact Combinatorial Optimization with Graph Convolutional Neural Networks这篇论文一致,这篇论文是使用的强分支规则而没有使用伪成本或混合规则。 对于MILP问题,当求解器获得线性解后,将进行分支选择,此时所有连续变量和线性解为整形的整形变量的值被固定,因此它们的强分支分数是nan,action_set中只有线性解为非整形的整形变量。但当使用伪成本时,action_set中有了一些线性解为整形的整形变量,他们的分数为nan,导致了错误。 |
Hello,
I am trying to replicate the Learning to Branch study. I chose the problem domain as setcover. In 02_generate_dataset.py, when debugging the program, I realized that scores[action_set] has nan values and scores[action_set].argmax() returns the index of an element in scores[action_set] with a nan value. My understanding is that action_set is the set of pseudocandidates (nonfixed variables) and scores[action_set] should not have any nan values. I'd appreciate any help with this. Thank you.
The text was updated successfully, but these errors were encountered: