View source: R/wpd_threshold.R
wpd_threshold | R Documentation |
chooses threshold for a harmony table
wpd_threshold( .data, harmony_tbl = NULL, response = NULL, quantile_prob = seq(0.01, 0.99, 0.01), dist_ordered = TRUE, lambda = 0.67, nperm = 20, use_perm = TRUE, probs = c(0.9, 0.95, 0.99), nsamp = 100, create_harmony_data = TRUE )
.data |
a tsibble or data with already computed categories |
harmony_tbl |
A tibble containing one or more hamronies with facet_variable, x_variable, facet_levels and x_levels |
response |
the response variable |
quantile_prob |
numeric vector of probabilities with value #'in [0,1] whose sample quantiles are wanted. Default is set to #' "decile" plot |
dist_ordered |
if categories are ordered |
lambda |
value of tuning parameter for computing weighted |
nperm |
number of permutations for normalization |
use_perm |
should permutation approach for normalization be used |
probs |
threshold probability |
nsamp |
number of samples considered to compute threshold |
create_harmony_data |
a logical value indicating if data corresponding to harmonies to be created or not |
library(parallel) library(dplyr) library(tidyr) sm <- smart_meter10 %>% filter(customer_id %in% c("10017936")) harmonies <- sm %>% harmony( ugran = "month", filter_in = "wknd_wday", filter_out = c("hhour", "fortnight") ) #all_harmony <- wpd_threshold(sm, #harmony_tbl = harmonies, #response = general_supply_kwh, nsamp = 3 #)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.