From 6937fe799a0f04f381fccaf3aa0f72afd2da20a5 Mon Sep 17 00:00:00 2001 From: LudovicoBessi <21291898+ludoro@users.noreply.github.com> Date: Sun, 30 Aug 2020 09:31:22 +0200 Subject: [PATCH 1/3] Update variablefidelity.md --- docs/src/variablefidelity.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/variablefidelity.md b/docs/src/variablefidelity.md index c1b0bf8d0..c375a0971 100644 --- a/docs/src/variablefidelity.md +++ b/docs/src/variablefidelity.md @@ -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) @@ -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) From b5c56e41ceda0d3e2b3934cfc929c3020118a8ae Mon Sep 17 00:00:00 2001 From: LudovicoBessi <21291898+ludoro@users.noreply.github.com> Date: Sun, 30 Aug 2020 09:32:51 +0200 Subject: [PATCH 2/3] Update polychaos.md --- docs/src/polychaos.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/polychaos.md b/docs/src/polychaos.md index 49230f0c6..65c20616e 100644 --- a/docs/src/polychaos.md +++ b/docs/src/polychaos.md @@ -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() From 09d9f3ec9799217810139292f7b7020391dca961 Mon Sep 17 00:00:00 2001 From: LudovicoBessi <21291898+ludoro@users.noreply.github.com> Date: Sun, 30 Aug 2020 09:33:53 +0200 Subject: [PATCH 3/3] Update Salustowicz.md --- docs/src/Salustowicz.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/src/Salustowicz.md b/docs/src/Salustowicz.md index 5539b129a..050ec302c 100644 --- a/docs/src/Salustowicz.md +++ b/docs/src/Salustowicz.md @@ -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) ```