clust_gran: compute distances and groups from algorithm based on raw...

Description Usage Arguments Examples

View source: R/clust_gran.R

Description

compute distances and groups from algorithm based on raw distributions

Usage

1
clust_gran(dist, kopt = NULL, method = "ward.D")

Arguments

dist

a dissimilarity structure as produced by dist.

kopt

the number of clusters

method

method in stats::hclust()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(gravitas)
library(tidyverse)
library(tsibble)
sm <- smart_meter10 %>%
filter(customer_id %in% c("10006704", "10017936","10006414", "10018250"))
gran1 = "hour_day"
gran2 = NULL
response = "general_supply_kwh"
sm %>% scale_gran(method = "robust") %>% dist_gran(gran1 = "hour_day")%>%
clust_gran("hour_day")
sm %>% scale_gran(method = "nqt") %>% dist_gran(gran1 = "hour_day")%>%
clust_gran()
dist_wpd(sm, harmony_tbl = h)) %>% clust_gran()

Sayani07/gracsr documentation built on Dec. 18, 2021, 12:59 p.m.