EmuKit / emukit

A Python-based toolbox of various methods in decision making, uncertainty quantification and statistical emulation: multi-fidelity, experimental design, Bayesian optimisation, Bayesian quadrature, etc.
https://emukit.github.io/emukit/
Apache License 2.0
605 stars 128 forks source link

Doc-string fix: GPyModelWrapper.get_covariance_between_points() inputs not restricted to 1 point only #367

Closed BrunoKM closed 3 years ago

BrunoKM commented 3 years ago

https://github.com/EmuKit/emukit/blob/728212c287313874f9b0c62649e7e8769529b9c7/emukit/model_wrappers/gpy_model_wrappers.py#L108-L117

In the above, the documentation for input X1 says:

An array of shape 1 x n_dimensions that contains a data single point...

Whereas the documentation for GPys posterior_covariance_between_points() that this method wraps around says:

:param X1: some input observations
:param X2: other input observations

You can try passing more than one data point to get_covariance_between_points() at a time and it runs just fine, producing the same output (up to numerical precision) as if the data points were passed one by one.

Does that mean the docs can be expanded to say that X1 is an array of shape n_points x n_dimensions?

apaleyes commented 3 years ago

Yes, that's correct, and there are cases when we pass in more than one point. Good catch, and thanks for fixing it