epidemioptim/environments/models/heffernan_ode_model_16.py
def define_params_and_initial_state_distributions(self):
        """
        Extract and define distributions of parameters for all age groups
        """
        for i in self._age_groups:
            self._all_internal_params_distribs[i] = dict(A=np.array(calculate_A_and_c(0, 1, self.contact_modifiers, self.perturbations_matrices, self.transition_matrices)[0]),                                                         
                                                         alpha=np.array(duplicate_data([1, 2/3, 1/3, 0], 16)).T,
                                                         beta=np.array(duplicate_data([0.04, 0.08, 0.008], 16)),
                                                         c=calculate_A_and_c(0, 1, self.contact_modifiers, self.perturbations_matrices, self.transition_matrices)[1],
                                                         delta=np.array([[0.0, 0.0, 0.0, 0.00001],
                                                                        [0.0, 0.0, 0.0, 0.00001],
                                                                        [0.0, 0.0, 0.0, 0.00001],
                                                                        [0.0, 0.0, 0.0, 0.00001],
                                                                        [0.0, 0.0, 0.0, 0.00005],
                                                                        [0.0, 0.0, 0.0, 0.00005],
                                                                        [0.0, 0.0, 0.0, 0.0002],
                                                                        [0.0, 0.0, 0.0, 0.0002],
                                                                        [0.0, 0.0, 0.0, 0.0005],
                                                                        [0.0, 0.0, 0.0, 0.0005],
                                                                        [0.0, 0.0, 0.0, 0.002],
                                                                        [0.0, 0.0, 0.0, 0.002],
                                                                        [0.0, 0.0, 0.0, 0.007],
                                                                        [0.0, 0.0, 0.0, 0.007],
                                                                        [0.0, 0.0, 0.0, 0.019],
                                                                        [0.0, 0.0, 0.0, 0.083]]).T,
                                                         epsilon=1-0.559,
                                                         gamma=np.array(duplicate_data([0, 0.2, 0.1, 1/15], 16)).T,
                                                         kappa=np.array(duplicate_data([0, 1/1.5, 1/1.5, 1/1.5], 16)).T,
                                                         nu=0,
                                                         omega=np.array(duplicate_data([0, 1/365, 1/365, 1/365], 16)).T,
                                                         p1=np.array(self.p1).T,
                                                         p2=np.array(self.p2).T,
                                                         p3=np.array(self.p3).T,
                                                         rho=0.894,
                                                         sigma=np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), 
                                                         sigma2=np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]) 
                                                         )

            self._all_initial_state_distribs[i] = dict(S20=DiracDist(params=0, stochastic=self.stochastic),
                                                       S30=DiracDist(params=0, stochastic=self.stochastic),
                                                       S40=DiracDist(params=0, stochastic=self.stochastic),
                                                       E210=DiracDist(params=0, stochastic=self.stochastic),
                                                       E220=DiracDist(params=0, stochastic=self.stochastic),
                                                       E230=DiracDist(params=0, stochastic=self.stochastic),
                                                       E310=DiracDist(params=0, stochastic=self.stochastic),
                                                       E320=DiracDist(params=0, stochastic=self.stochastic),
                                                       E330=DiracDist(params=0, stochastic=self.stochastic),
                                                       E410=DiracDist(params=0, stochastic=self.stochastic),
                                                       E420=DiracDist(params=0, stochastic=self.stochastic),
                                                       E430=DiracDist(params=0, stochastic=self.stochastic),
                                                       V110=DiracDist(params=0, stochastic=self.stochastic),
                                                       V210=DiracDist(params=0, stochastic=self.stochastic),
                                                       V310=DiracDist(params=0, stochastic=self.stochastic),
                                                       V410=DiracDist(params=0, stochastic=self.stochastic),
                                                       V120=DiracDist(params=0, stochastic=self.stochastic),
                                                       V220=DiracDist(params=0, stochastic=self.stochastic),
                                                       V320=DiracDist(params=0, stochastic=self.stochastic),
                                                       V420=DiracDist(params=0, stochastic=self.stochastic),
                                                       I20=DiracDist(params=0, stochastic=self.stochastic),
                                                       I30=DiracDist(params=0, stochastic=self.stochastic),
                                                       I40=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV110=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV210=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV310=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV410=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV120=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV220=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV320=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV420=DiracDist(params=0, stochastic=self.stochastic))

        Extract and define distributions of parameters for all age groups
        
Extract and define distributions of parameters for all age groups
Extract and define distributions of parameters for all age groups
def define_params_and_initial_state_distributions(self):
        for i in self._age_groups:
            self._all_internal_params_distribs[i] = dict(A=np.array(calculate_A_and_c(0, 1, self.contact_modifiers, self.perturbations_matrices, self.transition_matrices)[0]),                                                         
                                                         alpha=np.array(duplicate_data([1, 2/3, 1/3, 0], 16)).T,
                                                         beta=np.array(duplicate_data([0.04, 0.08, 0.008], 16)),
                                                         c=calculate_A_and_c(0, 1, self.contact_modifiers, self.perturbations_matrices, self.transition_matrices)[1],
                                                         delta=np.array([[0.0, 0.0, 0.0, 0.00001],
                                                                        [0.0, 0.0, 0.0, 0.00001],
                                                                        [0.0, 0.0, 0.0, 0.00001],
                                                                        [0.0, 0.0, 0.0, 0.00001],
                                                                        [0.0, 0.0, 0.0, 0.00005],
                                                                        [0.0, 0.0, 0.0, 0.00005],
                                                                        [0.0, 0.0, 0.0, 0.0002],
                                                                        [0.0, 0.0, 0.0, 0.0002],
                                                                        [0.0, 0.0, 0.0, 0.0005],
                                                                        [0.0, 0.0, 0.0, 0.0005],
                                                                        [0.0, 0.0, 0.0, 0.002],
                                                                        [0.0, 0.0, 0.0, 0.002],
                                                                        [0.0, 0.0, 0.0, 0.007],
                                                                        [0.0, 0.0, 0.0, 0.007],
                                                                        [0.0, 0.0, 0.0, 0.019],
                                                                        [0.0, 0.0, 0.0, 0.083]]).T,
                                                         epsilon=1-0.559,
                                                         gamma=np.array(duplicate_data([0, 0.2, 0.1, 1/15], 16)).T,
                                                         kappa=np.array(duplicate_data([0, 1/1.5, 1/1.5, 1/1.5], 16)).T,
                                                         nu=0,
                                                         omega=np.array(duplicate_data([0, 1/365, 1/365, 1/365], 16)).T,
                                                         p1=np.array(self.p1).T,
                                                         p2=np.array(self.p2).T,
                                                         p3=np.array(self.p3).T,
                                                         rho=0.894,
                                                         sigma=np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), 
                                                         sigma2=np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]) 
                                                         )
            self._all_initial_state_distribs[i] = dict(S20=DiracDist(params=0, stochastic=self.stochastic),
                                                       S30=DiracDist(params=0, stochastic=self.stochastic),
                                                       S40=DiracDist(params=0, stochastic=self.stochastic),
                                                       E210=DiracDist(params=0, stochastic=self.stochastic),
                                                       E220=DiracDist(params=0, stochastic=self.stochastic),
                                                       E230=DiracDist(params=0, stochastic=self.stochastic),
                                                       E310=DiracDist(params=0, stochastic=self.stochastic),
                                                       E320=DiracDist(params=0, stochastic=self.stochastic),
                                                       E330=DiracDist(params=0, stochastic=self.stochastic),
                                                       E410=DiracDist(params=0, stochastic=self.stochastic),
                                                       E420=DiracDist(params=0, stochastic=self.stochastic),
                                                       E430=DiracDist(params=0, stochastic=self.stochastic),
                                                       V110=DiracDist(params=0, stochastic=self.stochastic),
                                                       V210=DiracDist(params=0, stochastic=self.stochastic),
                                                       V310=DiracDist(params=0, stochastic=self.stochastic),
                                                       V410=DiracDist(params=0, stochastic=self.stochastic),
                                                       V120=DiracDist(params=0, stochastic=self.stochastic),
                                                       V220=DiracDist(params=0, stochastic=self.stochastic),
                                                       V320=DiracDist(params=0, stochastic=self.stochastic),
                                                       V420=DiracDist(params=0, stochastic=self.stochastic),
                                                       I20=DiracDist(params=0, stochastic=self.stochastic),
                                                       I30=DiracDist(params=0, stochastic=self.stochastic),
                                                       I40=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV110=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV210=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV310=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV410=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV120=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV220=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV320=DiracDist(params=0, stochastic=self.stochastic),
                                                       CV420=DiracDist(params=0, stochastic=self.stochastic))
def define_params_and_initial_state_distributions ( self ) : for i in self . _age_groups : self . _all_internal_params_distribs [ i ] = dict ( A = np . array ( calculate_A_and_c ( 0 , 1 , self . contact_modifiers , self . perturbations_matrices , self . transition_matrices ) [ 0 ] ) , alpha = np . array ( duplicate_data ( [ 1 , 2 / 3 , 1 / 3 , 0 ] , 16 ) ) . T , beta = np . array ( duplicate_data ( [ 0.04 , 0.08 , 0.008 ] , 16 ) ) , c = calculate_A_and_c ( 0 , 1 , self . contact_modifiers , self . perturbations_matrices , self . transition_matrices ) [ 1 ] , delta = np . array ( [ [ 0.0 , 0.0 , 0.0 , 0.00001 ] , [ 0.0 , 0.0 , 0.0 , 0.00001 ] , [ 0.0 , 0.0 , 0.0 , 0.00001 ] , [ 0.0 , 0.0 , 0.0 , 0.00001 ] , [ 0.0 , 0.0 , 0.0 , 0.00005 ] , [ 0.0 , 0.0 , 0.0 , 0.00005 ] , [ 0.0 , 0.0 , 0.0 , 0.0002 ] , [ 0.0 , 0.0 , 0.0 , 0.0002 ] , [ 0.0 , 0.0 , 0.0 , 0.0005 ] , [ 0.0 , 0.0 , 0.0 , 0.0005 ] , [ 0.0 , 0.0 , 0.0 , 0.002 ] , [ 0.0 , 0.0 , 0.0 , 0.002 ] , [ 0.0 , 0.0 , 0.0 , 0.007 ] , [ 0.0 , 0.0 , 0.0 , 0.007 ] , [ 0.0 , 0.0 , 0.0 , 0.019 ] , [ 0.0 , 0.0 , 0.0 , 0.083 ] ] ) . T , epsilon = 1 - 0.559 , gamma = np . array ( duplicate_data ( [ 0 , 0.2 , 0.1 , 1 / 15 ] , 16 ) ) . T , kappa = np . array ( duplicate_data ( [ 0 , 1 / 1.5 , 1 / 1.5 , 1 / 1.5 ] , 16 ) ) . T , nu = 0 , omega = np . array ( duplicate_data ( [ 0 , 1 / 365 , 1 / 365 , 1 / 365 ] , 16 ) ) . T , p1 = np . array ( self . p1 ) . T , p2 = np . array ( self . p2 ) . T , p3 = np . array ( self . p3 ) . T , rho = 0.894 , sigma = np . array ( [ 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ] ) , sigma2 = np . array ( [ 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ] ) ) self . _all_initial_state_distribs [ i ] = dict ( S20 = DiracDist ( params = 0 , stochastic = self . stochastic ) , S30 = DiracDist ( params = 0 , stochastic = self . stochastic ) , S40 = DiracDist ( params = 0 , stochastic = self . stochastic ) , E210 = DiracDist ( params = 0 , stochastic = self . stochastic ) , E220 = DiracDist ( params = 0 , stochastic = self . stochastic ) , E230 = DiracDist ( params = 0 , stochastic = self . stochastic ) , E310 = DiracDist ( params = 0 , stochastic = self . stochastic ) , E320 = DiracDist ( params = 0 , stochastic = self . stochastic ) , E330 = DiracDist ( params = 0 , stochastic = self . stochastic ) , E410 = DiracDist ( params = 0 , stochastic = self . stochastic ) , E420 = DiracDist ( params = 0 , stochastic = self . stochastic ) , E430 = DiracDist ( params = 0 , stochastic = self . stochastic ) , V110 = DiracDist ( params = 0 , stochastic = self . stochastic ) , V210 = DiracDist ( params = 0 , stochastic = self . stochastic ) , V310 = DiracDist ( params = 0 , stochastic = self . stochastic ) , V410 = DiracDist ( params = 0 , stochastic = self . stochastic ) , V120 = DiracDist ( params = 0 , stochastic = self . stochastic ) , V220 = DiracDist ( params = 0 , stochastic = self . stochastic ) , V320 = DiracDist ( params = 0 , stochastic = self . stochastic ) , V420 = DiracDist ( params = 0 , stochastic = self . stochastic ) , I20 = DiracDist ( params = 0 , stochastic = self . stochastic ) , I30 = DiracDist ( params = 0 , stochastic = self . stochastic ) , I40 = DiracDist ( params = 0 , stochastic = self . stochastic ) , CV110 = DiracDist ( params = 0 , stochastic = self . stochastic ) , CV210 = DiracDist ( params = 0 , stochastic = self . stochastic ) , CV310 = DiracDist ( params = 0 , stochastic = self . stochastic ) , CV410 = DiracDist ( params = 0 , stochastic = self . stochastic ) , CV120 = DiracDist ( params = 0 , stochastic = self . stochastic ) , CV220 = DiracDist ( params = 0 , stochastic = self . stochastic ) , CV320 = DiracDist ( params = 0 , stochastic = self . stochastic ) , CV420 = DiracDist ( params = 0 , stochastic = self . stochastic ) )
Extract and define distributions of parameters for all age groups
Extract and define distributions of parameters for all age groups
"""
        Extract and define distributions of parameters for all age groups
        """
self