def __init__()

in src/responsibleai/rai_analyse/_score_card/_rai_insight_data.py [0:0]


    def __init__(self, raiinsight_path):
        os_path = os.path.join(*os.path.split(raiinsight_path))

        self.raiinsight = RAIInsights.load(os_path)
        self.raiinsight_path = os_path

        self.components = ["causal", "counterfactual", "error_analysis", "explainer"]
        self.component_path_prefix = {}
        self.json_paths = {}
        self._set_component_paths_prefix()
        self._set_json_paths()

        test_data = self.raiinsight.test.drop(columns=self.raiinsight.target_column)
        if (
            self.raiinsight._feature_metadata is not None and
            self.raiinsight._feature_metadata.dropped_features is not None
        ):
            test_data = test_data.drop(
                self.raiinsight._feature_metadata.dropped_features, axis=1
            )
        self.y_pred = self.raiinsight.model.predict(test_data)
        self.y_test = self.raiinsight.test[self.raiinsight.target_column].to_numpy()