Package edu.cmu.tetrad.search.unmix
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 SummaryModifier and TypeMethodDescriptionvoidFits a local mechanism for the target variable using its parents from the provided dataset.double[]Predicts fitted values for all rows for the given target using the current fitted model.default double[]Convenience method computing residuals = y - yhat for all rows.
- 
Method Details- 
fitFits 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
 
- 
predictPredicts 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
 
- 
residualsConvenience 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
 
 
-