clearbox/models/brute_force.py [55:68]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  def fit(
      self,
      x: npt.NDArray[float],
      y: npt.NDArray[float],
      query: npt.NDArray[int],
  ):
    """Train the model using features `x`, targets `y` and query IDs `query`.

    Args:
      x: Array of input features. Shape: (N, F).
      y: Array of targets. Shape: (N,).
      query: Array of integer query IDs. Shape: (N,).
    """
    n_feat = x.shape[1]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



clearbox/models/probabilistic.py [339:371]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  def fit(
      self,
      x: npt.NDArray[float],
      y: npt.NDArray[float],
      query: npt.NDArray[int],
  ):
    """Train the model using features `x`, targets `y` and query IDs `query`.

    1. Generate a grid of all possible weight combinations using based on the
    `grid_size` value.
    2. Randomly sample `seed_batch_size` weight arrays from the grid, compute
    `metric` values for each of those and train the initial version of the
    `surrogate_model` on the resulting weight & metric value pairs.
    3. Repeat `n_opt_steps` times:
      I. Use the `surrogate_model` to compute the approximation of the `metric`
      values for the whole grid (excluding the samples that have been used to
      train the `surrogate_model`).
      II. Use the `acquisition_function` to score the predictions from previous
      step.
      III. Take first `batch_size` candidates with the largest score from the
      previous step and compute the `metric` value for them.
      IV. Add weights and the `metric` values from the previous step to the
      train set of the `surrogate_model` and retrain it on the larger dataset.
    4. From the set of computed `metric` values, pick the index of the largest
    component and save the corresponding array of weights to `self._weights`.

    Args:
      x: Array of input features. Shape: (N, F).
      y: Array of targets. Shape: (N,).
      query: Array of integer query IDs. Shape: (N,).
    """
    # x: N x F
    n_feat = x.shape[1]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



