Random Search Algorithm¶
orion.algo.random – Random sampler as optimization algorithm¶
-
class
orion.algo.random.Random(space, seed=None)[source]¶ Implement a algorithm that samples randomly from the problem’s space.
Attributes: configurationReturn tunable elements of this algorithm in a dictionary form appropriate for saving.
is_doneReturn True, if an algorithm holds that there can be no further improvement.
should_suspendAllow algorithm to decide whether a particular running trial is still worth to complete its evaluation, based on information provided by the
judgemethod.spaceDomain of problem associated with this algorithm’s instance.
state_dictReturn a state dict that can be used to reset the state of the algorithm.
Methods
judge(point, measurements)Inform an algorithm about online measurements of a running trial. observe(points, results)Observe the results of the evaluation of the points in the process defined in user’s script. score(point)Allow algorithm to evaluate point based on a prediction about this parameter set’s performance. seed_rng(seed)Seed the state of the random number generator. set_state(state_dict)Reset the state of the algorithm based on the given state_dict suggest([num])Suggest a num of new sets of parameters. -
seed_rng(seed)[source]¶ Seed the state of the random number generator.
Parameters: seed – Integer seed for the random number generator.
-
set_state(state_dict)[source]¶ Reset the state of the algorithm based on the given state_dict
Parameters: state_dict – Dictionary representing state of an algorithm
-
state_dict¶ Return a state dict that can be used to reset the state of the algorithm.
-
suggest(num=1)[source]¶ Suggest a num of new sets of parameters. Randomly draw samples from the import space and return them.
Parameters: num – how many sets to be suggested. Note
New parameters must be compliant with the problem’s domain
orion.algo.space.Space.