environmentaltools.common.rbf_error_metric

environmentaltools.common.rbf_error_metric(params, coords, data, train_idx, valid_idx, method, metric='rmse')[source]

Compute the error of an RBF for given epsilon and smooth values.

Parameters:
  • params (list) – [epsilon, smooth].

  • coords (np.ndarray) – Input coordinates.

  • data (np.ndarray) – Target values.

  • train_idx (array) – Indices for training samples.

  • valid_idx (array) – Indices for validation samples.

  • method (str) – RBF function type.

  • metric (str) – ‘rmse’ or ‘mae’.

Returns:

Error value (RMSE or MAE).

Return type:

float