Skip to content

feat: transformations base primitives#78

Draft
LeonidElkin wants to merge 1 commit intomainfrom
transformations/init
Draft

feat: transformations base primitives#78
LeonidElkin wants to merge 1 commit intomainfrom
transformations/init

Conversation

@LeonidElkin
Copy link
Collaborator

Base primitives and affine transformation for check. There is also an approximation, but it is very raw for now

@LeonidElkin LeonidElkin force-pushed the transformations/init branch from 033d336 to 1be0adf Compare March 9, 2026 19:11
@LeonidElkin
Copy link
Collaborator Author

LeonidElkin commented Mar 9, 2026

This is a base prototype. What surely needs to get done

  • A flyweight pattern for base distributions in transformation tree which will be generated as operations progress
  • ArithmeticalMixin for "injecting" operations in any Distribution like class e.g. ParametricFamilyDistribution
  • Improve the approximation. Make simple interpolation instead of Chebyshev
  • And, of course, test it all

@Desiment
Copy link
Contributor

Summary after on-line call:

We decided to re-consider architecture of the graph (yes, again); from new POV one can see analytical computations as loops with different labels is such graph. This will allow to

  • Make choice between analytical computations in complex distributions, such as genhyperbolic
  • Allow to control, how characteristics are computed in DerivedDistribution

More specifically, we assume that

  1. Analytical calculations inside Distribution now declared as:
dict[GenericCharacteristicName, dict[Label, AnalyticalComputation]]

NOTE: options are still needed, because some of them may take values in continuous domain, or have discrete set of values, but it would be quite sad to redefine them in every transformation; labels and options should be orthogonal in that sense;
2. Graph view considers analytical calculations as loops. The default strategy task is to achieve the first characteristic that have such loops.
3. Since we can have multiple analytical calculations, we need to solve them in a strategy. For now, choice the random one, in the future switch to the preferred-label method.
4. In the future, we'll need a separate strategy for DerivedDistribution (ideally,each transformation will have its own strategy, or one large strategy that observes which operation was performed)

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