% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transform_point_model_out.R
\name{transform_point_model_out}
\alias{transform_point_model_out}
\title{Transform either mean or median model output into a point forecast object:}
\usage{
transform_point_model_out(model_out_tbl, oracle_output, output_type)
}
\arguments{
\item{model_out_tbl}{Model output tibble with predictions}

\item{oracle_output}{Predictions that would have been generated by an oracle
model that knew the observed target data values in advance}

\item{output_type}{Forecast output type: "mean" or "median"}
}
\value{
forecast_point
}
\description{
Transform either mean or median model output into a point forecast object:
}
\details{
This function transforms a model output tibble in the Hubverse
format (with either "mean" or "median" output type) to a scoringutils "point"
forecast object
}
\examples{
\dontshow{if (requireNamespace("hubExamples", quietly = TRUE)) withAutoprint(\{ # examplesIf}
# Median point forecast
median_forecast <- hubExamples::forecast_outputs |>
  dplyr::filter(.data[["output_type"]] == "median") |>
  transform_point_model_out(
    oracle_output = hubExamples::forecast_oracle_output,
    output_type = "median"
  )
median_forecast

# Mean point forecast
mean_forecast <- hubExamples::forecast_outputs |>
  dplyr::filter(.data[["output_type"]] == "mean") |>
  transform_point_model_out(
    oracle_output = hubExamples::forecast_oracle_output,
    output_type = "mean"
  )
mean_forecast
\dontshow{\}) # examplesIf}
}
