class_docstr: Abstract class for preparing data in order to train a surrogate model.
  
  Parameters
  ----------
  scenario : Scenario object.
  considered_states : list[StatusType], defaults to [StatusType.SUCCESS, StatusType.CRASHED, StatusType.MEMORYOUT]  # noqa: E501
      Trials with the passed states are considered.
  lower_budget_states : list[StatusType], defaults to []
      Additionally consider all trials with these states for budget < current budget.
  scale_percentage : int, defaults to 5
      Scaled y-transformation use a percentile to estimate distance to optimum. Only used in some sub-classes.
  seed : int | None, defaults to none
  
  Raises
  ------
  TypeError
      If no success states are given.
docstr: Builds x and y matrices from selected runs of the RunHistory.
  
  Parameters
  ----------
  trials : Mapping[TrialKey, TrialValue]
  runhistory : RunHistory
  store_statistics: bool, defaults to false
      Whether to store statistics about the data (to be used at subsequent calls).
  
  Returns
  -------
  X : np.ndarray
  Y : np.ndarray
docstr_tok: ["Builds","x","and","y","matrices","from","selected","runs","of","the","RunHistory",".","Parameters","--","--","--","--","--","trials",":","Mapping","[","TrialKey",",","TrialValue","]","runhistory",":","RunHistory","store_statistics",":","bool",",","defaults","to","false","Whether","to","store","statistics","about","the","data","(","to","be","used","at","subsequent","calls",")",".","Returns","--","--","--","-","X",":","np.ndarray","Y",":","np.ndarray"]
code: def _build_matrix(
      self,
      trials: Mapping[TrialKey, TrialValue],
      store_statistics: bool = False,
  ) -> tuple[np.ndarray, np.ndarray]:
      """Builds x and y matrices from selected runs of the RunHistory.
  
      Parameters
      ----------
      trials : Mapping[TrialKey, TrialValue]
      runhistory : RunHistory
      store_statistics: bool, defaults to false
          Whether to store statistics about the data (to be used at subsequent calls).
  
      Returns
      -------
      X : np.ndarray
      Y : np.ndarray
      """
      raise NotImplementedError()
  
imports: from __future__ import annotations
  from abc import abstractmethod
  from typing import Any, Mapping
  import numpy
  from smac.multi_objective import AbstractMultiObjectiveAlgorithm
  from smac.runhistory.runhistory import RunHistory, TrialKey, TrialValue
  from smac.runner.abstract_runner import StatusType
  from smac.scenario import Scenario
  from smac.utils.configspace import convert_configurations_to_array
  from smac.utils.logging import get_logger
label_desc: Use image node_id 7 for calling the AbstractRunHistoryEncoder obj's underlying member method code with example usage: obj._build_matrix(trials, store_statistics) without return types