Using gpCAM as Software
gpCAM can be used without the explicit use of the API. In that case the main task for the user is to adjust the configuration file to the needs of the experiment or simulation. A configuration file with explanations is shown on this page. The explanation will be highlighted like this.
To open the configuration file go to ./scripts/
and open Config.py with your favorite editor, we use vim in our example.
After adapting the configuration file, you can run
to start the code. The script will execute the run.py in the same folder which calls the AutonomousExperimenter class
To run a visualization from a gpCAM dataset, use the AutonomousExperimenter class for initialization and the methods in gp_optimizer to get function values. These can be inserted in any visualization software (matplotlib, plotly, paraview, ...)
The parameters define the parameter space that will be navigated during the experiment.
Each dimension needs a name and an interval.
Next, we can import several user-defined functions that will be used by gpCAM
The only non-optional one is the data_acquisition_function because it tells gpCAM where to send the suggestions
But not to worry, several default data acquisition functions are provided in ./scripts/data_acquisition_functions
All the function imported here are illustrated in ./scripts
from instrument_function import synthetic_function tells gpCAM where to send suggestions and where it gets the data
from acquisition_function import exploration, upper_confidence_bounds important for steering gpCAM to interesting regions
from mean_function import example_mean can inform the prior where it should be, a powerful way to communicate domain knowledge
from cost_function import l1_cost a cost function can be used when moving through the parameter space should be minimized
from cost_function import update_l1_cost_function the user can define how the cost function can be updated and learned
from kernel_function import kernel_l2_single_task the kernel is an important tool to make gpCAM domain aware
from run_every_iteration import write_vtk_file this a function that will be called every iteration of the autonomous loop, it can do virtually anything
Now, we will define the Gaussian processes as a dictionary. Here we are only using 1 GP, for several just repeat the entry with different settings.
For more details, see the documentation (link at the top)
The autonomous data acquisition will stop when the uncertainty (standard deviation) falls under the specified level.
Here we provide the algorithm with some simple parameters regarding the training and the suggestion process
Now some computing-related values
And how many points we want to place randomly as initialization and when to stop