surrogate.kernels.SpotOptimKernel
surrogate.kernels.SpotOptimKernel(theta, var_type, metric_factorial='hamming')Kernel designed for SpotOptim’s Kriging with mixed variable support.
It handles continuous (‘float’), integer (‘int’), and categorical (‘factor’) variables similarly to the internal logic of the Kriging class.
The correlation function is defined as: Psi = exp(- (D_ordered + D_factor))
where: D_ordered = sum_j theta_j * |x_ij - y_lj|^p (for ordered variables) D_factor = sum_j theta_j * d(x_ij, y_lj) (for factor variables, d is metric like Hamming)
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| theta | np.ndarray | The correlation parameters (weights). Note: In standard Kriging usage, this corresponds to 10^theta_log. This kernel expects the LINEAR scale theta values (weights), not log. |
required |
| var_type | list of str | List of variable types, e.g. [‘float’, ‘int’, ‘factor’]. | required |
| metric_factorial | str | Metric for factor distance (passed to cdist/pdist). Defaults to ‘hamming’. Hamming is a true nominal (order-agnostic) metric; canberra distance on integer level indices is order-dependent and singles out index 0. Any scipy distance metric remains selectable via this kwarg. | 'hamming' |