def __call__(self, *args):
        """
        Infer on the given data according to given in the config infer method, \
            e.g. ``"predict", "predict_proba", "transform"``

        Args:
            *args: list of inputs

        Returns:
            predictions, e.g. list of labels, array of probability distribution, sparse array of vectorized samples
        """
        x_features = self.compose_input_data(args)

        try:
            predictions = self.infer_method(x_features)
        except TypeError or ValueError:
            if issparse(x_features):
                log.debug("Converting input for model {} to dense array".format(self.model_class))
                predictions = self.infer_method(x_features.todense())
            else:
                log.debug("Converting input for model {} to sparse array".format(self.model_class))
                predictions = self.infer_method(csr_matrix(x_features))

        if isinstance(predictions, list):
            #  ``predict_proba`` sometimes returns list of n_outputs (each output corresponds to a label)
            #  but we will return (n_samples, n_labels)
            #  where each value is a probability of a sample to belong with the label
            predictions_ = [[predictions[j][i][1] for j in range(len(predictions))] for i in range(x_features.shape[0])]
            predictions = np.array(predictions_)

        if self.ensure_list_output and len(predictions.shape) == 1:
            predictions = predictions.reshape(-1, 1)

        if issparse(predictions):
            return predictions
        else:
            return predictions.tolist()

        Infer on the given data according to given in the config infer method,             e.g. ``"predict", "predict_proba", "transform"``

        Args:
            *args: list of inputs

        Returns:
            predictions, e.g. list of labels, array of probability distribution, sparse array of vectorized samples
        
deeppavlov/models/sklearn/sklearn_component.py