fatf.transparency.models.feature_influence.partial_dependence_ice(ice_array, include_rows=None, exclude_rows=None)[source]

Calculates Partial Dependence based on Individual Conditional Expectations.


If you want to calculate Partial Dependence directly from a dataset and a classifier please see fatf.transparency.models.feature_influence.partial_dependence function.


Individual Conditional Expectation array for which Partial Dependence is desired.

include_rowsUnion[int, List[int]], optional (default=None)

Indices of rows that will be included in the PD calculation. If this parameter is specified, PD will only be calculated for the selected rows. If additionally exclude_rows is specified the selected rows will be a set difference between the two. This parameter can either be a list of indices or a single index (integer).

exclude_rowsUnion[int, List[int]], optional (default=None)

The indices of rows to be excluded from the PD calculation. If this parameter is specified and include_rows is not, these indices will be excluded from all of the rows. If both include and exclude parameters are specified, the rows included in the PD calculation will be a set difference of the two. This parameter can either be a list of indices or a single index (integer).


A 2-dimensional array of (steps_number, n_classes) shape representing Partial Dependence for all of the classes for selected rows (data points).


The input array is not a 3-dimensional numpy array.


Either include_rows or exclude_rows parameter is not None, an integer or a list of integers.


The ice_array is not an unstructured numpy array or it is not a numerical array. One of the include_rows or exclude_rows indices is not valid for the input array.

Examples using fatf.transparency.models.feature_influence.partial_dependence_ice