getProbability: Classify the typical days by searching for external factors...

Description Usage Arguments Examples

View source: R/getProbability.R

Description

Classify the typical days by searching for external factors (e.g. climate factors) explaning the occurence of a particular typical day

Usage

1
2
getProbability(climate, cluster, levelsProba = c(1/3, 2/3),
  extrapolationNA = TRUE)

Arguments

climate

data.table, the first column contains the dates (header : Date, format : YYYY-MM-DD), other columns are external variable whose name must be given in the header. Data should be given with a daily time step.

cluster

data.table output of clusteringTypicalDays or clusterTypicalDaysForOneClass

levelsProba

numeric or list. if numeric, contains a vector of quantiles which will be used for all external variables and classes. if list, quantiles are described independenly for each class and each external variable (see examples below)

extrapolationNA

booelan should NA values of the matrix be extrapolated (TRUE) or not (FALSE)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# load climate daily time serires
library(data.table)
climate <- fread(system.file("dataset/climate_example.txt",package = "flowBasedClustering"))

# load clustering results (or build them with clusteringTypicalDays function())
clusterTD <- readRDS(system.file("dataset/cluster_example.RDS",package = "flowBasedClustering"))

# get Probability matrices
MatProb <- getProbability(climate, clusterTD)

# run with specified probability levels, and witout auto-filling the NA cases
levelsProba <- list(summerWd = list(FR_load = c(0.5), DE_wind = c(1/3, 2/3), DE_solar = .5),
                    summerWe = list(FR_load = c(0.5, 0.7), DE_wind = c(.5))
)
MatProb <- getProbability(climate, clusterTD, levelsProba = levelsProba, extrapolationNA = FALSE)
MatProb2 <- getProbability(climate, clusterTD, levelsProba = levelsProba, extrapolationNA = TRUE)

rte-antares-rpackage/flowBasedClustering documentation built on Nov. 21, 2020, 11:21 a.m.