Skip to content

Commit

Permalink
fix init
Browse files Browse the repository at this point in the history
  • Loading branch information
linznedd committed Oct 6, 2023
1 parent ebbff71 commit 081ab8f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion bofire/data_models/surrogates/polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from pydantic import Field

from bofire.data_models.domain.api import Inputs, Outputs
from bofire.data_models.features.api import TInputTransformSpecs
from bofire.data_models.kernels.api import (
PolynomialKernel,
)
Expand All @@ -18,7 +20,22 @@ class PolynomialSurrogate(BotorchSurrogate, TrainableSurrogate):
noise_prior: AnyPrior = Field(default_factory=lambda: BOTORCH_NOISE_PRIOR())
scaler: ScalerEnum = ScalerEnum.NORMALIZE

def __init__(self, power=2):
def __init__(
self,
type: str,
inputs: Inputs,
outputs: Outputs,
power: int,
input_preprocessing_specs: TInputTransformSpecs = dict,
dump: str | None = None,
):
super().__init__(
type=type,
inputs=inputs,
outputs=outputs,
input_preprocessing_specs=input_preprocessing_specs,
dump=dump,
)
self.kernel: PolynomialKernel = Field(
default_factory=lambda: PolynomialKernel(power=power)
)

0 comments on commit 081ab8f

Please sign in to comment.