Skip to content

Commit

Permalink
Merge pull request #53 from decarsg/feature/lmi-strictness
Browse files Browse the repository at this point in the history
LMI Strictness
  • Loading branch information
sdahdah committed Nov 9, 2021
2 parents e6c7764 + 2e93cce commit b362432
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors:
orcid: "https://orcid.org/0000-0002-1987-9268"
affiliation: "McGill University"
title: "decarsg/pykoop"
version: v1.0.3
version: v1.0.4
doi: 10.5281/zenodo.5576490
date-released: 2021-10-19
url: "https://github.com/decarsg/pykoop"
16 changes: 8 additions & 8 deletions pykoop/lmi_regressors.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,49 +337,49 @@ def _create_base_problem(
problem.add_constraint(picos.block([
[Z, U],
[U.T, H_inv],
]) >> 0)
]) >> picos_eps)
elif inv_method == 'pinv':
H_inv = picos.Constant('H^+', _calc_Hpinv(H))
problem.add_constraint(picos.block([
[Z, U],
[U.T, H_inv],
]) >> 0)
]) >> picos_eps)
elif inv_method == 'eig':
VsqrtLmb = picos.Constant('(V Lambda^(1/2))', _calc_VsqrtLmb(H))
problem.add_constraint(
picos.block([
[Z, U * VsqrtLmb],
[VsqrtLmb.T * U.T, 'I'],
]) >> 0)
]) >> picos_eps)
elif inv_method == 'ldl':
LsqrtD = picos.Constant('(L D^(1/2))', _calc_LsqrtD(H))
problem.add_constraint(
picos.block([
[Z, U * LsqrtD],
[LsqrtD.T * U.T, 'I'],
]) >> 0)
]) >> picos_eps)
elif inv_method == 'chol':
L = picos.Constant('L', _calc_L(H))
problem.add_constraint(
picos.block([
[Z, U * L],
[L.T * U.T, 'I'],
]) >> 0)
]) >> picos_eps)
elif inv_method == 'sqrt':
sqrtH = picos.Constant('sqrt(H)', _calc_sqrtH(H))
problem.add_constraint(
picos.block([
[Z, U * sqrtH],
[sqrtH.T * U.T, 'I'],
]) >> 0)
]) >> picos_eps)
elif inv_method == 'svd':
QSig = picos.Constant(
'Q Sigma', _calc_QSig(X_unshifted, alpha_tikhonov, tsvd))
problem.add_constraint(
picos.block([
[Z, U * QSig],
[QSig.T * U.T, 'I'],
]) >> 0)
]) >> picos_eps)
else:
# Should never, ever get here.
assert False
Expand Down Expand Up @@ -2473,7 +2473,7 @@ def _add_twonorm(problem: picos.Problem, U: picos.RealVariable,
gamma = picos.RealVariable('gamma', 1)
problem.add_constraint(
picos.block([[picos.diag(gamma, p), U.T],
[U, picos.diag(gamma, p_theta)]]) >> 0)
[U, picos.diag(gamma, p_theta)]]) >> picos_eps)
# Add term to cost function
alpha_scaled = picos.Constant('alpha_scaled_2', alpha_other)
if square_norm:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='pykoop',
version='1.0.3',
version='1.0.4',
description='Koopman operator identification library in Python',
long_description=readme,
author='Steven Dahdah',
Expand Down

0 comments on commit b362432

Please sign in to comment.