export_shap-methods: Extract and export individual conditional expectation data.

export_shapR Documentation

Extract and export individual conditional expectation data.

Description

Extract and export individual conditional expectation data.

Usage

export_shap(
  object,
  dir_path = NULL,
  aggregate_results = TRUE,
  export_collection = FALSE,
  feature_x = NULL,
  feature_y = NULL,
  ...
)

## S4 method for signature 'familiarCollection'
export_shap(
  object,
  dir_path = NULL,
  aggregate_results = TRUE,
  export_collection = FALSE,
  feature_x = NULL,
  feature_y = NULL,
  ...
)

## S4 method for signature 'ANY'
export_shap(
  object,
  dir_path = NULL,
  aggregate_results = TRUE,
  export_collection = FALSE,
  feature_x = NULL,
  feature_y = NULL,
  ...
)

Arguments

object

A familiarCollection object, or other other objects from which a familiarCollection can be extracted. See details for more information.

dir_path

Path to folder where extracted data should be saved. NULL will allow export as a structured list of data.tables.

aggregate_results

Flag that signifies whether results should be aggregated for export.

export_collection

(optional) Exports the collection if TRUE.

feature_x

(optional) Feature(s) whose SHAP values are used for determining dependence.

feature_y

(optional) Feature(s) whose values are used to show interaction with the feature(s) in feature_x.

...

Arguments passed on to as_familiar_collection

familiar_data_names

Names of the dataset(s). Only used if the object parameter is one or more familiarData objects.

collection_name

Name of the collection.

Details

Data is usually collected from a familiarCollection object. However, you can also provide one or more familiarData objects, that will be internally converted to a familiarCollection object. It is also possible to provide a familiarEnsemble or one or more familiarModel objects together with the data from which data is computed prior to export. Paths to the previous files can also be provided.

All parameters aside from object and dir_path are only used if object is not a familiarCollection object, or a path to one.

Value

A list of data.tables (if dir_path is not provided), or nothing, as all data is exported to csv files.


familiar documentation built on May 23, 2026, 1:07 a.m.