Description Usage Arguments Value Examples
View source: R/compute_norm_pairwise_max.R
Title Compute normalised maximum pairwise distances
1 2 3 4 5 6 7 8 9 10 |
.data |
data for which mmpd needs to be calculated |
gran_x |
granularities mapped across x levels |
gran_facet |
granularities mapped across facetss |
response |
univarite response variable |
quantile_prob |
probabilities |
dist_ordered |
if categories are ordered |
nperm |
number of permutations required for normalisation |
lambda |
value of the tuning parameter for computing weighted pairwise distances |
the weighted pairwise distance normalised using permutation
1 2 3 4 5 6 7 8 9 10 11 | library(tidyverse)
library(gravitas)
library(parallel)
sm <- smart_meter10 %>%
filter(customer_id %in% c("10017936"))
gran_x <- "week_month"
gran_facet <- "week_fortnight"
v <- compute_norm_pairwise_max(sm, gran_x, gran_facet,
response = general_supply_kwh, nperm = 10
)
# month of the year not working in this setup
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.