Skip to content

Commit

Permalink
Benchmarks (#227)
Browse files Browse the repository at this point in the history
* added kriging surrogate with different hyper parameters

* fixed some issues in gek
  • Loading branch information
RohitRathore1 committed Aug 20, 2020
1 parent 37bef36 commit 3bd8db5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions docs/src/Salustowicz.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ Not's let's see Kriging Surrogate with different hyper parameter:
kriging_surrogate1 = Kriging(x, y, lower_bound, upper_bound, p=0.9);
kriging_surrogate2 = Kriging(x, y, lower_bound, upper_bound, p=1.5);
kriging_surrogate3 = Kriging(x, y, lower_bound, upper_bound, p=1.9);
scatter(x, y, label="Sampled points", xlims=(lower_bound, upper_bound), legend=:top)
plot!(xs, salustowicz.(xs), label="True function", legend=:top)
plot!(xs, kriging_surrogate1.(xs), label="kriging_surrogate1", ribbon=p->std_error_at_point(kriging_surrogate1, p), legend=:top)
plot!(xs, kriging_surrogate2.(xs), label="kriging_surrogate2", ribbon=p->std_error_at_point(kriging_surrogate2, p), legend=:top)
plot!(xs, kriging_surrogate3.(xs), label="kriging_surrogate3", ribbon=p->std_error_at_point(kriging_surrogate3, p), legend=:top)
scatter(x, y, label="Sampled points", xlims=(lower_bound, upper_bound), legend=:topright)
plot!(xs, salustowicz.(xs), label="True function", legend=:topright)
plot!(xs, kriging_surrogate1.(xs), label="kriging_surrogate1", ribbon=p->std_error_at_point(kriging_surrogate1, p), legend=:topright)
plot!(xs, kriging_surrogate2.(xs), label="kriging_surrogate2", ribbon=p->std_error_at_point(kriging_surrogate2, p), legend=:topright)
plot!(xs, kriging_surrogate3.(xs), label="kriging_surrogate3", ribbon=p->std_error_at_point(kriging_surrogate3, p), legend=:topright)
```
6 changes: 3 additions & 3 deletions docs/src/gek.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ plot!(f, label="True function", xlims=(lower_bound, upper_bound), legend=:top)
With our sampled points we can build the Gradient Enhanced Kriging surrogate using the `GEK` function.

```@example GEK1D
my_gek = GEK(x, y, lower_bound, upper_bound, p = 2.9);
my_gek = GEK(x, y, lower_bound, upper_bound, p = 1.4);
```
```@example @GEK1D
plot(x, y1, seriestype=:scatter, label="Sampled points", xlims=(lower_bound, upper_bound), legend=:top)
scatter(x, y1, label="Sampled points", xlims=(lower_bound, upper_bound), legend=:top)
plot!(f, label="True function", xlims=(lower_bound, upper_bound), legend=:top)
plot!(my_gek, label="Surrogate function", ribbon=p->std_error_at_point(my_gek, p), xlims=(lower_bound, upper_bound), legend=:top)
```
Expand Down Expand Up @@ -74,7 +74,7 @@ Let's define our bounds, this time we are working in two dimensions. In particul

```@example GEK_ND
n_samples = 80
lower_bound = [0, 0]
lower_bound = [0, 0]
upper_bound = [10, 10]
xys = sample(n_samples, lower_bound, upper_bound, SobolSample())
y1 = leon.(xys);
Expand Down

0 comments on commit 3bd8db5

Please sign in to comment.