This repository contains an implementation of a method for actively learning Gaussian process (GP) dynamics. The method aims to efficiently learn the dynamics of a system by actively selecting state-action pairs for observation.
The process can be summarized as follows:
-
Initialization: Generate an initial set of state-action pairs (denoted as Z) from the initial state x0 and randomly generated control inputs that satisfy constraints.
-
Model Fitting: Use the true model to calculate outcomes for each state-action pair, introducing Gaussian noise to simulate observed values. Fit an initial GP model using the MATLAB function
fitrgp
. -
Receding Horizon Update: Utilize a receding horizon approach to update the training dataset. Solve for a set of control inputs, use the first control input to retrain the model, and iterate the process multiple times until the desired size of the training dataset is reached.
-
Evaluation: Evaluate the results by creating 1000 random state-action pairs. Employ the GP model to predict their outcomes, calculate the mean squared error between the predicted values and the true values computed using the true system, using the predefined
immse
function.
To use this implementation, follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/aymen5507/actively-learning-gp-dynamics.git
-
Open MATLAB and navigate to the cloned repository.
-
Run the necessary scripts to execute the actively learning Gaussian process dynamics method.
-
Customize parameters and settings as needed for your specific application.
- MATLAB R2019b or later
- This work is based on the paper "Actively Learning Gaussian Process Dynamics".
For questions or feedback, please contact me.