# Radial Basis Surrogate

**URL:** <https://discourse.julialang.org/t/radial-basis-surrogate/58192>\
**Category:** Performance\
**Created:** [March 29, 2021, 9:46pm UTC](https://discourse.julialang.org/t/radial-basis-surrogate/58192 "2021-03-29T21:46:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manisha\_07](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@Manisha\_07](https://discourse.julialang.org/u/Manisha_07)\
**Post date:** [March 29, 2021, 9:46pm UTC](https://discourse.julialang.org/t/radial-basis-surrogate/58192/1 "2021-03-29T21:46:26Z")

</div>

I am trying to execute the following program but facing the issue. Please help me to resolve this

 ![RADIAL_BASIS](https://global.discourse-cdn.com/julialang/original/3X/2/4/24293913085fd2fc39ea58058a4799132e50ddf5.png)

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [March 29, 2021, 10:24pm UTC](https://discourse.julialang.org/t/radial-basis-surrogate/58192/2 "2021-03-29T22:24:47Z")

</div>

Can you share code that reproduces the issue, not a screenshot?

---

<div class="post-metadata">

**Author:** ![Manisha\_07](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@Manisha\_07](https://discourse.julialang.org/u/Manisha_07)\
**Post date:** [April 1, 2021, 9:07am UTC](https://discourse.julialang.org/t/radial-basis-surrogate/58192/3 "2021-04-01T09:07:32Z")

</div>

Hallo  
Here is the **code i have written**  
using Surrogates  
using Plots  
using LinearAlgebra  
f(x)=log(x)+x^2  
n=30  
u=100  
l=10  
x=sample(n,u,l,SobolSample())  
y=f.(x)  
scatter(x,y,label=“scattered\_points”,)  
plot!(f,label=“True Functions”)  
radial\_surrogates=RadialBasis(x,y,l,u)  
**Error**  
MethodError: no method matching RadialBasis(::Array{Float64,1}, ::Array{Float64,1}, ::Int64, ::Int64)  
Closest candidates are:  
RadialBasis(::Any, ::Any, ::Number, ::Number, ::Function, ::Int64) at C:\Users\Manisha Gowda.julia\packages\Surrogates\dfpEW\src\Radials.jl:25  
RadialBasis(::F, ::Int64, ::X, ::Y, ::B, ::C) where {F, X, Y, B, C} at C:\Users\Manisha Gowda.julia\packages\Surrogates\dfpEW\src\Radials.jl:7  
RadialBasis(::Any, ::Any, ::Any, ::Function, ::Int64) at C:\Users\Manisha Gowda.julia\packages\Surrogates\dfpEW\src\Radials.jl:40

Stacktrace:  
[1] top-level scope at In[16]:1

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [April 1, 2021, 9:26am UTC](https://discourse.julialang.org/t/radial-basis-surrogate/58192/4 "2021-04-01T09:26:21Z")

</div>

Is this not the same issue as in [Radial\_surrogates Installations Error - #6 by nilshg](https://discourse.julialang.org/t/radial-surrogates-installations-error/58347/6)? Please avoid duplicating discussions - you say you can’t run the example in the Surrogates documentation, and this is likely due to you using Julia 1.0.5 and possibly an outdated version of the Surrogates package.

---

<div class="post-metadata">

**Author:** ![Manisha\_07](https://avatars.discourse-cdn.com/v4/letter/m/57b2e6/32.png) [@Manisha\_07](https://discourse.julialang.org/u/Manisha_07)\
**Post date:** [April 1, 2021, 9:29am UTC](https://discourse.julialang.org/t/radial-basis-surrogate/58192/5 "2021-04-01T09:29:28Z")

</div>

No !!Here I am not duplicating the discussions. I am at the initial stage of learning Julia. I need expertise help in running my model.  
Thanks for your reply

---

<div class="post-metadata">

**Author:** ![mzaffalon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mzaffalon/32/214168_2.png) [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Post date:** [April 1, 2021, 10:40am UTC](https://discourse.julialang.org/t/radial-basis-surrogate/58192/6 "2021-04-01T10:40:36Z")

</div>

Can you please post the output of `versioninfo()` and `using Pkg; Pkg.status("Surrogates")`?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [April 1, 2021, 1:43pm UTC](https://discourse.julialang.org/t/radial-basis-surrogate/58192/7 "2021-04-01T13:43:16Z")

</div>

But you are getting essentially the exact same MethodError that you’re getting in the other thread, and the reason is likely the same - you are using Julia 1.0.5 according to your screenshot in the other thread, and the latest version of Surrogates (which the documentation from which you copied the code relates to), requires at least Julia version 1.5 to run.
