GeneticSearch Filter

13 views
Skip to first unread message

Dario Martinez

unread,
Aug 2, 2024, 12:31:40 PM8/2/24
to python-weka-wrapper
Hello Good morning, I created a new environment to work with wapper3, on another of my PCs, everything installed normally, but when testing the scripts I created on my first PC, curiously the only thing that didn't work was the GeneticSearch filter, when the program reaches the following line:
assearch = ASSearch(classname="weka.attributeSelection.GeneticSearch",
options=ga_options)


The following error message appears:
Failed to instantiate weka.attributeSelection.GeneticSearch: java.lang.ClassNotFoundException: weka.attributeSelection.GeneticSearch
Class 'weka.attributeSelection.GeneticSearch' is available from package: attributeSelectionSearchMethods
Traceback (most recent call last):
File "C:\Users\Usuario\AppData\Local\Temp\ipykernel_12396\4227700774.py", line 478, in <module> main() File "C:\Users\Usuario\AppData\Local\Temp\ipykernel_12396\4227700774.py", line 275, in main assearch = ASSearch(classname="we ka.attributeSelection.GeneticSearch", File "C:\Users\Usuario\anaconda3\envs\Weka_Wapper3\lib\site-packages\weka\attribute_selection.py", line 52, in __init__ self.enforce_type(jobject, "weka.attributeSelection.ASSearch") File "C:\Users\Usuario\anaconda3\envs\Weka_Wapper3\lib\site-packages\weka\core\classes.py", line 514, in enforce_type if not cls.check_type(jobject, intf_or_class): File "C:\Users\Usuario\anaconda3\envs\Weka_Wapper3\lib\site-packages\weka\core\classes .py", line 502, in check_type return is_instance_of(jobject, intf_or_class) File "C:\Users\Usuario\anaconda3\envs\Weka_Wapper3\lib\site-packages\weka\core\classes.py", line 258, in is_instance_of if is_array(obj): File "C:\Users\Usuario\anaconda3\envs\Weka_Wapper3\lib\site-packages\weka\core\classes.py", line 277, in is_array return obj.getClass().isArray() AttributeError: 'NoneType' object has no attribute 'getClass'
 

I have the following imports, but it only seems to work on my first computer: 
from weka.attribute_selection import ASSearch, A SEvaluation, AttributeSelection

Any help to solve the problem is appreciated

Peter Reutemann

unread,
Aug 2, 2024, 3:43:19 PM8/2/24
to python-we...@googlegroups.com
Did you install the Weka package "attributeSelectionSearchMethods" on the other PC as the error message suggests?

Cheers, Peter
--
My Open Source Blog - http://open.fracpete.org

3/08/2024 04:31:43 Dario Martinez <dariomar...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "python-weka-wrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-weka-wra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-weka-wrapper/39818ad0-9eb8-4436-8ab3-7dfe2090415cn%40googlegroups.com.

Dario Martinez

unread,
Aug 2, 2024, 4:17:44 PM8/2/24
to python-we...@googlegroups.com
Hi Peter, I don't remember having to install this package on my first PC, could you please tell me how to install it?

Dario Martinez

unread,
Aug 2, 2024, 5:31:08 PM8/2/24
to python-we...@googlegroups.com
Ok, now I realize that you are referring to installing the genetic package on the weka platform. The truth is that I don't have weka installed on this computer. I thought that wapper worked completely independently of the program. I'm going to proceed to install weka and the genetic package.

Peter Reutemann

unread,
Aug 2, 2024, 5:38:34 PM8/2/24
to python-we...@googlegroups.com
pww3 is independent of Weka installations, but only the core distribution. Any additional packages that get installed are shared between the two.

Check the documentation regarding installing packages:

https://fracpete.github.io/python-weka-wrapper3/examples.html#packages

Cheers, Peter
--
My Open Source Blog - http://open.fracpete.org

3/08/2024 09:31:09 Dario Martinez <dariomar...@gmail.com>:

Dario Martinez

unread,
Aug 2, 2024, 6:00:30 PM8/2/24
to python-we...@googlegroups.com
Yes, thank you. I just installed weka and the package on the second PC, and the GeneticSearch filter is now working.

Peter Reutemann

unread,
Aug 2, 2024, 6:09:19 PM8/2/24
to python-we...@googlegroups.com
You don't need to install Weka itself, only any additional packages that you need (which can be done through pww3).

Cheers, Peter
--
My Open Source Blog - http://open.fracpete.org

3/08/2024 10:00:30 Dario Martinez <dariomar...@gmail.com>:

Yes, thank you. I just installed weka and the package on the second PC, and the GeneticSearch filter is now working.

El vie, 2 ago 2024 a las 16:38, Peter Reutemann (<frac...@gmail.com>) escribió:
pww3 is independent of Weka installations, but only the core distribution. Any additional packages that get installed are shared between the two.

Check the documentation regarding installing packages:

https://fracpete.github.io/python-weka-wrapper3/examples.html#packages

Cheers, Peter
--
My Open Source Blog - http://open.fracpete.org

3/08/2024 09:31:09 Dario Martinez <dariomar...@gmail.com>:

Ok, now I realize that you are referring to installing the genetic package on the weka platform. The truth is that I don't have weka installed on this computer. I thought that wapper worked completely independently of the program. I'm going to proceed to install weka and the genetic package.

El vie, 2 ago 2024 a las 15:17, Dario Martinez (<dariomar...@gmail.com>) escribió:
Hi Peter, I don't remember having to install this package on my first PC, could you please tell me how to install it?

El vie, 2 ago 2024 a las 14:43, Peter Reutemann (<frac...@gmail.com>) escribió:
Did you install the Weka package "attributeSelectionSearchMethods" on the other PC as the error message suggests?

Cheers, Peter
--
My Open Source Blog - http://open.fracpete.org

3/08/2024 04:31:43 Dario Martinez <dariomar...@gmail.com>:

--
You received this message because you are subscribed to the Google Groups "python-weka-wrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-weka-wra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-weka-wrapper/4392caff-a995-447e-9c88-36c2b8b76adb%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "python-weka-wrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-weka-wra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-weka-wrapper/CAH3SKwwV%3DBEqdsrXsL8zLqwEaopzHJso5iyQYUhzREoW3ER4xQ%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "python-weka-wrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-weka-wra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-weka-wrapper/acc5225b-5330-4901-b6bd-78024d53b892%40gmail.com.

--
You received this message because you are subscribed to the Google Groups "python-weka-wrapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-weka-wra...@googlegroups.com.

Dario Martinez

unread,
Aug 2, 2024, 8:41:01 PM8/2/24
to python-we...@googlegroups.com
Ok thanks, it's good to know, but I have already installed Weka, and in this one I installed the package, and my script is now working fine.

Reply all
Reply to author
Forward
0 new messages