Skip to content

Commit

Permalink
fixed std calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfolch committed Sep 18, 2024
1 parent 46c7000 commit 64cf2bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bofire/surrogates/multi_task_gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Dict, Optional

import botorch
import numpy as np
import pandas as pd
import torch
from botorch.fit import fit_gpytorch_mll
Expand Down Expand Up @@ -100,7 +101,7 @@ def _predict(self, transformed_X: pd.DataFrame):
except NotImplementedError:
posterior = self.model.posterior(X=X, observation_noise=False) # type: ignore
preds = posterior.mean.cpu().detach().numpy() # type: ignore
stds = posterior.variance.cpu().detach().numpy() # type: ignore
stds = np.sqrt(posterior.variance.cpu().detach().numpy()) # type: ignore

return preds, stds

Expand Down

0 comments on commit 64cf2bc

Please sign in to comment.