[Biopython-dev] [Bug 2697] MaxEntropy calculate function assumes integer values for class and convergence criteria is hard coded

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Sun Dec 14 02:20:37 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2697





------- Comment #3 from bsouthey at gmail.com  2008-12-13 21:20 EST -------
(In reply to comment #2)
> (In reply to comment #0)
> > Also, the convergence criteria is hard coded into the file by the following
> > gloable definitions:
> > MAX_IIS_ITERATIONS = 10000    # Maximum iterations for IIS.
> > IIS_CONVERGE = 1E-5           # Convergence criteria for IIS.
> > MAX_NEWTON_ITERATIONS = 100   # Maximum iterations on Newton's method.
> > NEWTON_CONVERGE = 1E-10       # Convergence criteria for Newton's method.
> > 
> > This makes it impossible for the user to specify their own values without
> > changing the actual function.
> 
> No, you can change them in your own code - they are just module level variable.
> For example:
> 
> from Bio import MaxEntropy
> #Check the current limit,
> print MaxEntropy.MAX_NEWTON_ITERATIONS
> #Increase the iteration limit,
> MaxEntropy.MAX_NEWTON_ITERATIONS = 1000
> 
> One might argue these should be *optional* arguments to the functions. 
> However, your suggested change adds new *required* arguments, which is not a
> backwards compatible API change.
> 
> Peter
> 

I strongly disagree on this because a user should not have to read the module
source code to find these module level global variables and what values these
actually are. But this is not my code.


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list