Skip to contents

Generates a prediction for a match using a trained model and pre-match features.

Usage

predict_match_outcome(
  match_id,
  model,
  conn,
  model_version = "v1.0",
  model_type = "xgboost"
)

Arguments

match_id

Character. Match identifier

model

Model object. Trained prediction model (XGBoost or similar)

conn

DBI connection. Database connection

model_version

Character. Version identifier for the model

model_type

Character. Type of model ("xgboost", "logistic", "ensemble")

Value

List with prediction details

Examples

if (FALSE) { # \dontrun{
conn <- get_db_connection()
model <- xgboost::xgb.load("path/to/model.ubj")
prediction <- predict_match_outcome("1234567", model, conn)
} # }