`R/calculate_variable_profile.R`

`calculate_variable_profile.Rd`

This function calculates individual variable profiles (ceteris paribus profiles), i.e. series of predictions from a model calculated for observations with altered single coordinate.

calculate_variable_profile( data, variable_splits, model, predict_function = predict, ... ) # S3 method for default calculate_variable_profile( data, variable_splits, model, predict_function = predict, ... )

data | set of observations. Profile will be calculated for every observation (every row) |
---|---|

variable_splits | named list of vectors. Elements of the list are vectors with points in which profiles should be calculated. See an example for more details. |

model | a model that will be passed to the |

predict_function | function that takes data and model and returns numeric predictions. Note that the ... arguments will be passed to this function. |

... | other parameters that will be passed to the |

a data frame with profiles for selected variables and selected observations

Note that `calculate_variable_profile`

function is S3 generic.
If you want to work on non standard data sources (like H2O ddf, external databases)
you should overload it.

Explanatory Model Analysis. Explore, Explain, and Examine Predictive Models. https://ema.drwhy.ai/