MCPcopy Index your code
hub / github.com/statsmodels/statsmodels / fit

Method fit

examples/python/generic_mle.py:132–143  ·  view source on GitHub ↗
(self, start_params=None, maxiter=10000, maxfun=5000, **kwds)

Source from the content-addressed store, hash-verified

130 return -ll
131
132 def fit(self, start_params=None, maxiter=10000, maxfun=5000, **kwds):
133 # we have one additional parameter and we need to add it for summary
134 self.exog_names.append('alpha')
135 if start_params == None:
136 # Reasonable starting values
137 start_params = np.append(np.zeros(self.exog.shape[1]), .5)
138 # intercept
139 start_params[-2] = np.log(self.endog.mean())
140 return super(NBin, self).fit(start_params=start_params,
141 maxiter=maxiter,
142 maxfun=maxfun,
143 **kwds)
144
145
146# Two important things to notice:

Calls 2

appendMethod · 0.45
meanMethod · 0.45

Tested by

no test coverage detected