All Projects → FZJ-IEK3-VSA → tsam

FZJ-IEK3-VSA / tsam

Licence: MIT license
A python-based time series aggregation module (tsam) which can be used to reduce the number of time steps using typical periods or by decreasing the temporal resolution

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to tsam

Khiva
An open-source library of algorithms to analyse time series in GPU and CPU.
Stars: ✭ 161 (+43.75%)
Mutual labels:  timeseries, clustering
Dtaidistance
Time series distances: Dynamic Time Warping (DTW)
Stars: ✭ 499 (+345.54%)
Mutual labels:  timeseries, clustering
dtw-python
Python port of R's Comprehensive Dynamic Time Warp algorithms package
Stars: ✭ 139 (+24.11%)
Mutual labels:  timeseries, clustering
Timeseries Clustering Vae
Variational Recurrent Autoencoder for timeseries clustering in pytorch
Stars: ✭ 190 (+69.64%)
Mutual labels:  timeseries, clustering
cf-abacus
CF usage metering and aggregation
Stars: ✭ 100 (-10.71%)
Mutual labels:  aggregation
scikit-cmeans
Flexible, extensible fuzzy c-means clustering in python.
Stars: ✭ 18 (-83.93%)
Mutual labels:  clustering
fuzzy-c-means
Fuzzy c-means Clustering
Stars: ✭ 34 (-69.64%)
Mutual labels:  clustering
DP means
Dirichlet Process K-means
Stars: ✭ 36 (-67.86%)
Mutual labels:  clustering
HydroSight
A flexible statistical toolbox for deriving quantitative insights from groundwater data.
Stars: ✭ 31 (-72.32%)
Mutual labels:  timeseries
sherlock
Sherlock is an anomaly detection service built on top of Druid
Stars: ✭ 137 (+22.32%)
Mutual labels:  timeseries
js-markerclusterer
Create and manage clusters for large amounts of markers
Stars: ✭ 92 (-17.86%)
Mutual labels:  clustering
chartjs-plugin-datasource-prometheus
Chart.js plugin for Prometheus data loading
Stars: ✭ 77 (-31.25%)
Mutual labels:  timeseries
Deep XF
Package towards building Explainable Forecasting and Nowcasting Models with State-of-the-art Deep Neural Networks and Dynamic Factor Model on Time Series data sets with single line of code. Also, provides utilify facility for time-series signal similarities matching, and removing noise from timeseries signals.
Stars: ✭ 83 (-25.89%)
Mutual labels:  timeseries
cortex-tenant
Prometheus remote write proxy that adds Cortex tenant ID based on metric labels
Stars: ✭ 60 (-46.43%)
Mutual labels:  timeseries
SmoothWAN
Internet bonding router with seamless failover using Speedify
Stars: ✭ 199 (+77.68%)
Mutual labels:  aggregation
CoronaDash
COVID-19 spread shiny dashboard with a forecasting model, countries' trajectories graphs, and cluster analysis tools
Stars: ✭ 20 (-82.14%)
Mutual labels:  clustering
FSDA
Flexible Statistics and Data Analysis (FSDA) extends MATLAB for a robust analysis of data sets affected by different sources of heterogeneity. It is open source software licensed under the European Union Public Licence (EUPL). FSDA is a joint project by the University of Parma and the Joint Research Centre of the European Commission.
Stars: ✭ 53 (-52.68%)
Mutual labels:  clustering
gouda
Golang Utilities for Data Analysis
Stars: ✭ 18 (-83.93%)
Mutual labels:  clustering
ML-Track
This repository is a recommended track, designed to get started with Machine Learning.
Stars: ✭ 19 (-83.04%)
Mutual labels:  clustering
audio noise clustering
https://dodiku.github.io/audio_noise_clustering/results/ ==> An experiment with a variety of clustering (and clustering-like) techniques to reduce noise on an audio speech recording.
Stars: ✭ 24 (-78.57%)
Mutual labels:  clustering

Build Status Version Documentation Status PyPI - License codecov badge

Forschungszentrum Juelich Logo

tsam - Time Series Aggregation Module

tsam is a python package which uses different machine learning algorithms for the aggregation of time series. The data aggregation can be performed in two freely combinable dimensions: By representing the time series by a user-defined number of typical periods or by decreasing the temporal resolution. tsam was originally designed for reducing the computational load for large-scale energy system optimization models by aggregating their input data, but is applicable for all types of time series, e.g., weather data, load data, both simultaneously or other arbitrary groups of time series.

If you want to use tsam in a published work, please kindly cite one of our latest journal articles:

The documentation of the tsam code can be found here.

Features

  • flexible handling of multidimensional time-series via the pandas module
  • different aggregation methods implemented (averaging, k-means, exact k-medoids, hierarchical, k-maxoids, k-medoids with contiguity), which are based on scikit-learn, or self-programmed with pyomo
  • novel representation methods, keeping statistical attributes, such as the distribution
  • flexible integration of extreme periods as own cluster centers
  • weighting for the case of multidimensional time-series to represent their relevance

Installation

Directly install via pip as follows:

pip install tsam

Alternatively, clone a local copy of the repository to your computer

git clone https://github.com/FZJ-IEK3-VSA/tsam.git

Then install tsam via pip as follow

cd tsam
pip install . 

Or install directly via python as

python setup.py install

In order to use the k-medoids clustering, make sure that you have installed a MILP solver. As default coin-cbc is used. Nevertheless, in case you have access to a license we recommend commercial solvers (e.g. Gurobi or CPLEX) since they have a better performance.

Examples

Basic workflow

A small example how tsam can be used is decribed as follows

	import pandas as pd
	import tsam.timeseriesaggregation as tsam

Read in the time series data set with pandas

	raw = pd.read_csv('testdata.csv', index_col = 0)

Initialize an aggregation object and define the length of a single period, the number of typical periods, the number of segments in each period, the aggregation method and the representation method - here duration/distribution representation which

	aggregation = tsam.TimeSeriesAggregation(raw, 
						noTypicalPeriods = 8, 
						hoursPerPeriod = 24, 
						rescaleClusterPeriods = False,
						segmentation = True,
						representationMethod = "distributionRepresentation",
						distributionPeriodWise = False
						clusterMethod = 'hierarchical')

Run the aggregation to typical periods

	typPeriods = aggregation.createTypicalPeriods()

Store the results as .csv file

	typPeriods.to_csv('typperiods.csv')

Detailed examples

A first example shows the capabilites of tsam as jupyter notebook.

A second example shows in more detail how to access the relevant aggregation results required for paramtrizing e.g. an optimization.

The example time series are based on a department publication and the test reference years of the DWD.

License

MIT License

Copyright (C) 2016-2019 Leander Kotzur (FZJ IEK-3), Maximilian Hoffmann (FZJ IEK-3), Peter Markewitz (FZJ IEK-3), Martin Robinius (FZJ IEK-3), Detlef Stolten (FZJ IEK-3)

You should have received a copy of the MIT License along with this program. If not, see https://opensource.org/licenses/MIT

The core developer team sits in the Institute of Energy and Climate Research - Techno-Economic Energy Systems Analysis (IEK-3) belonging to the Forschungszentrum Jülich.

Further Reading

If you are further interested in the impact of time series aggregation on the cost-optimal results on different energy system use cases, you can find a publication which validates the methods and describes their cababilites via the following link. A second publication introduces a method how to model state variables (e.g. the state of charge of energy storage components) between the aggregated typical periods which can be found here. Finally yet importantly the potential of time series aggregation to simplify mixed integer linear problems is investigated here.

The publications about time series aggregation for energy system optimization models published alongside the development of tsam are listed below:

Acknowledgement

This work is supported by the Helmholtz Association under the Joint Initiative "Energy System 2050 A Contribution of the Research Field Energy" and the program "Energy System Design" and within the BMWi/BMWk funded project METIS.

Helmholtz Logo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].