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

Document how to define parameters that depend on instance features #37

Open
MLopez-Ibanez opened this issue Aug 7, 2022 · 0 comments
Open

Comments

@MLopez-Ibanez
Copy link
Owner

A first draft is given below:

If you want that the parameter alpha depends on the number of nodes "n" in the graph associated with an instance in parameter.txt, then define a dummy parameter in parameters.txt, for example:

alpha_factor "--alpha-factor " r (1,10)

Then, calculate alpha = alpha_factor * n or alpha = int(alpha_factor * n) if you want alpha to be an integer, within target-runner.

To get the value of "n", either:

  1. Within target-runner, calculate "n" given the instance file.

  2. Alternatively, define the instances in a file "train-instances.txt" such as:

instance-file-1.txt --n 12
instance-file-2.txt --n 15
instance-file-3.txt --n 19
...

and set

trainInstancesFile="train-instances.txt"

in scenario.txt. Now target-runner will receive an additional parameter "--n" with the value that corresponds to each instance. You'll need to handle that extra parameter.

The first approach is probably simpler in your case. The second approach is better when the instance feature takes long to compute (so it is better to precompute it and save its value in train-instances.txt) or it cannot be computed just from the instance data available in the input file.

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

1 participant