IBM / AutoMLPipeline.jl

A package that makes it trivial to create and evaluate machine learning pipeline architectures.
MIT License
359 stars 28 forks source link

unable to include RFE in pipeline! #106

Open michele2198 opened 2 years ago

michele2198 commented 2 years ago

I apologize but I am new to Julia. i am trying to perform recursive feature elimination (RFE) in a pipeline:

ada = Adaboost() disc = CatNumDiscriminator() pt = PrunedTree() rfe=SKPreprocessor("RFE",Dict(:estimator=>ada));

pvote = disc |> ((catf |> ohe) + (numf|>rfe)) |> pt

but always got the same error TypeError("init() missing 1 required positional argument: 'estimator'") although it seems to me that the estimator has been provided. How should RFE be used?

Than you in advance

ppalmes commented 2 years ago

it's a bug. RFE is not part of the unit-testing and I only tested with the popular algos in sklearn. i will try to fix it. the issue is that the algo uses another python object in its argument so i need to unwrap the python object inside the julia structure. thanks for raising this issue. by the way, Adaboost() is a julia algo so the better way is to use the sklearn adaboost using skoperator("AdaBoostClassifier") or skoperator("AdaBoostRegressor") and use this estimator to the RFE. i'll update here if I fix the issue.

ppalmes commented 2 years ago

you can also read the implementation and perhaps help fix it ;).

michele2198 commented 2 years ago

Thank you for answer and considering this work, I am in a project where we aim at comparing many combination of feature reduction + ML combinations so it would help us a lot. Kindest regards