Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
odunbar committed Jan 4, 2024
1 parent c2c4048 commit 7abdb55
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/GaussianProcess.jl
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function build_models!(
# data_i: (N_samples,)
println(m.kernel)
println(size(input_values), " ", size(data_i))

ScikitLearn.fit!(m, input_values, data_i)
@info "test here -after calling fit"
if i == 1
Expand Down
6 changes: 2 additions & 4 deletions test/Emulator/MWE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ end
function minimal_failing_example()
# some kind of kernel
kernel = pykernels.ConstantKernel(constant_value = 1.0)

# some data
n = 20 # number of training points
x = reshape(2.0 * π * rand(n), 1, n) # predictors/features: 1 x n
y = reshape(sin.(x) + 0.05 * randn(n)', 1, n) # predictands/targets: 1 x n

# the model
m = pyGP.GaussianProcessRegressor(
kernel = kernel,
)
m = pyGP.GaussianProcessRegressor(kernel = kernel)

# call fit!
ScikitLearn.fit!(m, x, y)
Expand Down
4 changes: 2 additions & 2 deletions test/GaussianProcess/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ using CalibrateEmulateSample.DataContainers
se = pykernels.RBF(1.0)
GPkernel = var * se

@info "pre GP"
@info "pre GP"

gp3 = GaussianProcess(gppackage; kernel = GPkernel, noise_learn = true, prediction_type = pred_type)
@info " post GP pre emulator"
@info " post GP pre emulator"
em3 = Emulator(
gp3,
iopairs,
Expand Down

0 comments on commit 7abdb55

Please sign in to comment.