New Function Recommendations #659
Replies: 22 comments 31 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Listing standard functions is good. Also, we should organize them into packages, like, |
Beta Was this translation helpful? Give feedback.
-
Anything here would be fairly easy to add, though each item would take a bit of work: https://stdlib.io/docs/api/latest/@stdlib/math/base/special (really, most specific functions in stdlib that don't involve other types should be okay) |
Beta Was this translation helpful? Give feedback.
-
Here's the library of functions we currently import, though I want to have them be manual, later on. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
loguniform(a, b) = exp(uniform(log(a), log(b))) |
Beta Was this translation helpful? Give feedback.
-
geometric mean of probabilities, and other methods implemented in https://www.npmjs.com/package/@forecasting/aggregation |
Beta Was this translation helpful? Give feedback.
-
I'd prefer it to be called |
Beta Was this translation helpful? Give feedback.
-
I don't think we have simple random() functions yet. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Ozzie mentions: having a |
Beta Was this translation helpful? Give feedback.
-
System.env()Would return a record, like,
Optionally we could send in the other view data too, but that seems pretty unnecessary. We could also have separate functions like |
Beta Was this translation helpful? Give feedback.
-
I'm extremely new to Squiggle, but I would love a suite of max-entropy distribution inference functions. Something along the lines of
|
Beta Was this translation helpful? Give feedback.
-
To do: Figure out a neat/short way to express the following type of relationship: Given a distribution (e.g., funds), combine it with a function which goes from each point of a distribution to another distribution. E.g., you have some uncertainty about how many funds EA will have, and some uncertainty of how much impact to achieve per unit of money, but you also have diminishing returns in terms of money.
I can't find the function to manipulate xyShapes, but if I find it I'll give an example. |
Beta Was this translation helpful? Give feedback.
-
I remember this existing, but can't find it |
Beta Was this translation helpful? Give feedback.
-
Generalized correlations:
I.e., if we have a distribution, and each point of that distribution is associated with a different distribution. |
Beta Was this translation helpful? Give feedback.
-
I think I'm misunderstanding something because this doesn't work, it says |
Beta Was this translation helpful? Give feedback.
-
student t distributions! my current use case is estimating the posterior distribution of a mean. |
Beta Was this translation helpful? Give feedback.
-
[From Ozzie]
Recommend new functions for Squiggle here.
Checklist
All recommendations are appreciated! However, it's extra helpful if you could include any/all of the following:
SampleSet.fromDist: (list<number>) => sampleSet
Danger.x
for a while, until we're more comfortable with it)Checklist template
(Copy and paste this into your comment)
Considerations
New functions are fairly costly. They complicate the code, and because it's bad for us to remove functionality (this would break people's code), we need to support them indefinitely. One exception is that we can remove them in major releases, but we shouldn't do this often.
What's particularly bad is changing function definitions to mean different things. For example, if we support
random()
to return a random number from 0 to 1, then change it to return a number from -Infinity to Infinity, later. This would break people's code in ways that are difficult to notice, which is basically catastrophically bad.Beta Was this translation helpful? Give feedback.
All reactions