Free cookie consent management tool by TermsFeed Policy Generator

Opened 8 years ago

Closed 8 years ago

# Allow arbitrary transformations of evenly spaced point sequences in the ValueGenerator class

Reported by: Owned by: bburlacu bburlacu medium Problems.Instances 3.3.10 value generator

### Description

The GenerateSteps method in the ValueGenerator class is very useful when one has to fill an interval of evenly spaced points.

It would be nice to have the possibility to apply a transformation on the generated interval so that one can obtain different scales (logarithmic, exponential).

### comment:1 Changed 8 years ago by bburlacu

r11313: Added an overload of the GenerateSteps method accepting a Func<double,double> transform. Added GenerateLogarithmicSteps method for filling an interval with logarithmically spaced points.

### comment:2 Changed 8 years ago by bburlacu

r11348: GenerateSteps: added the ability to generate negative or decreasing sequences.

Last edited 8 years ago by bburlacu (previous) (diff)

### comment:3 Changed 8 years ago by bburlacu

• Status changed from new to accepted

### comment:4 Changed 8 years ago by bburlacu

• Owner changed from bburlacu to gkronber
• Status changed from accepted to reviewing

### comment:5 Changed 8 years ago by gkronber

• Owner changed from gkronber to bburlacu
• Status changed from reviewing to assigned

Reviewed r11313 and r11348.

The comments state that start is the start of the sequence and end is the end of the sequence, while in fact they are the start and end of the untransformed sequence.

For the sequence: (-1000 -100 -10 1 10 100 1000), should the method be called like this GenerateLogarithmicSteps(-1000, 1000)

or like this: GenerateLogarithmicSteps(-3, 3, 1)?

Probably I'd prefer the former, but at least the comments should be adapted accordingly.

### comment:6 Changed 8 years ago by bburlacu

The GenerateLogarithmicSteps works like that because it was inspired from the gridsearch.py script from LibSVM which also uses ranges (on the log2 scale) that are specified using the second variant: Log2Steps(1,8,1) would produce the sequence (2, 4, 8, 16, 32, 64, 128, 256).

In hindsight, maybe the GenerateLogarithmicSteps method is not really necessary. When the user manually specifies the transformation on the range, then it becomes obvious that the call arguments refer to the start and end of the untransformed sequence. I would suggest removing it (also logarithmic steps could be either log2 or log10).

Last edited 8 years ago by bburlacu (previous) (diff)

### comment:7 Changed 8 years ago by mkommend

• Milestone HeuristicLab 3.3.11 deleted
• Resolution set to obsolete
• Status changed from assigned to closed

In r11434 and r11435 all transform overloads in the ValueGenerator were removed. The two changeset in this ticket will be released with #2259.

Note: See TracTickets for help on using tickets.