INNER CODE UNIT · Python
explain
aimclub/FEDOT · fedot/api/main.py:499
def explain(self, features: FeaturesType = None,
method: str = 'surrogate_dt', visualization: bool = True, **kwargs) -> Explainer:
"""Creates explanation for :attr:`~Fedot.current_pipeline` according to the selected ``method``.
An :class:`Explainer` instance will return.
Args:
features: samples to be explained. If ``None``, ``train_data`` from last fit will be used.
method: explanation method, defaults to ``surrogate_dt``
visualization: print and plot the explanation simultaneously, defaults to ``True``.
Notes:
An explanation can be retrieved later by executing :meth:`Explainer.visualize`.
"""
pipeline = self.current_pipeline
if features is None:
data = self.train_data
else:
data = self.data_processor.define_data(features=features,