Nothing
#' Extract diagnostics from a gwrf_fit object
#'
#' @param object A gwrf_fit object.
#' @param ... Unused.
#'
#' @return A named list containing overall model diagnostics:
#' \describe{
#' \item{rmse}{Root mean squared error across fitted focal observations.}
#' \item{mae}{Mean absolute error across fitted focal observations.}
#' \item{r2}{Coefficient of determination calculated from observed and
#' predicted focal values.}
#' \item{n_focal}{Number of focal observations for which local models were
#' requested.}
#' }
#'
#' @examples
#' example_fit <- structure(
#' list(
#' diagnostics = list(
#' rmse = 0.25,
#' mae = 0.18,
#' r2 = 0.80,
#' n_focal = 3
#' )
#' ),
#' class = "gwrf_fit"
#' )
#'
#' diagnostics(example_fit)
#' @export
diagnostics <- function(object, ...) {
UseMethod("diagnostics")
}
#' @export
diagnostics.gwrf_fit <- function(object, ...) {
object$diagnostics
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.