In [10]:
#example of the use of a CMAC ANN with the xor toy problem
import sys
sys.path.append('../cmac')
X = [[0., 0.],[0., 1.], [1., 0.], [1., 1.]]
y = [0, 1, 1, 0]

In [12]:
mycmac = cmac.CMAC(2, 30)


---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-12-84441b6800ef> in <module>()
----> 1 mycmac = cmac.CMAC(2, 30)

NameError: name 'cmac' is not defined

In [ ]:


In [ ]:
print'Results:'
print '0 0:', outp[0]
print '0 1:', outp[1]
print '1 0:', outp[2]
print '1 1:', outp[0]