How to apply the feature extraction steps of a model in Dataiku

HS
HS Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 2 ✭✭✭
edited July 16 in Using Dataiku

Hi,

I have a saved model in dataiku. I have a feature based on Text column. I apply Term Hashing and SVD to the text column.

Now, I want to use this model on a python code and have it predict a incoming data.
If i pass the input to the predict method as a piece of text, it fails.
I guess i have to tokenize, term hash and apply SVD, and pass that as a input to predict function.

from dataiku import Model 
model = Model(lookup=, ignore_flow=True) 
model_predictor = model.get_predictor() 
print(model_predictor._predict_raw(<piece-of-text>))



If i use the scoring recipe or model api, it is able to predict based on a piece of text as input.
So, in the scoring recipe, model api, training recipe etc, dataiku applies the transformations needed to convert the piece of text into features for prediction.
Is there a way to find out the exact steps to be done before data is sent to the model for prediction in dataiku?

Regards,
H.

Answers

  • HS
    HS Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Registered Posts: 2 ✭✭✭

    I find a preprocessing attached to predictor. But it expects a dataframe.
    I managed to get the prediction by converting my input data to a dataframe and using it to preprocess.

    Predictor also provides a predict method, calling it with the dataframe does the preprocessing under hood and gives prediction.

Setup Info
    Tags
      Help me…