Description Usage Arguments Examples
View source: R/clusterTypicalDaysForOneClass.R
Run a clustering algorithm for a given historical period. It creates clusters by gathering the most similar days and chooses 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.
1 2 3 |
dates |
|
vertices |
This parameter can be obtained with the function ptdfToVertices. |
nbCluster |
|
hourWeight |
|
className |
|
reportPath |
|
report |
|
id_start |
|
maxDomainSize |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(data.table)
vertices <- fread(system.file("dataset/vertices_example.txt",package = "flowBasedClustering"))
dates <- seq(as.Date("2016-08-09"), as.Date("2018-09-01"), by = "day")
hourWeight = rep(1, 24)
out1 <- clusterTypicalDaysForOneClass(vertices = vertices,
dates = dates, nbCluster = 2,
className = "myName", id_start = 5, report = FALSE)
out2 <- clusterTypicalDaysForOneClass(vertices = vertices,
dates = dates, nbCluster = 4,
className = "myName2", id_start = 7, report = FALSE)
rbindlist(list(out1, out2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.