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) ``` 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() 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)