sumofsquares

Python implementation of Sum-of-Squares optimization built on picos

https://github.com/yuanchenyang/sumofsquares.py

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.8%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Python implementation of Sum-of-Squares optimization built on picos

Basic Info
  • Host: GitHub
  • Owner: yuanchenyang
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 85.9 KB
Statistics
  • Stars: 37
  • Watchers: 3
  • Forks: 5
  • Open Issues: 2
  • Releases: 0
Created over 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

SumOfSquares.py

| Documentation | Build Status | |:-----------------:|:----------------:| | | Build Status |

Sum of squares optimization built on top of picos. Easy access to pseudoexpectation operators for both formulating problems and extracting solutions via rounding algorithms.

Installation

To install from pypi:

pip install SumOfSquares

Examples

To compute the sum of squares decomposition of a polynomial: ```python

import sympy as sp x, y = sp.symbols('x y') p = 2x4 + 2x3*y - x2y2 + 5y4 prob = SOSProblem() c = prob.addsosconstraint(p, [x, y]) prob.solve() c.getsosdecomp() Matrix([ [5.0(-0.306x2 + y2)2], [2.057(0.486x2 + x*y)2], [ 1.047x*4]]) ```

More Examples

Citation

If you use this library in your work, please consider citing:

@software{Yuan_SumOfSquares_py, author = {Yuan, Chenyang}, license = {MIT}, title = {{SumOfSquares.py}}, url = {https://github.com/yuanchenyang/SumOfSquares.py} }

Owner

  • Name: Chenyang Yuan
  • Login: yuanchenyang
  • Kind: user
  • Location: Cambridge, MA
  • Company: MIT

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: SumOfSquares.py
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Chenyang
    family-names: Yuan
    email: yuanchenyang@gmail.com
    affiliation: MIT
    orcid: 'https://orcid.org/0000-0001-7912-0328'
repository-code: 'https://github.com/yuanchenyang/SumOfSquares.py'
url: 'https://sums-of-squares.github.io/sos/index.html#python'
abstract: ' Python implementation of Sum-of-Squares optimization built on picos. Easy access to pseudoexpectation operators for both formulating problems and extracting solutions via rounding algorithms.'
keywords:
  - Sum of squares
  - Optimization
  - Modelling tool
license: MIT

GitHub Events

Total
  • Issues event: 1
  • Watch event: 10
Last Year
  • Issues event: 1
  • Watch event: 10

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 9
  • Total pull requests: 3
  • Average time to close issues: about 16 hours
  • Average time to close pull requests: about 10 hours
  • Total issue authors: 6
  • Total pull request authors: 3
  • Average comments per issue: 1.78
  • Average comments per pull request: 0.33
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: about 23 hours
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mathewdblewis (3)
  • JianqiangDing (2)
  • jeffreyzhang92 (1)
  • sdahdah (1)
  • ZHOUXINGYU-OASIS (1)
  • Kiguli (1)
Pull Request Authors
  • thatgardnerone (2)
  • AlexandreAmice (1)
  • SlaviXG (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 53 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 5
  • Total maintainers: 1
pypi.org: sumofsquares

Python implementation of Sum-of-Squares optimization built on picos

  • Homepage: https://github.com/yuanchenyang/SumOfSquares.py
  • Documentation: https://sums-of-squares.github.io/sos/index.html#python
  • License: Copyright 2020-2024 Chenyang Yuan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 1.3.1
    published over 1 year ago
  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 53 Last month
Rankings
Dependent packages count: 10.1%
Stargazers count: 13.1%
Average: 21.5%
Dependent repos count: 21.6%
Forks count: 29.8%
Downloads: 33.0%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
pyproject.toml pypi
  • numpy *
  • picos *
  • sympy *