Ranker Filter

4 views
Skip to first unread message

Dario Martinez

unread,
Jun 27, 2024, 10:11:37 PMJun 27
to python-weka-wrapper
Hello, I am trying to apply the Ranker filter with the following code:
# REALIZA FILTRADO RANKER INICIAL
Porcent = 0.03
FiltroRanker = Filter(classname="weka.filters.supervised.attribute.AttributeSelection")
RankerAseval = ASEvaluation(classname="weka.attributeSelection.CorrelationAttributeEval")
Ranker_options = f"-T {Porcent} -N {-1}".split()
Ranker = ASSearch(classname="weka.attributeSelection.Ranker",
                       options=Ranker_options)
FiltroRanker.set_property("evaluator", RankerAseval.jobject)
FiltroRanker.set_property("search", Ranker.jobject)
FiltroRanker.inputformat(labor_data)
DataFiltInicial = FiltroRanker.filter(labor_data) # Obtiene Atributos Filtrados


and it gives me the following error: 
Traceback (most recent call last): File "C:\Users\dario\AppData\Local\Temp\ipykernel_7056\3651079354.py", line 499, in <module> main() File "C:\Users\dario\AppData\Local\Temp\ipykernel_7056\3651079354.py", line 212, in main DataFiltInicial = FiltroRanker.filter(labor_data) # Optiene Atributos Filtrados File "C:\Users\dario\.conda\envs\MASTER_TRADERS_sk\lib\site-packages\weka\filters.py", line 154, in filter return Instances(javabridge.static_call( File "C:\Users\dario\.conda\envs\MASTER_TRADERS_sk\lib\site-packages\javabridge\jutil.py", line 943, in static_call result = fn(*nice_args) File "C:\Users\dario\.conda\envs\MASTER_TRADERS_sk\lib\site-packages\javabridge\jutil.py", line 923, in fn raise JavaException(jexception) javabridge.jutil.JavaException: Java heap space

Could you guide me with this? Thank you in advance.

Peter Reutemann

unread,
Jun 28, 2024, 12:48:36 AMJun 28
to python-we...@googlegroups.com
Looks like you need to give the JVM more heap size at start up time:


https://fracpete.github.io/python-weka-wrapper3/examples.html#start-up-jvm

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

28/06/2024 14:11:40 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/1a866ca5-1966-494f-815c-c8ea741cb4aen%40googlegroups.com.

Dario Martinez

unread,
Jun 28, 2024, 3:51:29 PMJun 28
to python-we...@googlegroups.com
Hello, I appreciate that that was the problem, as always your response was very timely and clear.

Reply all
Reply to author
Forward
0 new messages