Setting up a sweep job for random sampling
As we saw with setting up a command for grid sampling, a command for random sampling is simply a job command with the hyperparameters included in the command. One difference between the grid
command and the random
command is that the hyperparameters can be continuous in a random sampling sweep job.
Here’s the code for the job command for random sampling:
Figure 4.20 – Sweep job command with hyperparameters for random sampling
As shown in Figure 4.20 in line 25, the value of C
is defined to follow a uniform distribution from 0.01
to 10.0
, making this a continuous hyperparameter across the search space.
Just as with the grid sampling sweep job, we set parameters for our sweep but specify them using a random sampling algorithm as shown here:
Figure 4.21 – Calling the sweep method during random sampling
Given the parameters for the sweep job and the limits have...