predict_tweaked: Tweaked predict to take into account levels that are not in...

Description Usage Arguments Value Author(s)

View source: R/predict_tweaked.R

Description

This function applies the logistic regression predict after carefully removing observations of categorical features' levels absent from the training set..

Usage

1
predict_tweaked(model, df, c_iter)

Arguments

model

The logistic regression model to use to predict on a test set.

df

The whole test set which class has to be predicted.

c_iter

The segment considered (given by the tree).

Value

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.

Author(s)

Adrien Ehrhardt


glmtree documentation built on Jan. 13, 2021, 4:58 p.m.