Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/SciML/Surrogates.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ludoro committed Aug 30, 2020
2 parents 4bcb3fa + 09d9f3e commit f5ba656
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions docs/src/Salustowicz.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ Now, let's fit Salustowicz Function with different Surrogates:

```@example salustowicz1D
InverseDistance = InverseDistanceSurrogate(x, y, lower_bound, upper_bound)
randomforest_surrogate = RandomForestSurrogate(x ,y ,lower_bound, upper_bound, num_round = 2)
lobachevsky_surrogate = LobacheskySurrogate(x, y, lower_bound, upper_bound, alpha = 2.0, n = 6)
scatter(x, y, label="Sampled points", xlims=(lower_bound, upper_bound), legend=:topright)
plot!(xs, salustowicz.(xs), label="True function", legend=:topright)
plot!(xs, InverseDistance.(xs), label="InverseDistanceSurrogate", legend=:topright)
plot!(xs, randomforest_surrogate.(xs), label="RandomForest", legend=:topright)
plot!(xs, lobachevsky_surrogate.(xs), label="Lobachesky", legend=:topright)
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/polychaos.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ with a different polynomial basis depending on the distribution of the data
we are trying to fit. Under the hood, PolyChaos.jl has been used.
It is possible to specify a type of polynomial for each dimension of the problem.

```@example Inverse_Distance1D
```@example polychaos
using Surrogates
using Plots
default()
Expand Down
4 changes: 2 additions & 2 deletions docs/src/variablefidelity.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ default()
n = 20
lower_bound = 1.0
upper_bound = 6.0
x = sample(n,lower_bound,upper_bound,LowDiscrepancySample(2))
x = sample(n,lower_bound,upper_bound,SobolSample())
f = x -> 1/3*x
y = f.(x)
plot(x, y, seriestype=:scatter, label="Sampled points", xlims=(lower_bound, upper_bound), legend=:top)
Expand All @@ -24,7 +24,7 @@ plot!(f, label="True function", xlims=(lower_bound, upper_bound), legend=:top)
varfid = VariableFidelitySurrogate(x,y,lower_bound,upper_bound)
```

```@example RadialBasisSurrogate
```@example variablefid
plot(x, y, seriestype=:scatter, label="Sampled points", xlims=(lower_bound, upper_bound), legend=:top)
plot!(f, label="True function", xlims=(lower_bound, upper_bound), legend=:top)
plot!(varfid, label="Surrogate function", xlims=(lower_bound, upper_bound), legend=:top)
Expand Down

0 comments on commit f5ba656

Please sign in to comment.