kriging_basic
Kriging
¶
Bases: BaseEstimator, RegressorMixin
A scikit-learn compatible Kriging model class for regression tasks. Provides methods for likelihood evaluation, predictions, and hyperparameter optimization.
Attributes:
| Name | Type | Description |
|---|---|---|
eps |
float
|
A small regularization term to reduce ill-conditioning. |
penalty |
float
|
The penalty value used if the correlation matrix is ill-conditioned. |
logtheta_loglambda_p_ |
ndarray
|
Best-fit log(theta), log(lambda), and p parameters from fit(). |
U_ |
ndarray
|
The Cholesky factor of the correlation matrix after fit(). |
X_ |
ndarray
|
The training input data (n x d). |
y_ |
ndarray
|
The training target values (n,). |
negLnLike |
float
|
The negative log-likelihood of the model. |
Psi_ |
ndarray
|
The correlation matrix after fit(). |
method |
str
|
The fitting method used, can be “interpolation”, “regression”, or “reinterpolation”. |
isotropic |
bool
|
Whether the model is isotropic or not. |
Methods:
| Name | Description |
|---|---|
__init__ |
Initializes the Kriging model with hyperparameters. |
_get_eps |
Returns the square root of machine epsilon. |
_set_variable_types |
Sets variable types for the model. |
get_model_params |
Returns additional model parameters not included in get_params(). |
_update_log |
Updates the log with current model parameters. |
fit |
Fits the Kriging model to training data X and y. |
predict |
Predicts the Kriging response at a set of points X. |
build_Psi |
Constructs a new correlation matrix Psi. |
likelihood |
Computes the negative concentrated log-likelihood and correlation matrix. |
build_psi_vec |
Builds the psi vector for predictive methods. |
_pred |
Computes a single-point Kriging prediction. |
Source code in spotpython/surrogate/kriging_basic.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 | |
__init__(eps=None, penalty=10000.0, method='regression', var_type=['num'], name='Kriging', seed=124, model_optimizer=None, model_fun_evals=None, n_theta=None, min_theta=-3.0, max_theta=2.0, theta_init_zero=False, p_val=2.0, n_p=1, optim_p=False, min_p=1.0, max_p=2.0, min_Lambda=-9.0, max_Lambda=0.0, log_level=50, spot_writer=None, counter=None, metric_factorial='canberra', isotropic=False, theta=None, Lambda=None, **kwargs)
¶
Initializes the Kriging model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
eps
|
float
|
Small number added to the diagonal of the correlation matrix to reduce ill-conditioning. Defaults to the square root of machine epsilon. Only used if method is “interpolation”. Otherwise, if method is “regression” or “reinterpolation”, eps is replaced by the lambda_ parameter. Defaults to None. |
None
|
penalty
|
float
|
Large negative log-likelihood assigned if the correlation matrix is not positive-definite. Defaults to 1e4. |
10000.0
|
method
|
str
|
The type how the model uis fitted. Can be “interpolation”, “regression”, or “reinterpolation”. Defaults to “regression”. |
'regression'
|
var_type
|
List[str]
|
List specifying the variable types for each input dimension. Possible values are “num”, “int”, “factor”, and “ordered”. Defaults to [“num”]. |
['num']
|
name
|
str
|
Name of the Kriging model instance. Defaults to “Kriging”. |
'Kriging'
|
seed
|
int
|
Random seed for reproducibility. Used by the optimizer. Defaults to 124. |
124
|
model_optimizer
|
callable
|
Optimization algorithm for hyperparameter tuning. Defaults to scipy.optimize.differential_evolution. |
None
|
model_fun_evals
|
int
|
Maximum number of function evaluations for the optimizer. Defaults to 100. |
None
|
n_theta
|
int
|
Number of theta values to be used. If None, it will be set during fitting. Defaults to None. |
None
|
min_theta
|
float
|
Minimum bound for log(theta) during optimization. Defaults to -3.0. |
-3.0
|
max_theta
|
float
|
Maximum bound for log(theta) during optimization. Defaults to 2.0. |
2.0
|
theta_init_zero
|
bool
|
If True, initializes theta values to zero before fitting. Defaults to False. |
False
|
p_val
|
float
|
Initial power exponent value for the correlation function. Defaults to 2.0. |
2.0
|
n_p
|
int
|
Number of p values to be used. Defaults to 1. |
1
|
optim_p
|
bool
|
If True, optimizes the p values during fitting. Defaults to False. |
False
|
min_p
|
float
|
Minimum bound for p during optimization. Defaults to 1.0. |
1.0
|
max_p
|
float
|
Maximum bound for p during optimization. Defaults to 2.0. |
2.0
|
min_Lambda
|
float
|
Minimum bound for log(Lambda) during optimization. Defaults to -9.0. |
-9.0
|
max_Lambda
|
float
|
Maximum bound for log(Lambda) during optimization. Defaults to 2.0. |
0.0
|
log_level
|
int
|
Logging level for the model. Defaults to 0 (no logging). |
50
|
spot_writer
|
object
|
Writer object for logging (e.g., TensorBoard writer). Defaults to None. |
None
|
counter
|
int
|
Counter for logging iterations. Defaults to None. |
None
|
metric_factorial
|
str
|
Metric to be used for factorial design. Defaults to “canberra”. |
'canberra'
|
isotropic
|
bool
|
If True, the model is isotropic, meaning all variables are treated equally (only one theta value is used). If False, the model can handle different theta values, one for each dimension. Defaults to False. |
False
|
theta
|
ndarray
|
Initial theta values for the model. If None, theta values are initialized during fitting. Note that theta is in log10 scale. Defaults to None. |
None
|
Lambda
|
float
|
Currently ignored. Initial Lambda value for the model. If None, Lambda is initialized during fitting. Note that Lambda is in log10 scale. Defaults to None. |
None
|
**kwargs
|
Additional keyword arguments. |
{}
|
Source code in spotpython/surrogate/kriging_basic.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
build_Psi()
¶
Constructs a new (n x n) correlation matrix Psi to reflect new data
or a change in hyperparameters.
This method uses `theta`, `p`, and coded `X` values to construct the
correlation matrix as described in [Forr08a, p.57].
Notes:
- Correlation follows the stationary Gaussian kernel used in Kriging:
R = exp(-D), with D a weighted distance. See Forrester et al. (2008),
Ch. 2, correlation modelling.
- The code builds D as a sum of per-dimension distance contributions
scaled by 10**theta (theta is stored in log10), then applies exp(-D).
- Returns only the upper triangle; the symmetric and diagonal parts
are handled by the caller.
Attributes:
Psi (np.matrix): Correlation matrix Psi. Shape (n,n).
cnd_Psi (float): Condition number of Psi.
inf_Psi (bool): True if Psi is infinite, False otherwise.
Raises:
LinAlgError: If building Psi fails.
Examples:
>>> import numpy as np
>>> from spotpython.surrogate.kriging import Kriging
>>> # Training data
>>> X_train = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
>>> y_train = np.array([0.1, 0.2, 0.3])
>>> # Fit the Kriging model
>>> model = Kriging().fit(X_train, y_train)
>>> # Build the correlation matrix Psi
>>> Psi = model.build_Psi()
>>> print("Correlation matrix Psi:
”, Psi)
Source code in spotpython/surrogate/kriging_basic.py
525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | |
build_psi_vec(x)
¶
Build the psi vector required for predictive methods.
ψ(x) := [exp(-D(x, x_i))]_{i=1..n}, i.e., correlation between a new x and the training sites
using the same D as for R (Forrester, Ch. 2).
Args:
x (ndarray): Point to calculate the psi vector for.
Returns:
None
Modifies:
self.psi (np.ndarray): Updates the psi vector.
Examples:
>>> import numpy as np
from spotpython.surrogate.kriging import Kriging
# Training data
X_train = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
y_train = np.array([0.1, 0.2, 0.3])
# Fit the Kriging model
model = Kriging().fit(X_train, y_train)
x_new = np.array([0.25, 0.25])
psi_vector = model.build_psi_vec(x_new)
print("Psi vector for new point:
”, psi_vector)
Source code in spotpython/surrogate/kriging_basic.py
691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 | |
fit(X, y, bounds=None)
¶
Fits the Kriging model to training data X and y. This method is compatible with scikit-learn and uses differential evolution to optimize the hyperparameters (log(theta)). Fitting pipeline (Forrester, Ch. 2–3): - Set masks and θ dimensionality (isotropic → n_theta=1, else n_theta=k). - Assemble bounds on [log10 θ] (+ [log10 λ] for regression/reinterpolation; + p if enabled). - Maximize the concentrated likelihood (Ch. 3) to get [log10 θ, log10 λ, p]. - Build R and store U, μ-related quantities implicitly via U (used at prediction).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
ndarray
|
Training input data of shape (n_samples, n_features). |
required |
y
|
ndarray
|
Target values of shape (n_samples,) or (n_samples, 1). |
required |
bounds
|
Optional[List[Tuple[float, float]]]
|
Bounds for each dimension of log(theta). If None, defaults to [(-3, 2)] * n_features. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Kriging |
Kriging
|
The fitted Kriging model instance (self). |
Examples:
>>> import numpy as np
>>> from spotpython.surrogate.kriging import Kriging
>>> # Training data
>>> X_train = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
>>> y_train = np.array([0.1, 0.2, 0.3])
>>> # Initialize and fit the Kriging model
>>> model = Kriging()
>>> model.fit(X_train, y_train)
>>> for param, value in model.get_params(deep=True).items():
>>> print(f"{param} -> {value}")
>>> theta_values = model.get_params()["theta"]
>>> print("Fitted theta values:", theta_values)
Source code in spotpython/surrogate/kriging_basic.py
365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 | |
get_model_params()
¶
Get the (internal) model parameters (in addition to sklearn’s get_params method). This method is NOT required for scikit-learn compatibility.
Returns:
| Name | Type | Description |
|---|---|---|
dict |
Dict[str, float]
|
Parameter names not included in get_params() mapped to their values. This includes the following keys: - “log_theta_lambda” - “U” - “X” - “y” - “negLnLike” - “inf_Psi” - “cnd_Psi” |
Examples:
>>> import numpy as np
>>> from spotpython.surrogate.kriging import Kriging
>>> # Training data
>>> X_train = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
>>> y_train = np.array([0.1, 0.2, 0.3])
>>> # Initialize and fit the Kriging model
>>> model = Kriging()
>>> model.fit(X_train, y_train)
>>> # get theta values of the fitted model
>>> X_values = model.get_model_params()["X"]
>>> print("X values:", X_values)
Source code in spotpython/surrogate/kriging_basic.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | |
likelihood(x)
¶
Computes the negative of the concentrated log-likelihood for a given set
of log(theta) parameters. Returns the negative log-likelihood, the correlation matrix Psi, and its Cholesky factor U.
Negative concentrated log-likelihood (Forrester, Ch. 3):
- Given R (here Psi with diagonal and nugget), μ = (1^T R^{-1} y)/(1^T R^{-1} 1),
σ^2 = (r^T R^{-1} r)/n with r = y - 1·μ,
- Concentrated −log L = (n/2) log(σ^2) + (1/2) log |R| (constants omitted).
Args:
x (np.ndarray):
1D array of log(theta), log(Lambda) (if method is "regression" or "reinterpolation"), and p values (if optim_p is True).
Returns:
(float, np.ndarray, np.ndarray):
(negLnLike, Psi, U) where:
- negLnLike (float): The negative concentrated log-likelihood.
- Psi (np.ndarray): The correlation matrix.
- U (np.ndarray): The Cholesky factor (or None if ill-conditioned).
Examples:
>>> import numpy as np
from spotpython.surrogate.kriging import Kriging
# Training data
X_train = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
y_train = np.array([0.1, 0.2, 0.3])
# Fit the Kriging model
model = Kriging().fit(X_train, y_train)
log_theta = np.array([0.0, 0.0, -6.0]) # nugget: -6 => 10**(-6) = 1e-6
negLnLike, Psi, U = model.likelihood(log_theta)
print("Negative Log-Likelihood:", negLnLike)
print("Correlation matrix Psi:
”, Psi) print(“Cholesky factor U (lower triangular): “, U)
Source code in spotpython/surrogate/kriging_basic.py
599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 | |
max_likelihood(bounds)
¶
Maximizes the Kriging likelihood function using differential evolution over the range of log(theta) specified by bounds. Hyperparameter estimation via maximum likelihood (Forrester, Ch. 3). Objective is the concentrated −log L above, optimized with differential evolution.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bounds
|
List[Tuple[float, float]]
|
Sequence of (low, high) bounds for log(theta). |
required |
Returns:
| Type | Description |
|---|---|
(ndarray, float)
|
(best_x, best_fun) where best_x is the |
float
|
optimal [log(theta) log(lambda) p] array and best_fun is the minimized negative log-likelihood. |
Examples:
>>> import numpy as np
from spotpython.surrogate.kriging import Kriging
# Training data
X_train = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
y_train = np.array([0.1, 0.2, 0.3])
# Fit the Kriging model
model = Kriging().fit(X_train, y_train)
bounds = [(-3.0, 2.0), (-3.0, 2.0), (-9.0, 2.0)] # Example bounds for log(theta) and log(lambda)
best_x, best_fun = model.max_likelihood(bounds)
print("Optimal parameters (log(theta),log(theta), log(lambda)):", best_x)
print("Minimized negative log-likelihood:", best_fun)
Source code in spotpython/surrogate/kriging_basic.py
847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 | |
plot(i=0, j=1, show=True, add_points=True)
¶
This function plots 1D and 2D surrogates. Only for compatibility with the old Kriging implementation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
self
|
object
|
The Kriging object. |
required |
i
|
int
|
The index of the first variable to plot. |
0
|
j
|
int
|
The index of the second variable to plot. |
1
|
show
|
bool
|
If |
True
|
add_points
|
bool
|
If |
True
|
Returns:
| Type | Description |
|---|---|
None
|
None |
Notes
- This method is a wrapper around the
plotkdfunction for 2D plots. - For 1D plots, it generates a line plot of the surrogate model.
Examples:
>>> import numpy as np
from spotpython.fun.objectivefunctions import Analytical
from spotpython.spot import spot
from spotpython.utils.init import fun_control_init, design_control_init
# 1-dimensional example
fun = Analytical().fun_sphere
fun_control=fun_control_init(lower = np.array([-1]),
upper = np.array([1]),
noise=False)
design_control=design_control_init(init_size=10)
S = spot.Spot(fun=fun,
fun_control=fun_control,
design_control=design_control)
S.initialize_design()
S.update_stats()
S.fit_surrogate()
S.surrogate.plot()
# 2-dimensional example
fun = Analytical().fun_sphere
fun_control=fun_control_init(lower = np.array([-1, -1]),
upper = np.array([1, 1]),
noise=False)
design_control=design_control_init(init_size=10)
S = spot.Spot(fun=fun,
fun_control=fun_control,
design_control=design_control)
S.initialize_design()
S.update_stats()
S.fit_surrogate()
S.surrogate.plot()
Source code in spotpython/surrogate/kriging_basic.py
883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 | |
predict(X, return_std=False, return_val='y')
¶
Predicts the Kriging response at a set of points X. This method is compatible with scikit-learn and returns predictions for the input points. Batch prediction wrapper around _pred: - Shapes normalized so X is (n_samples, k). - Forrester (Ch. 3/6): returns f̂(x), and optionally s(x) and EI (EI returned as −log10(EI) internally for stability).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
X
|
ndarray
|
Array of shape (n_samples, n_features) containing the points at which to predict the Kriging response. |
required |
return_std
|
bool
|
If True, returns the standard deviation of the predictions as well. Implememented for compatibility with scikit-learn. Defaults to False. |
False
|
return_val
|
str
|
Specifies which prediction values to return. It can be “y”, “s”, “ei”, or “all”. |
'y'
|
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: Predicted values of shape (n_samples,). |
ndarray
|
np.ndarray: If self.return_std is True, returns the standard deviations of the predictions of shape (n_samples,). |
Examples:
>>> import numpy as np
>>> from spotpython.surrogate.kriging import Kriging
>>> # Training data
>>> X_train = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
>>> y_train = np.array([0.1, 0.2, 0.3])
>>> # Fit the Kriging model
>>> model = Kriging().fit(X_train, y_train)
>>> # Test data
>>> X_test = np.array([[0.25, 0.25], [0.75, 0.75]])
>>> # Predict responses
>>> y_pred, sd, ei = model.predict(X_test)
>>> print("Predictions:", y_pred)
Source code in spotpython/surrogate/kriging_basic.py
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 | |