class_docstr: Transformer that performs regression to build relationship between a
  target series and the rest of series, and returns regression residual
  series.
  
  Parameters
  ----------
  regressor: object
      Regressor to be used. Same as a scikit-learn regressor, it should
      minimally have `fit` and `predict` methods.
  target: str, optional
      Name of the column to be regarded as target variable.
code: def _predict_core(self, df: pd.DataFrame) -> pd.Series:
      target = self._target
      features = self._features
      if target not in df.columns:
          raise RuntimeError(
              "Cannot find target series {} in input dataframe.".format(
                  target
              )
          )
      if not set(features) <= set(df.columns):
          raise RuntimeError(
              "The following series are not found in input dataframe: {}.".format(
                  set(features) - set(df.columns)
              )
          )
      residual = pd.Series(index=df.index, dtype="float64")
      if not df.dropna().empty:
          residual.loc[df.dropna().index] = df.dropna().loc[
              :, target
          ] - self.regressor.predict(df.dropna().loc[:, features])
      return residual
  
imports: from typing import Any, Callable, Dict, Optional, Tuple, Union
  import pandas
  from sklearn.decomposition import PCA
  from .._transformer_base import _NonTrainableMultivariateTransformer, _TrainableMultivariateTransformer
label_desc: Use image node_id 4 for calling the RegressionResidual obj's underlying member method code with example usage: obj._predict_core(df) and returns: residual