This is the SigOpt MATLAB API client. Use this to natively call SigOpt API endpoints to create experiments and report data.
For more help getting started with SigOpt and MATLAB, check out the docs.
Take a look in sigopt_example.m
for example usage.
Our MATLAB API Client is written on top of our Python API Client. Below are instructions for installing Python and configuring with MATLAB.
Install Python on MATLAB workstation
- See here for MATLAB Python requirements (i.e. 64-bit for Windows workstations)
- Ensure
pip
is installed. (Pip is included with Python installations from python.org)
Open MATLAB and confirm that MATLAB is correctly configured with Python
- Within MATLAB, run
pyversion
and ensure the output points to the correct Python interpreter- Unix / OS X: the output of
pyversion
should be something likepyversion /usr/bin/python
- Windows: the output of
pyversion
should be something likepyversion C:\Python27\python
- Unix / OS X: the output of
Once you've completed installing Python in the previous step, install the SigOpt Python API Client. You will need version 3.0.0 or higher
- On Unix / OS X:
- Open the
terminal
Application pip install "sigopt==3.0.0"
- Open the
- On Windows:
- In the Start Menu, open the command prompt (
cmd
). - Enter the appropriate command to set the path variable (for example,
path=%path%;C:\python27
) python -m pip install "sigopt==3.0.0"
- In the Start Menu, open the command prompt (
Clone this repository:
git clone [email protected]:sigopt/sigopt-matlab.git
Set the path in MATLAB to include the sigopt-matlab
folder.
Sign up for an account at https://sigopt.com. In order to use the API, you'll need your API token from the API tokens page.
Open the sigopt_example.m
script and update it to include your SigOpt API token.
Once you've completed the authentication in the previous step, you're ready to run the example code. Within MATLAB, run the sigopt_example.m
script:
run("sigopt_example.m")
View your experiment's progress!
Now make a copy of sigopt_example.m
, rename and customize it to make your own simulations!
Make sure the path to the sigopt
python package is in py.sys.path:
- On Unix / OS X, you may want to run
insert(py.sys.path, int32(0), '/usr/local/lib/python2.7/site-packages')
- On Windows, you may want to run
insert(py.sys.path, int32(0), 'C:\python27/site-packages')
For more information on integrating Python with Matlab, visit the Matlab Python docs.
Repository: 2016-2023