Hi Darío,
You can use Genetic Search like this:
search = ASSearch( classname="weka.attributeSelection.GeneticSearch", options=ga_options)
where
ga_options = f"-S {genetic_seed} -C {crossover_probability} -M {mutation_probability} -G {max_generations} -Z {population_size} -R {report_frequency}".split()
And then the evaluator:
eval_options = "-P 1 -E 1".split(" ")
evaluation = ASEvaluation(classname="weka.attributeSelection.CfsSubsetEval", options=eval_options)
attsel = AttributeSelection()
attsel.search(search)
attsel.evaluator(evaluation)
attsel.select_attributes(data)
And to select the attributes, you call the reduce_dimensionality function:
attsel.reduce_dimensionality(data)
Hope this helps.
Juanjo