Open JCirera opened 6 years ago
I also had the same issue
actually it can not import hole file .. due to lack of coding..so you have to copy membership file from membership folder and have to paste in main folder of anfis.. then run it ...
Ok so this is how it worked for me import anfis
Copy+paste membershipfunction and mfDerivs in the main anfis folder
In the anfis folder -> init.py remove "from membership import membershipfunction" and "from membership import mfDerivs" Subsequently in anfis.py import membershipfunction
This should work
Yeah that's because of the python version So edit the files in the membership folder
Actually I did these stage and run it on ipython:
same issue- I am trying to deal with it on Python3
Ok so this is how it worked for me import anfis
Copy+paste membershipfunction and mfDerivs in the main anfis folder
In the anfis folder -> init.py remove "from membership import membershipfunction" and "from membership import mfDerivs" Subsequently in anfis.py import membershipfunction
This should work
could you run the tests.py?
Can you kindly explain this Loc?
mf = [[['gaussmf',{'mean':0.,'sigma':1.}],['gaussmf',{'mean':-1.,'sigma':2.}],['gaussmf',{'mean':-4.,'sigma':10.}],['gaussmf',{'mean':-7.,'sigma':7.}]], [['gaussmf',{'mean':1.,'sigma':2.}],['gaussmf',{'mean':2.,'sigma':3.}],['gaussmf',{'mean':-2.,'sigma':10.}],['gaussmf',{'mean':-10.5,'sigma':5.}]]]
i need help in that. i just copied the membershipfunction.py and mfDerivs.py from the member-folder to the anfis-folder, removed in the anfis-init everything expect import anfis, and in the anfis.py i wrote import membershipfunction and import mfDerivs. Now i can import anfis correctly, but i cannot use the membershipfunction as MemFuncs or as membershipfunction() or as anfis.member...() or as anfis.MemFuns(). How can i do that?
HiPls do the instruction step by step in my github. Its finally work. Its for long time ago and I dont use python 2 for running the Anfis model. May be your issue is about expire the python 2. Fatemi Seyed Ehsan Assistant Professor at Razi University, Water Engineering Department, Kermanshah, Iran. P.O. box, 6715685438 Fax: +98 (0)831 8323727
On Friday, May 8, 2020, 04:59:51 PM GMT+4:30, elihek <notifications@github.com> wrote:
i need help in that. i just copied the membershipfunction.py and mfDerivs.py from the member-folder to the anfis-folder, removed in the anfis-init everything expect import anfis, and in the anfis.py i wrote import membershipfunction and import mfDerivs. Now i can import anfis correctly, but i cannot use the membershipfunction as MemFuncs or as membershipfunction() or as anfis.member...() or as anfis.MemFuns(). How can i do that?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi Dr. Ehsan,I am using Python 3 and your Step by Step guide does not work for it. If i do the steps and than from anfis import membershipfunction the error "no Module error" Occurs so i need help
HiThis package is using paython 2. It means that its not working in python 3 environment. Use these:anfis.membership.membershipfunction.MemFuncs(mf)
anfis.anfis.ANFIS(X, Y, mfc) You should add extra anfis before the commandGood lock Fatemi Seyed Ehsan Assistant Professor at Razi University, Water Engineering Department, Kermanshah, Iran. P.O. box, 6715685438 Fax: +98 (0)831 8323727
On Friday, May 8, 2020, 11:21:51 PM GMT+4:30, elihek <notifications@github.com> wrote:
Hi Dr. Ehsan,I am using Python 3 and your Step by Step guide does not work for it. If i do the steps and than from anfis import membershipfunction the error "no Module error" Occurs so i need help
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
HiUse:From anfis.membership import mem.... Fatemi Seyed Ehsan Assistant Professor at Razi University, Water Engineering Department, Kermanshah, Iran. P.O. box, 6715685438 Fax: +98 (0)831 8323727
On Friday, May 8, 2020, 11:21:51 PM GMT+4:30, elihek <notifications@github.com> wrote:
Hi Dr. Ehsan,I am using Python 3 and your Step by Step guide does not work for it. If i do the steps and than from anfis import membershipfunction the error "no Module error" Occurs so i need help
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I solved my problem just by building a new Python 2-environment, so everything goes good now. Thanks a lot!
solved. simply, you have to add the following file (https://github.com/twmeggs/anfis/tree/master/anfisl) in your repository. Have a nice day
this repository is empty so can you please tell me how to solve it? i need help in that. i just copied the membershipfunction.py and mfDerivs.py from the member-folder to the anfis-folder, removed in the anfis-init everything expect import anfis, and in the anfis.py i wrote import membershipfunction and import mfDerivs. Now i can import anfis correctly, but i cannot use the membershipfunction as MemFuncs or as membershipfunction() or as anfis.member...() or as anfis.MemFuns(). and now I am trying to write From anfis.membership import mem....
Also, What if I don’t wanna work with python 2?
Hi All, is there any Update of ANFIS for PYTHON3, or is there any link that i can get ANFIS code for python 3 thanks.
for python 3, copying the membershipfunction.py and mfDerivs.py from the member-folder to the anfis-folder, removed in the anfis-init everything expect import anfis, and in the anfis.py i wrote import membershipfunction and import mfDerivs and using the following:
import anfis from anfis import membershipfunction, mfDerivs import numpy
it worked for me
I copied the two sub-programs of membership directly into anfis.py and then deleted membersfunction and mfDerivs, and finally invoked them with the following program
from anfis.anfis import MemFuncs, ANFIS....
For python 3, just add a dot before each ‘membership’ in the file init.py located in the anfis folder, so that it becomes:
import anfis from .membership import membershipfunction from .membership import mfDerivs
So you don't need to move files.
hey,sir.could you give me a email?I want to ask the steps in detail about installing the anfis on python3.I'm not a cs student,needing help.
I installed the anfis package using anaconda prompt and pip. I am using python 3.6 and the error that appears is: "ModuleNotFoundError: No module named 'membership'".
What could be happening?
Thanks in advance!
PD: the membership folder is inside the anfis folder and contains all the functions. Furthermore, the anfis package is inside the anaconda lib folder.