From 38bd16b15a0e045631dee2b1c93531c96161beef Mon Sep 17 00:00:00 2001 From: Ethan Lew Date: Mon, 23 Oct 2023 11:39:01 +0800 Subject: [PATCH 1/7] add CITATION file --- CITATION.cff | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000..72ef5f5 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,29 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: +- family-names: "Lew" + given-names: "Ethan" + orcid: "https://orcid.org/0000-0002-6509-6846" +- family-names: "Hekal" + given-names: "Abdelrahman" + orcid: "https://orcid.org/0009-0008-9685-0558" +- family-names: "Potomkin" + given-names: "Kostiantyn" + orcid: "https://orcid.org/0000-0002-4726-8931" +- family-names: "Kochdumper" + given-names: "Niklas" + orcid: "https://orcid.org/0000-0001-6017-7623" +- family-names: "Hencey" + given-names: "Brandon" + orcid: "https://orcid.org/0000-0001-9240-7999" +- family-names: "Bak" + given-names: "Stanley" + orcid: "https://orcid.org/0000-0003-4947-9553" +- family-names: "Bogomolov" + given-names: "Sergiy" + orcid: "https://orcid.org/0000-0002-0686-0365" +title: "AutoKoopman: A Toolbox for Automated System Identification via Koopman Operator Linearization" +version: 0.30.0 +doi: 10.1007/978-3-031-45332-8_12 +date-released: 2023-10-19 +url: "https://github.com/EthanJamesLew/AutoKoopman" From 430325feeb608fc38666ffbb9727718aa9c3027a Mon Sep 17 00:00:00 2001 From: Ethan Lew Date: Tue, 24 Oct 2023 21:16:25 +0800 Subject: [PATCH 2/7] make normalize default to False --- autokoopman/autokoopman.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autokoopman/autokoopman.py b/autokoopman/autokoopman.py index 5f8da32..47a8855 100644 --- a/autokoopman/autokoopman.py +++ b/autokoopman/autokoopman.py @@ -75,7 +75,7 @@ def get_parameter_space(obs_type, threshold_range, rank): return ParameterSpace( "koopman-polynomial", [ - DiscreteParameter("degree", 1, 5), + DiscreteParameter("degree", 1, 3), DiscreteParameter("rank", *rank), ], ) @@ -133,7 +133,7 @@ def auto_koopman( training_data: Union[TrajectoriesData, Sequence[np.ndarray]], inputs_training_data: Optional[Sequence[np.ndarray]] = None, sampling_period: Optional[float] = None, - normalize: bool = True, + normalize: bool = False, opt: Union[str, HyperparameterTuner] = "monte-carlo", max_opt_iter: int = 100, max_epochs: int = 500, From 3cbd59c6b378f852318f1d41a169554c6a7d9864 Mon Sep 17 00:00:00 2001 From: Ethan Lew Date: Tue, 24 Oct 2023 21:16:38 +0800 Subject: [PATCH 3/7] add koopman_operator property --- autokoopman/core/system.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autokoopman/core/system.py b/autokoopman/core/system.py index 3978ef8..b88902b 100644 --- a/autokoopman/core/system.py +++ b/autokoopman/core/system.py @@ -398,6 +398,10 @@ def evolv_func_scale(t, x, i): def A(self): return self._A + @property + def koopman_operator(self): + return self._A + @property def B(self): return self._B From d7186cb85a7db5de5311c93fcca8142b251894b9 Mon Sep 17 00:00:00 2001 From: Ethan Lew Date: Tue, 24 Oct 2023 21:40:28 +0800 Subject: [PATCH 4/7] update conda environment --- environment.yml | 87 +++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 42 deletions(-) diff --git a/environment.yml b/environment.yml index 1477062..6f8177c 100644 --- a/environment.yml +++ b/environment.yml @@ -1,48 +1,50 @@ name: autokoopman channels: + - conda-forge - defaults dependencies: - - _libgcc_mutex=0.1=main - - _openmp_mutex=5.1=1_gnu - - blas=1.0=mkl - - ca-certificates=2023.01.10=h06a4308_0 - - certifi=2022.12.7=py39h06a4308_0 - - cffi=1.15.1=py39h5eee18b_3 - - flit-core=3.6.0=pyhd3eb1b0_0 - - future=0.18.2=py39h06a4308_1 - - intel-openmp=2021.4.0=h06a4308_3561 - - ld_impl_linux-64=2.38=h1181459_1 - - libffi=3.4.2=h6a678d5_6 - - libgcc-ng=11.2.0=h1234567_1 - - libgomp=11.2.0=h1234567_1 - - libprotobuf=3.20.3=he621ea3_0 - - libstdcxx-ng=11.2.0=h1234567_1 - - mkl=2021.4.0=h06a4308_640 - - mkl-service=2.4.0=py39h7f8727e_0 - - mkl_fft=1.3.1=py39hd3c417c_0 - - mkl_random=1.2.2=py39h51133e4_0 - - ncurses=6.4=h6a678d5_0 - - ninja=1.10.2=h06a4308_5 - - ninja-base=1.10.2=hd09550d_5 - - numpy-base=1.23.5=py39h31eccc5_0 - - openssl=1.1.1s=h7f8727e_0 - - pip=22.3.1=py39h06a4308_0 + - blas=1.0=openblas + - ca-certificates=2023.08.22=hca03da5_0 + - cffi=1.15.1=py39h22df2f2_0 + - filelock=3.9.0=py39hca03da5_0 + - gmp=6.2.1=hc377ac9_3 + - gmpy2=2.1.2=py39h8c48613_0 + - jinja2=3.1.2=py39hca03da5_0 + - libcxx=16.0.6=h4653b0c_0 + - libffi=3.3=h9f76cd9_2 + - libgfortran=5.0.0=11_3_0_hca03da5_28 + - libgfortran5=11.3.0=h009349e_28 + - libopenblas=0.3.21=h269037a_0 + - libprotobuf=3.20.3=h514c7bf_0 + - libsqlite=3.43.2=h091b4b1_0 + - libuv=1.44.2=h80987f9_0 + - libzlib=1.2.13=h53f4e23_5 + - llvm-openmp=14.0.6=hc6e5704_0 + - markupsafe=2.1.1=py39h1a28f6b_0 + - mpc=1.1.0=h8c48613_1 + - mpfr=4.0.2=h695f6f0_1 + - ncurses=6.4=h7ea286d_0 + - networkx=3.1=py39hca03da5_0 + - ninja=1.10.2=hca03da5_5 + - ninja-base=1.10.2=h525c30c_5 + - numpy-base=1.26.0=py39ha9811e2_0 + - openssl=1.1.1w=h1a28f6b_0 + - pip=23.3.1=pyhd8ed1ab_0 - pycparser=2.21=pyhd3eb1b0_0 - - python=3.9.16=h7a1cb2a_0 - - pytorch=1.12.1=cpu_py39hb1f1ab4_1 - - pyyaml=6.0=py39h5eee18b_1 - - readline=8.2=h5eee18b_0 - - setuptools=65.6.3=py39h06a4308_0 - - six=1.16.0=pyhd3eb1b0_1 - - sqlite=3.40.1=h5082296_0 - - tk=8.6.12=h1ccaba5_0 - - typing-extensions=4.4.0=py39h06a4308_0 - - typing_extensions=4.4.0=py39h06a4308_0 - - tzdata=2022g=h04d1e81_0 - - wheel=0.37.1=pyhd3eb1b0_0 - - xz=5.2.10=h5eee18b_1 - - yaml=0.2.5=h7b6447c_0 - - zlib=1.2.13=h5eee18b_0 + - python=3.9.0=h4b4120c_5_cpython + - pytorch=2.0.1=gpu_mps_py39h20d1048_0 + - readline=8.2=h92ec313_1 + - setuptools=68.2.2=pyhd8ed1ab_0 + - sleef=3.5.1=h80987f9_2 + - sqlite=3.43.2=hf2abe2d_0 + - sympy=1.11.1=py39hca03da5_0 + - tk=8.6.13=hb31c410_0 + - typing-extensions=4.7.1=py39hca03da5_0 + - typing_extensions=4.7.1=py39hca03da5_0 + - tzdata=2023c=h71feb2d_0 + - wheel=0.41.2=pyhd8ed1ab_0 + - xz=5.2.6=h57fd34a_0 + - zlib=1.2.13=h53f4e23_5 - pip: - attrs==22.2.0 - cmake==3.25.2 @@ -60,7 +62,7 @@ dependencies: - kiwisolver==1.4.4 - matplotlib==3.6.3 - mpmath==1.2.1 - - numpy==1.23.1 + - numpy==1.21.0 - packaging==23.0 - pandas==1.5.3 - paramz==0.9.5 @@ -73,6 +75,7 @@ dependencies: - pytz==2022.7.1 - scikit-learn==1.0.2 - scipy==1.10.0 - - sympy==1.11.1 + - six==1.16.0 - threadpoolctl==3.1.0 + - tomli==2.0.1 - tqdm==4.64.1 From cdfb929ea1411546199ba219712dbb27d1c840dd Mon Sep 17 00:00:00 2001 From: Ethan Lew Date: Tue, 24 Oct 2023 21:46:10 +0800 Subject: [PATCH 5/7] conda environment: defaults->nodefaults --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 6f8177c..aa55e91 100644 --- a/environment.yml +++ b/environment.yml @@ -1,7 +1,7 @@ name: autokoopman channels: - conda-forge - - defaults + - nodefaults dependencies: - blas=1.0=openblas - ca-certificates=2023.08.22=hca03da5_0 From 24b2633dbbd1d9c81be0d6693d95a64b43e50352 Mon Sep 17 00:00:00 2001 From: Ethan Lew Date: Tue, 24 Oct 2023 21:49:11 +0800 Subject: [PATCH 6/7] conda environment switch to no-builds --- environment.yml | 86 ++++++++++++++++++++++++------------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/environment.yml b/environment.yml index aa55e91..b4b3940 100644 --- a/environment.yml +++ b/environment.yml @@ -1,50 +1,50 @@ name: autokoopman channels: - conda-forge - - nodefaults + - defaults dependencies: - - blas=1.0=openblas - - ca-certificates=2023.08.22=hca03da5_0 - - cffi=1.15.1=py39h22df2f2_0 - - filelock=3.9.0=py39hca03da5_0 - - gmp=6.2.1=hc377ac9_3 - - gmpy2=2.1.2=py39h8c48613_0 - - jinja2=3.1.2=py39hca03da5_0 - - libcxx=16.0.6=h4653b0c_0 - - libffi=3.3=h9f76cd9_2 - - libgfortran=5.0.0=11_3_0_hca03da5_28 - - libgfortran5=11.3.0=h009349e_28 - - libopenblas=0.3.21=h269037a_0 - - libprotobuf=3.20.3=h514c7bf_0 - - libsqlite=3.43.2=h091b4b1_0 - - libuv=1.44.2=h80987f9_0 - - libzlib=1.2.13=h53f4e23_5 - - llvm-openmp=14.0.6=hc6e5704_0 - - markupsafe=2.1.1=py39h1a28f6b_0 - - mpc=1.1.0=h8c48613_1 - - mpfr=4.0.2=h695f6f0_1 - - ncurses=6.4=h7ea286d_0 - - networkx=3.1=py39hca03da5_0 - - ninja=1.10.2=hca03da5_5 - - ninja-base=1.10.2=h525c30c_5 - - numpy-base=1.26.0=py39ha9811e2_0 - - openssl=1.1.1w=h1a28f6b_0 - - pip=23.3.1=pyhd8ed1ab_0 - - pycparser=2.21=pyhd3eb1b0_0 - - python=3.9.0=h4b4120c_5_cpython - - pytorch=2.0.1=gpu_mps_py39h20d1048_0 - - readline=8.2=h92ec313_1 - - setuptools=68.2.2=pyhd8ed1ab_0 - - sleef=3.5.1=h80987f9_2 - - sqlite=3.43.2=hf2abe2d_0 - - sympy=1.11.1=py39hca03da5_0 - - tk=8.6.13=hb31c410_0 - - typing-extensions=4.7.1=py39hca03da5_0 - - typing_extensions=4.7.1=py39hca03da5_0 - - tzdata=2023c=h71feb2d_0 - - wheel=0.41.2=pyhd8ed1ab_0 - - xz=5.2.6=h57fd34a_0 - - zlib=1.2.13=h53f4e23_5 + - blas=1.0 + - ca-certificates=2023.08.22 + - cffi=1.15.1 + - filelock=3.9.0 + - gmp=6.2.1 + - gmpy2=2.1.2 + - jinja2=3.1.2 + - libcxx=16.0.6 + - libffi=3.3 + - libgfortran=5.0.0 + - libgfortran5=11.3.0 + - libopenblas=0.3.21 + - libprotobuf=3.20.3 + - libsqlite=3.43.2 + - libuv=1.44.2 + - libzlib=1.2.13 + - llvm-openmp=14.0.6 + - markupsafe=2.1.1 + - mpc=1.1.0 + - mpfr=4.0.2 + - ncurses=6.4 + - networkx=3.1 + - ninja=1.10.2 + - ninja-base=1.10.2 + - numpy-base=1.26.0 + - openssl=1.1.1w + - pip=23.3.1 + - pycparser=2.21 + - python=3.9.0 + - pytorch=2.0.1 + - readline=8.2 + - setuptools=68.2.2 + - sleef=3.5.1 + - sqlite=3.43.2 + - sympy=1.11.1 + - tk=8.6.13 + - typing-extensions=4.7.1 + - typing_extensions=4.7.1 + - tzdata=2023c + - wheel=0.41.2 + - xz=5.2.6 + - zlib=1.2.13 - pip: - attrs==22.2.0 - cmake==3.25.2 From 738890e135c0cfd1260491b9a979f879b2f0c312 Mon Sep 17 00:00:00 2001 From: Ethan Lew Date: Tue, 24 Oct 2023 21:52:57 +0800 Subject: [PATCH 7/7] remove libgfortran from environment.yml --- environment.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/environment.yml b/environment.yml index b4b3940..688dcce 100644 --- a/environment.yml +++ b/environment.yml @@ -12,8 +12,6 @@ dependencies: - jinja2=3.1.2 - libcxx=16.0.6 - libffi=3.3 - - libgfortran=5.0.0 - - libgfortran5=11.3.0 - libopenblas=0.3.21 - libprotobuf=3.20.3 - libsqlite=3.43.2