INNER CODE UNIT · Python
import_as_project
aimclub/FEDOT · fedot/api/main.py:491
def import_as_project(self, project_path='fedot_project.zip'):
self.current_pipeline, self.train_data, self.test_data, self.history = \
import_project_from_zip(zip_path=project_path)
# TODO workaround to init internal fields of API and data
self.train_data = self.data_processor.define_data(features=self.train_data, is_predict=False)
self.test_data = self.data_processor.define_data(features=self.test_data, is_predict=True)
self.predict(self.test_data)
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``.