compare_results: Identifies method with least error

View source: R/adjustedPredSIS.R

compare_resultsR Documentation

Identifies method with least error

Description

Compares the validation rmse using original and adjusted data and returns the one with lesser error.

Usage

compare_results(
  population = 18710922,
  gamma = 1/14,
  cur_date = "2020-5-29",
  start_date = "2020-3-13",
  last_n_day = 20,
  last_limit = 30,
  next_n_days = 20,
  data,
  ub_for_adjustment = 5,
  bound_metric = "C3_1day",
  df_confirmed_values,
  mu
)

Arguments

population

number of people in the state

gamma

recovery rate

cur_date

current date for start of prediction phase

start_date

start date in the considered dataset

last_n_day

number of days in training phase

last_limit

maximum number of days in the validation period

next_n_days

number of days in the prediction phase

data

state wise daily cases adjusted data for the given state

ub_for_adjustment

upper bound for the duration of a jump or drop

bound_metric

C1, C2, or C3 metric can be selected

df_confirmed_values

Dataframe of dates and observed number of daily confirmed cases

mu

mortality rate of the infection

Value

Returns graph showing observed and predicted cummulative cases using the best method and the corresponding MSE for validation and prediction period.

Note

This function is called by the user. It prints the MSE values of predictions made with and without making the adjustments and returns the best predictions.


RashiMohta/COVID-19-cases-prediction documentation built on Oct. 26, 2024, 9:48 a.m.