code: def conditional_probability_alive_matrix(self, max_frequency=None, max_recency=None):
          
          max_frequency = max_frequency or int(self.data["frequency"].max())
          max_recency = max_recency or int(self.data["T"].max())
  
          return np.fromfunction(
              self.conditional_probability_alive, (max_frequency + 1, max_recency + 1), T=max_recency
          ).T
docs: Compute the probability alive matrix.
  
          Parameters
          ----------
          max_frequency: float, optional
              the maximum frequency to plot. Default is max observed frequency.
          max_recency: float, optional
              the maximum recency to plot. This also determines the age of the
              customer. Default to max observed age.
  
          Returns
          -------
          matrix:
              A matrix of the form [t_x: historical recency, x: historical frequency]