Skip to content

voiage.metamodels.Metamodel

A protocol for metamodels used in VOI analysis.

fit([positional or keyword] self: None = None, [positional or keyword] x: ParameterSet = None, [positional or keyword] y: np.ndarray = None) -> None

Fit the metamodel to the data.

x : ParameterSet The input parameters. y : np.ndarray The target values.

Parameters:

  • self
  • x ParameterSet
  • y np.ndarray

Returns: None

predict([positional or keyword] self: None = None, [positional or keyword] x: ParameterSet = None) -> np.ndarray

Predict the target values for the given input parameters.

x : ParameterSet The input parameters.

np.ndarray The predicted target values.

Parameters:

  • self
  • x ParameterSet

Returns: np.ndarray

score([positional or keyword] self: None = None, [positional or keyword] x: ParameterSet = None, [positional or keyword] y: np.ndarray = None) -> float

Return the coefficient of determination R^2 of the prediction.

x : ParameterSet The input parameters. y : np.ndarray The true target values.

float R^2 score.

Parameters:

  • self
  • x ParameterSet
  • y np.ndarray

Returns: float

rmse([positional or keyword] self: None = None, [positional or keyword] x: ParameterSet = None, [positional or keyword] y: np.ndarray = None) -> float

Return the root mean squared error of the prediction.

x : ParameterSet The input parameters. y : np.ndarray The true target values.

float RMSE score.

Parameters:

  • self
  • x ParameterSet
  • y np.ndarray

Returns: float