Sample from csv to build surrogate model

Hello

I attempt to use Surrogate.jl to build a surrogate model of a set of measurement data, coming from a csv file. For the model, there will be 5 inputs and 1 output. I review the user manual of Surrogate.jl and I find that there is no tutorial for importing sample from a file. So I wonder if this is supported with Julia. In this case, what sampling method is recommended to use?

Besides, lower bound and upper bound should be indicated in the surrogate model. I want to set the min and max of the columns in the csv, is this correct?

It’s supported. You wouldn’t use a sampling method but instead would use the direct constructor. You just use for example radial_basis = RadialBasis(xys, zs, lower_bound, upper_bound) where xyz and zs match the format that the sampling methods generate.

If you open an issue we can probably add a tutorial.

Another question about format convertion. I have a dataframe of 2 columns reading from csv file, how can I convert each line of dataframe into a tuple, and combine all the tuples to form like Array{Tuple{Float64, Float64}} or Vector{Tuple{Float64, Float64}}?

map(x->Tuple(x...),eachrow(A)) or something of the sort. That should put you at least in the right direction. Do DataFrames iterate by row? They might.

Thanks! eachrow() is available with DataFrames.jl, not for Pandas.jl. Anyway, it works.