Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question about training data #6

Open
Fangwq opened this issue Oct 11, 2019 · 2 comments
Open

question about training data #6

Fangwq opened this issue Oct 11, 2019 · 2 comments

Comments

@Fangwq
Copy link

Fangwq commented Oct 11, 2019

Hi, I read the code carefully. I am a little confused about training data. I check the training data. It seems that the X, Y generated by generate_training_data function doesn't have too much difference(see the following figure: X[:30, :3]- Y[:30, :3], the data is got from car_example.py file). Why do you generate the training data like that? If I replace it with (X, X+ random noise), doesn't it make any difference ? Thank you very much!

image

@helgeanl
Copy link
Owner

The generate_training_data function uses a Latin hypercube to randomly select samples that cover the five-dimensional space in the car model (3 states + 2 inputs) to get the X matrix. A more thorough explanation of this is covered in my thesis that I link to in the README file. For each sample we simulate one timestep 50ms forward to get the Y matrix to sample the dynamics in the model. The added noise to the Y matrix simulate measurement noise. Since we only integrate one timestep, the difference between Y and X will be small, especially with samples where the input values (u) are low. We could have decided on a longer sampling period, but then we risk aliasing issues where the GP model will not be able to learn the fast dynamics in the car model.

If you add random noise to the X matrix (that is within the limits of the state space) it would not matter since the X matrix itself is by definition random distributed. It is also possible to have training data of measured/ simulated time-series in the X matrix instead of the one-shot samples, but then we get a lot of redundant data, where we would need quite a lot more data points to pick up all the system dynamics. I think I also have a brief discussion about this in the thesis related to online learning. In a real system, it would not be feasible to use a Latin hypercube to gather training data, but since we have the simulated model we have the option to cheat and get optimal distributed training data.

@Fangwq
Copy link
Author

Fangwq commented Oct 13, 2019

Thank you very much for your detailed explanation !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants