View source: R/ClusteringTypicalDays.R
clusteringTypicalDays | R Documentation |
Run a clustering algorithm on the different classes of the calendar (getCalendar) Its principle is to create clusters by gathering the most similar days of each class and to choose among them the best representative: it will be a so-called typical day. The metric used to determine the similarity of two days is a weighted sum of 24 hourly distances, meaning the distances between the domains of the two days at the same hour.
clusteringTypicalDays(calendar, PLAN, VERT = NULL, hubDrop = list(NL =
c("BE", "DE", "FR", "AT")), nbClustWeek = 1, nbClustWeekend = 1,
hourWeight = rep(1, 24), idStart = 1, maxDomainSize = 20000,
ponderate = FALSE)
calendar |
|
PLAN |
PLAN is generated in this format with the function getPreprocPlan |
VERT |
|
hubDrop |
|
nbClustWeek |
|
nbClustWeekend |
|
hourWeight |
|
idStart |
|
maxDomainSize |
|
ponderate |
|
## Not run:
library(data.table)
library(quadprog)
PLAN <- readRDS(system.file("testdata/plan_test2.rds", package = "fbClust"))
calendar <- list()
calendar$interSeasonWe <- c("2018-10-01", "2018-10-02")
calendar$interSeasonWd <- c("2018-10-03", "2018-10-04")
hubDrop <- list(NL = c("BE", "DE", "FR", "AT"))
hourWeight = rep(1, 24)
nbClustWeek <- 1
nbClustWeekend <- 1
maxDomainSize <- 20000
clusteringTypicalDays(
calendar = calendar, PLAN = PLAN, VERT = NULL, hubDrop = hubDrop,
maxDomainSize = maxDomainSize, nbClustWeek = nbClustWeek,
nbClustWeekend = nbClustWeekend, hourWeight = hourWeight)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.