calculate_coverage: Calculate coverage of independent variables in the normalized...

View source: R/calculate_coverage.R

calculate_coverageR Documentation

Calculate coverage of independent variables in the normalized conditions dataset.

Description

This function calculates the coverage of the independent variables in the normalized conditions dataset to inform the user about the data range within which the model predictions are valid.

Usage

calculate_coverage(
  dataframe = NULL,
  ref_temp_data = NULL,
  outlier_threshold = NULL,
  extrapolation_limit = NULL
)

Arguments

dataframe

Training or Prediction dataframe from create_dataframe

ref_temp_data

An nx2 dataframe with the hourly normalized temperature data corresponding to the facility's location. Colnames: time and temp.

outlier_threshold

a numeric indicating the number of datapoints (hours or days, depending on the data interval) below which the temperature observation occurences will be considered an outlier. Default values: 1 for daily data, up to 10 for hourly data.

extrapolation_limit

A numeric, beyond the minimum and maximum observed temperatures, up to which the data range may be extrapolated for model prediction. Default: 0.05

Value

a list with the following components:

temp_coverage

a data frame with temperature bins and associated frequencies of occurence from site temperature data and normalized temperature data.

coverage_factor_summary

a dataframe with calculated temperature and time coverage factors, counts of covered and uncovered datapoints in the normalized conditions dataset.

temp_bin_summary

a list with min, max, extrapolated min, and extrapolated max observed temperature values.


kW-Labs/nmecr documentation built on May 6, 2024, 9:28 p.m.