Skip to content

Correctly document additional ci_methods (like "cpi") #55

@jemus42

Description

@jemus42

Currently, FeatureImportanceMethod implements the $importance() method to aggregate importances scores by feature and add CIs via the chosen method (if any):

https://github.com/jemus42/xplainfi/blob/88c6ba77bdf9b940e1c718bffddd96332ae9f5e4/R/FeatureImportanceMeasure.R#L155-L217

The supported methods can vary between subclasses, which is why there is a "registry" for supported methods https://github.com/jemus42/xplainfi/blob/88c6ba77bdf9b940e1c718bffddd96332ae9f5e4/R/FeatureImportanceMeasure.R#L379 and they are implemented as private methods with .importance_{method} naming scheme.

To implement CPI for the PerturbationImportance method alone, It's added to the registry on initialization https://github.com/jemus42/xplainfi/blob/88c6ba77bdf9b940e1c718bffddd96332ae9f5e4/R/PerturbationImportance.R#L65 and as a private method https://github.com/jemus42/xplainfi/blob/88c6ba77bdf9b940e1c718bffddd96332ae9f5e4/R/PerturbationImportance.R#L238

The issue now is that ci_method = "cpi" does work, but it takes additional arguments (test, B) and I don't know where to document them, since I can only document $importance() once in FeatureImportanceMethod.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions