Skip to content

Commit ab1a965

Browse files
committed
Create aggreg.md
1 parent d4d6797 commit ab1a965

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

docs/src/aggreg.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Aggreg.jl
2+
3+
## Inputdata
4+
5+
Contains time series data (i.e., respecting a temporal order) with the following attributes:
6+
* region: optional information to specify the region data belongs to
7+
* period_from: date(year,month,day,hour) from which the data is from
8+
* period_to: date(year,month,day,hour) until which the data is
9+
* resolution: resolution of the original series (e.g., hours, days, weeks, etc.)
10+
* nseries: number of time series inputed (treated separately as if independent from each other)
11+
* data: Dictionary with an entry for each attribute `[file name (attribute: e.g technology)]-[column name (node: e.g. location)]`, Each entry of the dictionary is a 2-dimensional `time-steps T x periods K`-Array holding the data
12+
13+
14+
## SeriesInstance
15+
16+
Contains the series and respective attributes needed for performing the aggregation with the following attributes:
17+
* series: original time series
18+
* block_size: number of clusters to be aggregated at once each iteration
19+
* stopping_k: reduced number of clusters pre-established
20+
* current_k: current number of clusters
21+
* dm: discrepancy metric to be used to measure the difference between clusters to be aggregated
22+
* rep_value: function to assign a representative value for each cluster (by default, the mean of values inside the cluster)
23+
* lseries: length of series
24+
* nseries: number of series
25+
26+
## ClustInstance
27+
28+
Constains clusters information.
29+
30+
* k_cent: matrix with the representative points for each cluster
31+
* weigths: 1-dimensional `periods K`-Array with the absolute weight for each period. E.g. for a yearly resolution time series of 365 days, sum(weights) = 365
32+
* series_clust: clusters assignment for the original series (vector with the from-to relationship between the original series and the clusters)
33+
* nclusters: current number of clusters
34+
* search_range: range in which the clusters can be merged, considering the amount of clusters and the block_size (generally equals to 1: (nclusters-block_size+1))
35+
36+
## AggregInstance:
37+
38+
Contains the aggregation instance temporary values.
39+
40+
* merging_ clust
41+
* series_comp
42+
* k_cent_comp
43+
44+
## aggreg1D
45+
46+
The function aggregates N one-dimensional vectors concomitantly following a marker gave as the input of the function. It assumes the collection of 1D vectors is vertically concatanated so forming a 2D matrix with the first dimension equal to the size of the vectors analysed and the second dimension equal to the number of vectors analysed.
47+
48+
The function can use the following input:
49+
* series: A collection of vectors‚
50+
* marker: A vector indicating the assignment of the series
51+
* rep_value: Value to be used for representation of the aggregated interval (we use mean by default)
52+
53+
54+
## cdad
55+
56+
Function to compute the cumulative distribution absolute difference from vector `u`
57+
to vector `v` assuming both have an equal mass (i.e., both normalised) and
58+
they are ordered.
59+
60+
## load_series_instance
61+
62+
Function to load the data provided and fit into a struct SeriesInstance().
63+
64+
## load_clust_instance
65+
66+
Function to load the clusters attributes.
67+
68+
## search_min_dist
69+
70+
Search minimal distance and return the marker, the min_dist position, and the clusters to be merged.
71+
72+
## find_clusters!
73+
74+
Function calling the necessary functions for the data aggregation procedure (to be enveloped in a loop with the necessary conditions, e.g., while nclusters > stopping_k).
75+
76+
## compute_dist!
77+
78+
Compute the distances between two matrices (series_comp and k_cent_comp).
79+
80+
81+
## update_marker
82+
83+
Update the clusters assignment (Bool marker indicating which positions are to be merged).
84+
85+
## replace_lines
86+
87+
Replace lines of a matrix/vector by another matrix/vector with the same number of columns than the original matrix/vector.
88+
89+
## update_clust!
90+
91+
Updates clusters attributes in the _ClustInstance object.
92+
93+
## update_k!
94+
95+
Updates number of clusters in the _SeriesInstance object.
96+

0 commit comments

Comments
 (0)