[Biopython-dev] Bio.NeuralNetwork question and updates on 'testseq.'

Adil Iqbal aiqbal85 at gmail.com
Wed Jun 7 05:50:41 UTC 2017


​Hello all,

*TL:DR - Neural Network module is out of date. Also, I'm having an issue
with the unit test for the "testseq" function. *

Just a quick question about the Neural Network module. The module seems
just a bit out of date. It only has one available activation function and
it's located in *the BackPropagation.Layer module
<http://biopython.org/DIST/docs/api/Bio.NeuralNetwork.BackPropagation.Layer-pysrc.html>*
for some reason.

[image: Inline image 2]

Machine learning research is progressed pretty far, and no one is really
using the logistic function as much anymore. The big thing now, especially
for hidden layers is ReLU, or at the very least TanH, both of which are no
where to be found in the code. That's not to say that the logistic function
shouldn't be included, but it should definitely not be the only option. The
binary step function should also definitely be included - if only for
output layers.

Really, there should be a module *just* for activation functions. *And it
should include all of them.*
<https://en.wikipedia.org/wiki/Activation_function#Comparison_of_activation_functions>

It's not that difficult, its really just a matter of plugging an argument
into a mathematical formula and returning the result. It might be prudent
to have an "Activation" class with each of the activation formulas as a
method of the class. Though, the backprop code would have to refactored to
account for that.

Anyways, just a thought. I'd love to participate on that project, though it
would have to be a community effort.

I've also written a *unit test for the testseq function
<https://github.com/Adil-Iqbal/biopython/blob/master/Tests/test_testseq.py>*
called test_testseq.py. However, it is failing the Travis CI tests because
it is unable to import testseq.py from the Scripts directory. I attempted
using both relative and absolute imports (*PEP328*
<https://www.python.org/dev/peps/pep-0328/>) but that did not work. I am
actively looking for a solution, though I would appreciate any advice you
guys could give me. (A pull request might be more efficient way clue me in
than actually explaining the concept.)

Also, I've finalized the code for testseq. The seeding worked perfectly,
but it was acting too much like a method and not enough like an argument. I
had some of my younger cousins use it and they were a bit confused by how
the seeding worked. Since the folks who would use the code are most likely
students, teachers, and presenters (not necessarily Python experts), I
decided to revert to an earlier solution. In this case, it is fair to trade
a bit of elegance for easier intuitiveness.

Thanks again,
Adil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython-dev/attachments/20170607/ee0c535e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 14214 bytes
Desc: not available
URL: <http://mailman.open-bio.org/pipermail/biopython-dev/attachments/20170607/ee0c535e/attachment-0001.png>


More information about the Biopython-dev mailing list