示例#1
0
 def initialize_training_set(self, ntrain, enable_import=True, sampling=None, **kwargs):
     import_successful = ReductionMethod.initialize_training_set(self, self.EIM_approximation.mu_range, ntrain, enable_import, sampling, **kwargs)
     # Since exact evaluation is required, we cannot use a distributed training set
     self.training_set.distributed_max = False
     # Also initialize the map from parameter values to snapshots container index
     self._training_set_parameters_to_snapshots_container_index = dict((mu, mu_index) for (mu_index, mu) in enumerate(self.training_set))
     return import_successful
示例#2
0
 def initialize_training_set(self,
                             ntrain,
                             enable_import=True,
                             sampling=None,
                             **kwargs):
     return ReductionMethod.initialize_training_set(
         self, self.truth_problem.mu_range, ntrain, enable_import,
         sampling, **kwargs)
 def initialize_training_set(self,
                             ntrain,
                             enable_import=True,
                             sampling=None,
                             **kwargs):
     assert enable_import
     import_successful = ReductionMethod.initialize_training_set(
         self, self.SCM_approximation.mu_range, ntrain, enable_import,
         sampling, **kwargs)
     self.SCM_approximation.training_set = self.training_set
     return import_successful