-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dummy push to check current test success on windows * update test pipeline to v1 * syntax * info * Project.toml * info statements * Pycall version wasnt issue * see if issue is in fit! or just calling the pycall object * try noise_learn false * add MWE at start of Emulator testing * typo, remove noise_learn = false * trim MWE * escapes * update python packages * update python packages for lin/mac * update 1.1.1 -> 1.3.2 * format * update init * try update test versions * try resolve syntax error? * try resolve syntax error? * try resolve syntax error? * indent * update versions of some actions, and checkout actions@main * rm info statements * rm info * test 1.5.1 * rm / change info statements
- Loading branch information
Showing
7 changed files
with
59 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using PyCall | ||
using ScikitLearn | ||
const pykernels = PyNULL() | ||
const pyGP = PyNULL() | ||
|
||
function init() | ||
copy!(pykernels, pyimport_conda("sklearn.gaussian_process.kernels", "scikit-learn=1.3.2")) | ||
copy!(pyGP, pyimport_conda("sklearn.gaussian_process", "scikit-learn=1.3.2")) | ||
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) | ||
|
||
# call fit! | ||
ScikitLearn.fit!(m, x, y) | ||
@info "fit successful" | ||
end | ||
|
||
init() | ||
minimal_failing_example() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
include("MWE.jl") | ||
|
||
# Import modules | ||
using Random | ||
using Test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters