def __init__(self, parameters, stimulus, T, dt, name='HHSimulator'): """ Initialize derived class to properly connect it to its input models. It accepts as input an InputConnector object that fully specifies how to connect all parent models to the current model. Parameters ---------- parameters : list A list of input parameters to connect. stimulus : array of shape (int(T/dt)+1) or callable with signature '(t)' The input stimulus T : float Simulation time dt : float Time step name : str A human readable name for the model. """ self.I = stimulus self.T = T self.dt = dt self.hh = HodgkinHuxley() input_parameters = InputConnector.from_list(parameters) super(HHSimulator, self).__init__(input_parameters, name)
def __init__(self, parameters, name='BivariateGaussianMixtureModel'): input_parameters = InputConnector.from_list(parameters) super(BivariateGaussianMixtureModel, self).__init__(input_parameters, name) self.cov0 = np.array([[0.5, -0.3], [-0.3, 0.5]]) self.cov1 = np.array([[0.25, 0], [0, 0.25]])
def __init__(self, parameters, n_timestep=250, burnin=50, name="RecruitmentBoomBust"): input_parameters = InputConnector.from_list(parameters) self.n_timestep = n_timestep self.burnin = burnin # Parameter specifying the dimension of the return values of the distribution. super(RecruitmentBoomBust, self).__init__(input_parameters, name)
def __init__(self, parameters, T=20, n_integration_steps=1000, noise=True, name='LotkaVolterra'): self.T = T self.n_integration_steps = n_integration_steps self.noise = noise self.X0 = np.array([30, 1]) # capital X is [x,y] self.sigma_lognormal = 0.1 input_parameters = InputConnector.from_list(parameters) super(LotkaVolterra, self).__init__(input_parameters, name)
def __init__(self, parameters, num_AR_params=2, num_MA_params=2, size=100, name='ARMA model'): """size is the length of the timeseries to be generated by the model. The AR parameters always need to be passed before the MA parameters.""" if not isinstance(parameters, list): raise TypeError('Input of ARMAmodel model is of type list') self.size = size self.num_AR_params = num_AR_params self.num_MA_params = num_MA_params self.total_num_params = num_AR_params + num_MA_params self._check_num_parameters(parameters) input_connector = InputConnector.from_list(parameters) super(ARMAmodel, self).__init__(input_connector, name)
def __init__(self, parameters, n_timestep=100, name="Ricker"): input_parameters = InputConnector.from_list(parameters) self.n_timestep = n_timestep # Parameter specifying the dimension of the return values of the distribution. super(Ricker, self).__init__(input_parameters, name)
def __init__(self, parameters, size=5, name='Multivariate_g_and_k'): self.size = size self.c = 0.8 # fix this input_parameters = InputConnector.from_list(parameters) super(Multivariate_g_and_k, self).__init__(input_parameters, name)
def __init__(self, parameters, iid_size=1, name='Iid_Gamma'): self.iid_size = iid_size input_parameters = InputConnector.from_list(parameters) super(IidGamma, self).__init__(input_parameters, name)
def __init__(self, parameters, n_samples=10, name='Bivariate_Normal'): input_parameters = InputConnector.from_list(parameters) self.n_samples = n_samples super(BivariateNormal, self).__init__(input_parameters, name)
def __init__(self, parameters, number_steps=5, name='M/G/1'): self.number_steps = number_steps input_parameters = InputConnector.from_list(parameters) super(MG1Queue, self).__init__(input_parameters, name)