def speedup_analysis(self, N_generator=None, filename=None, **kwargs):
     # Perform first the EIM speedup analysis, ...
     if ("with_respect_to" not in
             kwargs  # otherwise we assume the user was interested in computing the speedup w.r.t.
             # an exact parametrized functions,
             # so he probably is not interested in the speedup analysis of EIM
             and
         ("EIM" not in
          kwargs  # otherwise we assume the user was interested in computing the speedup for a fixed number of EIM basis
          # functions, thus he has already carried out the speedup analysis of EIM
          or ("EIM" in kwargs and kwargs["EIM"] is not None
              )  # shorthand to disable EIM error analysis
          )):
         EIM_N_generator = kwargs.pop("EIM_N_generator", None)
         assert is_training_finished(self.truth_problem)
         set_map_from_problem_to_training_status_off(self.truth_problem)
         for (coeff,
              EIM_reduction_coeff) in self.EIM_reductions.items():
             EIM_reduction_coeff.speedup_analysis(
                 EIM_N_generator, filename)
         set_map_from_problem_to_training_status_on(self.truth_problem)
     # ..., and then call the parent method.
     if "EIM" in kwargs and kwargs["EIM"] is None:
         del kwargs["EIM"]
     DifferentialProblemReductionMethod_DerivedClass.speedup_analysis(
         self, N_generator, filename, **kwargs)
 def error_analysis(self, N_generator=None, filename=None, **kwargs):
     # Perform first the DEIM error analysis, ...
     if ("with_respect_to" not in kwargs
             # otherwise we assume the user was interested in computing the error w.r.t.
             # an exact parametrized functions, so he probably is not interested in the error analysis of DEIM
             and
         ("DEIM" not in kwargs
          # otherwise we assume the user was interested in computing the error for a fixed number
          # of DEIM basis functions, thus he has already carried out the error analysis of DEIM
          or ("DEIM" in kwargs and kwargs["DEIM"] is not None
              # shorthand to disable DEIM error analysis
              ))):
         DEIM_N_generator = kwargs.pop("DEIM_N_generator", None)
         assert is_training_finished(self.truth_problem)
         set_map_from_problem_to_training_status_off(self.truth_problem)
         for (term,
              DEIM_reductions_term) in self.DEIM_reductions.items():
             for (_, DEIM_reduction_term_q
                  ) in DEIM_reductions_term.items():
                 DEIM_reduction_term_q.error_analysis(
                     DEIM_N_generator, filename)
         set_map_from_problem_to_training_status_on(self.truth_problem)
     # ..., and then call the parent method.
     if "DEIM" in kwargs and kwargs["DEIM"] is None:
         del kwargs["DEIM"]
     DifferentialProblemReductionMethod_DerivedClass.error_analysis(
         self, N_generator, filename, **kwargs)