Select input variables of a model from a list

JTornero
Level 1
Select input variables of a model from a list

Hello Dataikers,

Is there any Dataiku option to select the input variables of a model from a list?

Let me explain this better...

I have a list with the names of the variables that I want to to select as input of a model, but instead of selecting them one by one in the Features Handling tab, I was wondering if there is a way to give the model a list of the variables that I want to select as input.

I already know the "Copy from..." and filtering options, but those doesn't work for this case in particular.

Thanks in advance!

Joel.


Operating system used: Windows

0 Kudos
1 Reply
AlexT
Dataiker

Hi @JTornero ,
If you want to select specific variables you can create the Analysis via code or edit an existing analysis to add remove features.
https://doc.dataiku.com/dss/latest/python-api/ml.html#usage-samples

If you look at the sample code shared in : https://community.dataiku.com/t5/Using-Dataiku/Train-the-model-and-automatically-deploy-the-winning-...
Specifically this section of the code

#Turn features on/off
for feature in features:
    settings.reject_feature(feature)
settings.use_feature('FEATURE_1')
settings.use_feature('FEATURE_2')
settings.save()

Thanks

0 Kudos