Skip to content
Snippets Groups Projects

Tests for BayesInf and general cleanup

Merged Rebecca Kohlhaas requested to merge fix/BMC into develop
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -180,7 +180,7 @@ class MCMC:
@@ -180,7 +180,7 @@ class MCMC:
initsamples = np.swapaxes(np.array([initsamples]),0,1) # TODO: test if this still works with multiple input dists
initsamples = np.swapaxes(np.array([initsamples]),0,1) # TODO: test if this still works with multiple input dists
except:
except:
# when aPCE selected - gaussian kernel distribution
# when aPCE selected - gaussian kernel distribution
inputSamples = self.BayesOpts.engine.ExpDesign.raw_data.T
inputSamples = BayesObj.engine.ExpDesign.raw_data.T
random_indices = np.random.choice(
random_indices = np.random.choice(
len(inputSamples), size=self.nwalkers, replace=False
len(inputSamples), size=self.nwalkers, replace=False
)
)
@@ -206,7 +206,7 @@ class MCMC:
@@ -206,7 +206,7 @@ class MCMC:
initsamples[:, idx_dim] = dist.rvs(size=self.nwalkers)
initsamples[:, idx_dim] = dist.rvs(size=self.nwalkers)
# Update lower and upper
# Update lower and upper
BayesObj.engine.MetaModel.ExpDesign.bound_tuples = bound_tuples
BayesObj.engine.ExpDesign.bound_tuples = bound_tuples
# Check if sigma^2 needs to be inferred
# Check if sigma^2 needs to be inferred
if Discrepancy.opt_sigma != 'B': # TODO: why !='B'?
if Discrepancy.opt_sigma != 'B': # TODO: why !='B'?
Loading