This function applies the logistic regression predict after carefully removing observations of categorical features' levels absent from the training set..
predict_tweaked(model, df, c_iter)A dataframe of predictions (in rows: the observations, in cols: the class probabilities) given by the model given in input, eventually tweaked if some levels are unknown to it.
The logistic regression model to use to predict on a test set.
The whole test set which class has to be predicted.
The segment considered (given by the tree).
Adrien Ehrhardt