Skip to content

Add IB Optimization & convexity#1

Merged
shanest merged 26 commits into
mainfrom
eff_conv
Jul 11, 2025
Merged

Add IB Optimization & convexity#1
shanest merged 26 commits into
mainfrom
eff_conv

Conversation

@Ashvin-Ranjan
Copy link
Copy Markdown
Collaborator

@Ashvin-Ranjan Ashvin-Ranjan commented Jul 3, 2025

  • Sets up structure for the project
  • Adds IB Optimization with docstrings and tests
  • Adds convexity calculations and suboptimal sampling with docstrings and tests

Ashvin-Ranjan and others added 6 commits July 3, 2025 12:55
- Adds IB Optimization with docstrings and tests
- Adds WIP convexity code, which will have tests and docstrings added soon
- Make the suboptimizer normalize properly so it does not throw errors occasionally
- Fixed suboptimizer to normalize so that errors do not occur with rounding
- Made convexity project down points which do not span the space
  - Also vectorized convexity calculations for both one and higher dimensions
- Added docstrings to all relevant functions
- Separated optimization tests to another file
  - Suboptimization may be added but it is very difficult to figure out how to test it, since it is random
- Added tests for convexity
@Ashvin-Ranjan Ashvin-Ranjan changed the title Add IB Optimization code & beta convexity code Add IB Optimization & convexity Jul 8, 2025
Copy link
Copy Markdown
Contributor

@shanest shanest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff! Mostly minor organizational stuff :)

Comment thread src/eff_conv/convexity.py Outdated
Comment thread src/eff_conv/convexity.py
Comment thread src/eff_conv/convexity.py Outdated
Comment thread src/eff_conv/convexity.py Outdated
Comment thread src/eff_conv/convexity.py Outdated
Comment thread src/eff_conv/language.py
Comment thread src/eff_conv/language.py Outdated
Comment thread src/eff_conv/structure.py Outdated
import random
import numpy as np


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure (a) why this is its own file and (b) if so, why it's called suboptimizer. Move to utils?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original plan was to have this file also include rotation/other ways to generate non-optimal encoders but I think that since that there is only this function I can move it to utils

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually after trying this it creates a really annoying circular import sequence (since utils now has to use something from language and language uses utils) which ends up causing errors, so I think that it might be better to keep it as is for now.

Comment thread src/eff_conv/suboptimizer.py
@shanest shanest merged commit 06e8b63 into main Jul 11, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants