[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 00:59:14 UTC 2008


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





------- Comment #2 from biopython-bugzilla at maubp.freeserve.co.uk  2008-12-13 19:59 EST -------
(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


-- 
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