Skip to content

Commit

Permalink
GaussianProcess: Rename GIBBS to GALLIGAOGIBBS
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Sep 26, 2022
1 parent 2752cfd commit 234f448
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/src/Uncertainty/Process/openturns/GaussianProcess.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public:
void setTimeGrid(const RegularGrid & timeGrid) override;

/** Set sampling method accessor */
enum SamplingMethod { CHOLESKY, HMAT, GIBBS };
enum SamplingMethod { CHOLESKY, HMAT, GALLIGAOGIBBS };
SamplingMethod getSamplingMethod() const;
void setSamplingMethod(const SamplingMethod samplingMethod);

Expand Down
6 changes: 3 additions & 3 deletions lib/test/t_GaussianProcess_std.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ int main(int, char *[])
fullprint << "is stationary? " << myProcess1.isStationary() << std::endl;
myProcess1.setSamplingMethod(GaussianProcess::CHOLESKY);
fullprint << "mean over " << size << " realizations=" << myProcess1.getSample(size).computeMean() << std::endl;
myProcess1.setSamplingMethod(GaussianProcess::GIBBS);
myProcess1.setSamplingMethod(GaussianProcess::GALLIGAOGIBBS);
fullprint << "mean over " << size << " realizations=" << myProcess1.getSample(size).computeMean() << std::endl;

/* With constant trend */
Expand All @@ -71,7 +71,7 @@ int main(int, char *[])
fullprint << "is stationary? " << myProcess2.isStationary() << std::endl;
myProcess1.setSamplingMethod(GaussianProcess::CHOLESKY);
fullprint << "mean over " << size << " realizations=" << myProcess1.getSample(size).computeMean() << std::endl;
myProcess1.setSamplingMethod(GaussianProcess::GIBBS);
myProcess1.setSamplingMethod(GaussianProcess::GALLIGAOGIBBS);
fullprint << "mean over " << size << " realizations=" << myProcess1.getSample(size).computeMean() << std::endl;

/* With varying trend */
Expand All @@ -81,7 +81,7 @@ int main(int, char *[])
fullprint << "is stationary? " << myProcess3.isStationary() << std::endl;
myProcess1.setSamplingMethod(GaussianProcess::CHOLESKY);
fullprint << "mean over " << size << " realizations=" << myProcess1.getSample(size).computeMean() << std::endl;
myProcess1.setSamplingMethod(GaussianProcess::GIBBS);
myProcess1.setSamplingMethod(GaussianProcess::GALLIGAOGIBBS);
fullprint << "mean over " << size << " realizations=" << myProcess1.getSample(size).computeMean() << std::endl;
}
catch (TestFailed & ex)
Expand Down
4 changes: 2 additions & 2 deletions python/src/GaussianProcess_doc.i.in
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Available parameters are :

* 1 (GaussianProcess.HMAT) : H-Matrix method (if H-Mat available)

* 2 (GaussianProcess.GIBBS) : Gibbs method (in dimension 1 only)
* 2 (GaussianProcess.GALLIGAOGIBBS) : Gibbs method (in dimension 1 only)

"

Expand All @@ -113,7 +113,7 @@ Available parameters are :

* 1 (GaussianProcess.HMAT) : H-Matrix method (if H-Mat available)

* 2 (GaussianProcess.GIBBS) : Gibbs method (in dimension 1 only)
* 2 (GaussianProcess.GALLIGAOGIBBS) : Gibbs method (in dimension 1 only)

Parameters
----------
Expand Down
12 changes: 6 additions & 6 deletions python/test/t_GaussianProcess_std.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
myProcess1.setSamplingMethod(ot.GaussianProcess.CHOLESKY)
print("mean over ", size, " realizations = ",
myProcess1.getSample(size).computeMean())
myProcess1.setSamplingMethod(ot.GaussianProcess.GIBBS)
myProcess1.setSamplingMethod(ot.GaussianProcess.GALLIGAOGIBBS)
print("mean over ", size, " realizations = ",
myProcess1.getSample(size).computeMean())

# With constant trend
trend = ot.TrendTransform(ot.SymbolicFunction("t", "4.0"), myTimeGrid)
myProcess2 = ot.GaussianProcess(trend, myCovModel, myTimeGrid)
myProcess2.setSamplingMethod(ot.GaussianProcess.GIBBS)
myProcess2.setSamplingMethod(ot.GaussianProcess.GALLIGAOGIBBS)
print("myProcess2 = ", myProcess2)
print("is stationary? ", myProcess2.isStationary())
print("mean over ", size, " realizations= ",
Expand All @@ -50,7 +50,7 @@
myProcess3.setSamplingMethod(ot.GaussianProcess.CHOLESKY)
print("mean over ", size, " realizations = ",
myProcess3.getSample(size).computeMean())
myProcess3.setSamplingMethod(ot.GaussianProcess.GIBBS)
myProcess3.setSamplingMethod(ot.GaussianProcess.GALLIGAOGIBBS)
print("mean over ", size, " realizations = ",
myProcess3.getSample(size).computeMean())

Expand All @@ -68,7 +68,7 @@

# Create the "Gaussian Process" discretized on a singleton
myProcess = ot.GaussianProcess(covModel, mesh)
myProcess.setSamplingMethod(ot.GaussianProcess.GIBBS)
myProcess.setSamplingMethod(ot.GaussianProcess.GALLIGAOGIBBS)
size = 1000
sample = ot.Sample(size, 1)
for i in range(size):
Expand Down Expand Up @@ -99,7 +99,7 @@
sample.computeMean())
print("variance over ", size, " realizations = ",
sample.computeVariance())
myProcess4.setSamplingMethod(ot.GaussianProcess.GIBBS)
myProcess4.setSamplingMethod(ot.GaussianProcess.GALLIGAOGIBBS)
sample = myProcess4.getSample(size)
print("mean over ", size, " realizations = ",
sample.computeMean())
Expand All @@ -116,7 +116,7 @@
sample.computeMean())
print("variance over ", size, " realizations = ",
sample.computeVariance())
myProcess5.setSamplingMethod(ot.GaussianProcess.GIBBS)
myProcess5.setSamplingMethod(ot.GaussianProcess.GALLIGAOGIBBS)
sample = myProcess5.getSample(size)
print("mean over ", size, " realizations = ",
sample.computeMean())
Expand Down

0 comments on commit 234f448

Please sign in to comment.