View source: R/fuzzy_regression_helper_functions.R
compute_pred | R Documentation |
Compute Predictions from Fuzzy Linear Model
compute_pred(object, X_fuzzy)
object |
List. Result of fuzzy least squares regression containing |
X_fuzzy |
List. Fuzzified predictor variables. |
A list of fuzzy predictions.
# Example setup
X_fuzzy <- list(
list(list(l = 1, x = 2, r = 3), list(l = 4, x = 5, r = 6)),
list(list(l = 2, x = 3, r = 4), list(l = 5, x = 6, r = 7))
)
beta_hat <- c(0.5, 1.2, -0.8) # Example regression coefficients
object <- list(beta_hat = beta_hat)
# Compute predictions
predictions <- compute_pred(object, X_fuzzy)
print(head(predictions, 6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.