Menu

#4 XOR example doesnt work

closed
nobody
None
5
2009-09-14
2009-01-17
Anonymous
No

$python examples/xor.py
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/networkx/hybrid.py:16: DeprecationWarning: the sets module is deprecated
import sets
FINDING STARTING WEIGHTS WITH GENETIC ALGORITHM...
Traceback (most recent call last):
File "examples/xor.py", line 24, in <module>
net.train_genetic(input, target, individuals=20, generations=500)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ffnet/ffnet.py", line 628, in train_genetic
self.weights = pikaia(func, n, extra_args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/ffnet/pikaia.py", line 121, in pikaia
_pikaia.rninit(randint(1, 999999999))
RuntimeError: more argument specifiers than keyword list entries (remaining format:'|:_pikaia.rninit')

Discussion

  • Marek

    Marek - 2009-01-28

    Hi!
    It seems you use python-2.6. Current versions of numpy and scipy (and thus ffnet) is not compatibile with 2.6. It is said that numpy-1.3 will fiz this problem.

    Sorry for the daly in answering....
    Marek

     
  • Nobody/Anonymous

    I have installed python 2.5 with all the recent networkX extension as well as SciPy and NumPy, but I am seeing following error during my installation test:

    ======================================================================
    ERROR: testNoCycles (ffnet._tests.Testffconec)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
    File "C:\Python25\Lib\site-packages\ffnet\_tests.py", line 153, in testNoCycles
    n = _ffconec(conec)
    File "C:\Python25\lib\site-packages\ffnet\ffnet.py", line 170, in _ffconec
    ins = graph.in_edges(node)
    AttributeError: 'DiGraph' object has no attribute 'in_edges'

    ----------------------------------------------------------------------
    Ran 43 tests in 0.687s

    When I look at the source code of DiGraph in networkX package, I don't see this "in_edges" and "out_edges" functions...

    I appreciate your help on this.

     
  • Marek

    Marek - 2009-09-14

    trunk version of ffnet works now with newer networkx releases...

     
  • Marek

    Marek - 2009-09-14
    • status: open --> closed
     

Log in to post a comment.