Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge
swh:1:cnt:459b14dd1f78758af710d557c5495b5ef5834b08

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
(requires biblatex-software package)
Generating citation ...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%% Constrained Dynamic Mode Decomposition %%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This is the main demo for 'Constrained Dynamic Mode Decomposition'.
%
% 
% The demo uses the lynx dataset (compare Figure 7, 8, and 9). It is an 
% univariate time series that consists of seasonal and cyclic patterns.
% These patterns are characterized by a non-integer period given by 9.63.
% Therefore, the time series describes no typical time-scale.

clear; close; clc;
addpath('toolbox/')


%% Input
DATA = IO_LoadData('lynx');                             % load lynx dataset


%% Original DMD
DMDOrig = DMD_ConstrainedDMD(DATA);                     % compute original DMD (Algorithm 1, line 1-7)
DMDOrig = DMD_InfluenceComputation(DATA, DMDOrig);      % compute influence of DMD components (Eq. 20)
DMDOrig = VIS_Filtering(DMDOrig, 1e-3, 5e-2);           % use filtering technique 

VIS_OverviewRepresentation(DATA, DMDOrig, 6)            % visualize DMD components (Fig. 7, 3rd column)


%% Constrained DMD - 1. human-in-the-loop feedback
periods1 = [9.63, 9.63/2]';
constrs1 = [exp(2*pi*1i./(periods1)); conj(exp(2*pi*1i./(periods1)))];
DMDCons1 = DMD_ConstrainedDMD(DATA, DMDOrig, constrs1); % compute constrained DMD (Algorithm 1, line 8-18)
DMDCons1 = DMD_InfluenceComputation(DATA, DMDCons1);    % compute influence of DMD components (Eq. 20)
DMDCons1 = VIS_Filtering(DMDCons1, 1e-3, 5e-2);         % use filtering technique 

VIS_OverviewRepresentation(DATA, DMDCons1,6)            % visualize DMD components (Fig. 8)
VIS_ChangeTracking(DMDOrig, DMDCons1)                   % change tracking of eigenvalues (Fig. 9, left)


%% Constrained DMD - 2. human-in-the-loop feedback
periods2 = [9.63, 9.63/2, 9.63*4, 9.63*2]';
constrs2 = [exp(2*pi*1i./(periods2)); conj(exp(2*pi*1i./(periods2)))];
DMDCons2 = DMD_ConstrainedDMD(DATA, DMDOrig, constrs2); % compute constrained DMD (Algorithm 1, line 8-18)
DMDCons2 = DMD_InfluenceComputation(DATA, DMDCons2);    % compute influence of DMD components (Eq. 20)
DMDCons2 = VIS_Filtering(DMDCons2, 1e-3, 5e-2);         % use filtering technique 

VIS_OverviewRepresentation(DATA, DMDCons2,6)            % visualize DMD components (Fig. 7, 4th column)
VIS_ChangeTracking(DMDCons1, DMDCons2)                  % change tracking of eigenvalues (Fig. 9, right)

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API