-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
596d252
commit b562229
Showing
2 changed files
with
98 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
function A = meanGP(hyp, x, i) | ||
% GP mean function. The mean function does not have any parameters. | ||
|
||
% global variables | ||
global global_mean_func; | ||
global global_cov_func; | ||
global global_lik_func; | ||
global global_inf_method; | ||
global global_hyp; | ||
global global_x; | ||
global global_y; | ||
|
||
if nargin<2, A = '0'; return; end % report number of hyperparameters | ||
|
||
% % for now, it only works for 1D cases | ||
% if size(x, 2) > 2 | ||
% error('For now, it only works for 1D cases') | ||
% end | ||
% | ||
% if size(x, 2) == 2 | ||
% mask = x(:, 1) == 0; | ||
% x = x(mask, 2); | ||
% end | ||
|
||
% mean | ||
[dummy, dummy, A, dummy] = gp(global_hyp, global_inf_method, global_mean_func, global_cov_func, global_lik_func, global_x, global_y, x); |