mrProfileplot: mrProfileplot: Wrapper to plot mutlti-response model agnostic...

View source: R/MrProfilePlots.R

mrProfileplotR Documentation

mrProfileplot: Wrapper to plot mutlti-response model agnostic profile plots (partial dependences and accumulated local effects).

Description

mrProfileplot: Wrapper to plot mutlti-response model agnostic profile plots (partial dependences and accumulated local effects).

Usage

mrProfileplot(profileData, sdthresh = 0.05)

Arguments

profileData

dataframe is the data generated from the flashlight packages 'light_profile' function.

'sdthresh'

numeric value used to filter responses that are not changing across the values of the feature (based on standard deviation)

Details

The aim of this function is to plot (1) a reduced set of response variables that are responding to the feature of choice (plot 1) and the average ALE of partial dependency for all responses combined (plot 2). When there are many responses plot 1 makes interpretation easier by focussing on the the responses changing the most with a feature. The feature selected and plot type must be specified 'light_profile' function

Examples

flashlightObj <- mrFlashlight(yhats, X, Y, response = "multi")

profileData_pd <- light_profile(flashlightObj, v = "Grassland") #partial dependencies
profileData_ale <- light_profile(flashlightObj, v = "Grassland", type = "ale") #acumulated local effects
mrProfileplot(profileData_pd , sdthresh =0.05)
mrProfileplot(profileData_ale , sdthresh =0.05)

nfj1380/mrIML documentation built on May 17, 2024, 7:41 a.m.