class_docstr: Class for black-box regressors.
docstr: Compute the loss of the regressor for predictions `pred`. If loss_fn not provided at init, MSE loss is computed.
  
  :param pred: Model predictions.
  :param y: Target values.
  :return: Loss values.
docstr_tok: ["Compute","the","loss","of","the","regressor","for","predictions","`","pred","`",".","If","loss_fn","not","provided","at","init",",","MSE","loss","is","computed",".",":","param","pred",":","Model","predictions",".",":","param","y",":","Target","values",".",":","return",":","Loss","values","."]
code: def compute_loss_from_predictions(
      self, pred: np.ndarray, y: np.ndarray, **kwargs
  ) -> np.ndarray:
      """
      Compute the loss of the regressor for predictions `pred`. If loss_fn not provided at init, MSE loss is computed.
  
      :param pred: Model predictions.
      :param y: Target values.
      :return: Loss values.
      """
      if self._loss_fn:
          return self._loss_fn(y, pred)
      # default MSE loss
      return (y - pred) ** 2
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from functools import total_ordering
  import logging
  from typing import Callable, List, Optional, Union, Tuple, TYPE_CHECKING
  import numpy
  from art.estimators.estimator import BaseEstimator
  from art.estimators.regression.regressor import RegressorMixin, Regressor
  from art.estimators.classification import BlackBoxClassifier
label_desc: Use image node_id 9 for calling the BlackBoxRegressor obj's underlying member method code with example usage: obj.compute_loss_from_predictions(pred, y) and returns: unknown, self