def __init__(self, model, lambda_param, ncats, alpha_lambda=<NUM_LIT:1.0>,<EOL>beta_lambda=<NUM_LIT>, freeparams=['<STR_LIT>', '<STR_LIT>']):
assert isinstance(model, Model)<EOL>assert not isinstance(model, DistributionModel)<EOL>assert isinstance(lambda_param, str)<EOL>self._nsites = model.nsites<EOL>self._lambda_param = lambda_param<EOL>assert self.distributedparam in model.freeparams<EOL>assert isinstance(ncats, int) and ncats >= <NUM_LIT:2><EOL>self._ncats = ncats<EOL>self._catweights = scipy.ones(self._ncats, dtype='<STR_LIT:float>') / self._ncats<EOL>self.alpha_lambda = alpha_lambda<EOL>self.beta_lambda = beta_lambda<EOL>self._models = [] <EOL>for k in range(self.ncats):<EOL><INDENT>self._models.append(copy.deepcopy(model))<EOL><DEDENT>self._freeparams = copy.copy(freeparams)<EOL>for param in model.freeparams:<EOL><INDENT>if param != self.distributedparam:<EOL><INDENT>self._freeparams.append(param)<EOL>self._PARAMLIMITS[param] = model.PARAMLIMITS[param]<EOL>self.PARAMTYPES[param] = model.PARAMTYPES[param]<EOL>pvalue = getattr(model, param)<EOL>_checkParam(param, pvalue, self.PARAMLIMITS, self.PARAMTYPES)<EOL>setattr(self, param, copy.copy(getattr(model, param)))<EOL><DEDENT><DEDENT>self.updateParams({}, update_all=True)<EOL>
Initialize a `GammaDistributedModel`.

        Args:
            `model` (`Model`)
                A substitution model with `distributedparam` as a free parameter
                that does **not** have any other property drawn from
                a distribution. Any other parameter that is in `freeparams`
                of this model will also be an optimized parameter.
            `ncats`, `lambda_param`, `alpha_omega`, `beta_omega`
                Meaning described in main class doc string.
            `freeparams`
                The free parameters will be these **plus** anything
                in `model.freeparams` other than `distributedparam`.