Permalink
Browse files

DOC: example_discrete.py fit adjustments

  • Loading branch information...
1 parent 4f79bb3 commit c5b5fa5463e3551073bf93b42d40e91b2ee0bc03 @josef-pkt josef-pkt committed Sep 29, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 examples/example_discrete.py
@@ -92,16 +92,18 @@
print poisson_margeff.summary()
# l1 regularized Poisson model
+poisson_mod2 = sm.Poisson(rand_data.endog, rand_exog)
alpha = 0.1 * len(rand_data.endog) * np.ones(rand_exog.shape[1])
+alpha = 0.1 * np.ones(rand_exog.shape[1])
alpha[-1] = 0
-poisson_l1_res = poisson_mod.fit_regularized(method='l1', alpha=alpha)
+poisson_l1_res = poisson_mod2.fit_regularized(method='l1', alpha=alpha)
#Alternative solvers
#-------------------
# The default method for fitting discrete data MLE models is Newton-Raphson.
# You can use other solvers by using the ``method`` argument:
-mlogit_res = mlogit_mod.fit(method='bfgs', maxiter=100)
+mlogit_res = mlogit_mod.fit(method='bfgs', maxiter=500)
#.. The below needs a lot of iterations to get it right?
#.. TODO: Add a technical note on algorithms

0 comments on commit c5b5fa5

Please sign in to comment.