class_docstr: Encapsulates the data within a split of feature space.
  Primarily used to cache computations on the data for better performance
  
  Parameters
  ----------
  X: np.ndarray
      The subset of the covariate matrix that falls into the split
  y: np.ndarray
      The subset of the target array that falls into the split
  normalize: bool
      Whether to map the target into -0.5, 0.5
  cache: bool
      Whether to cache common values.
      You really only want to turn this off if you're not going to the resulting object for anything (e.g. when testing)
class_docstr_tok: ["Encapsulates","the","data","within","a","split","of","feature","space",".","Primarily","used","to","cache","computations","on","the","data","for","better","performance","Parameters","--","--","--","--","--","X",":","np.ndarray","The","subset","of","the","covariate","matrix","that","falls","into","the","split","y",":","np.ndarray","The","subset","of","the","target","array","that","falls","into","the","split","normalize",":","bool","Whether","to","map","the","target","into","-0.5",",","0.5","cache",":","bool","Whether","to","cache","common","values",".","You","really","only","want","to","turn","this","off","if","you","'re","not","going","to","the","resulting","object","for","anything","(","e.g",".","when","testing",")"]
code: def __init__(
      self,
      X: np.ndarray,
      y: np.ndarray,
      mask: Optional[np.ndarray] = None,
      normalize: bool = False,
      unique_columns: List[int] = None,
      splittable_variables: Optional[List[Optional[bool]]] = None,
      y_sum: float = None,
      n_obsv: int = None,
  ):
      if mask is None:
          mask = np.zeros_like(y).astype(bool)
      self._mask: np.ndarray = mask
  
      if n_obsv is None:
          n_obsv = (~self.mask).astype(int).sum()
  
      self._n_obsv = n_obsv
  
      self._X = CovariateMatrix(
          X, mask, n_obsv, unique_columns, splittable_variables
      )
      self._y = Target(y, mask, n_obsv, normalize, y_sum)
  
imports: from operator import gt, le
  from typing import Any, List, Optional, Union
  import numpy
  import pandas
  from .errors import NoSplittableVariableException
  from .splitcondition import SplitCondition
label_desc: Use image node_id 1 to create a new Data object from inherited base classes: object with example: obj = Data(X, y, mask, normalize, unique_columns, splittable_variables, y_sum, n_obsv)