Interface ResidualRegressor

All Known Implementing Classes:
LinearQRRegressor

public interface ResidualRegressor
Interface for local regressors used to compute residual signatures: X ~ f(Pa). Implementations should provide a fit(...) to estimate parameters and a predict(...) to produce fitted values for all rows in the dataset.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    fit(DataSet data, Node target, List<Node> parents)
    Fits a local mechanism for the target variable using its parents from the provided dataset.
    double[]
    predict(DataSet data, Node target, List<Node> parents)
    Predicts fitted values for all rows for the given target using the current fitted model.
    default double[]
    residuals(DataSet data, Node target, List<Node> parents)
    Convenience method computing residuals = y - yhat for all rows.
  • Method Details

    • fit

      void fit(DataSet data, Node target, List<Node> parents)
      Fits a local mechanism for the target variable using its parents from the provided dataset.
      Parameters:
      data - the dataset containing the variables and rows
      target - the variable to be predicted
      parents - the list of parent variables used as predictors
    • predict

      double[] predict(DataSet data, Node target, List<Node> parents)
      Predicts fitted values for all rows for the given target using the current fitted model. Implementations may call fit(...) lazily if not yet fitted.
      Parameters:
      data - the dataset containing the variables and rows
      target - the variable to be predicted
      parents - the list of parent variables used as predictors
      Returns:
      an array of length n with fitted values for each row
    • residuals

      default double[] residuals(DataSet data, Node target, List<Node> parents)
      Convenience method computing residuals = y - yhat for all rows.
      Parameters:
      data - the dataset containing the variables and rows
      target - the variable whose residuals are to be computed
      parents - the list of parent variables used as predictors
      Returns:
      an array of residuals for each row