Commit Graph

715 Commits

Author SHA1 Message Date
Quinn Dougherty
2b7e5b8245 skipLibCheck: true
(Needed for `mocha` transitive dependency build failure)

Value: [1e-6 to 1e-4]
2022-05-06 15:19:09 -04:00
Quinn Dougherty
28cb6b9c88 Final cleanup, but typescript is still borked
Value: [1e-8 to 1e-6]
2022-05-06 15:09:00 -04:00
Quinn Dougherty
bcf620337a Some Cleanup
Btw, Nuño gets a lot of credit for the last commit!

Value: [1e-2 to 8e-2]
2022-05-06 14:21:53 -04:00
Quinn Dougherty
722bfc6366 All three tests pass
- `uniform` `toPointSet` method has been changed for numerical
stability.

Value: [1e-1 to 1.75e0]
2022-05-06 13:58:15 -04:00
d9a40c973a feat: Get KL divergence working except in case of numerical errors ()
- Quinn was of great help here.
- I also left some dead code, which still has to be cleaned up
- There are still very annoying numerical errors, so I left one test
failing. These are due to how the interpolation is done
- Quinn to pick up from here

Value: [0.6 to 2]
2022-05-06 12:26:51 -04:00
5dd272fb0c tweak: Add tests for combineAlongSupportOfSecondArgument 2022-05-06 11:45:11 -04:00
cc3db79a2a feat: kl function but no dealing with errors yet 2022-05-06 10:49:04 -04:00
b393af8762 tweak: start building new function from scratch 2022-05-06 10:04:41 -04:00
87d6f8d4f6 fix: change integrand check order in KL divergence code 2022-05-06 09:49:42 -04:00
Quinn Dougherty
fd17da83b8 Merge remote-tracking branch 'origin/develop' into log-score-attempt 2022-05-05 20:42:39 -04:00
Quinn Dougherty
38d1c7aa61 Cleanup with option<(float, float, float)>
Value: [1e-5 to 1e-3]
2022-05-05 20:42:05 -04:00
Quinn Dougherty
dcf56d7bc6 combineAlongSupportOfSecondArgument implemented, tests still failing
Value: [1e-4 to 4e-2]
2022-05-05 20:02:12 -04:00
Quinn Dougherty
b49865d3aa progress on klDivergence (still working)
Value: [1e-5 to 1e-2]
2022-05-05 15:37:28 -04:00
Quinn Dougherty
32a881d06a Call Jstat for mean instead of calculate it
Value: [1e-8 to 1e-4]
2022-05-05 10:38:33 -04:00
Quinn Dougherty
dd942fe29e cleanup; CR
Value: [1e-9 to 1e-5]
2022-05-04 18:19:47 -04:00
Umur Ozkul
99f54f596c ternary operator (tested) 2022-05-04 22:36:34 +02:00
Umur Ozkul
888b615445 Merge branch 'reducer-dev-F-ifthenelse' into ternary
packages/squiggle-lang/src/rescript/Reducer/Reducer_Dispatch/Reducer_Dispatch_BuiltInMacros.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_Expression/Reducer_Expression_Builder.res
packages/squiggle-lang/src/rescript/Reducer/Reducer_MathJs/Reducer_MathJs_ToExpression.res
2022-05-04 21:51:15 +02:00
Umur Ozkul
8aa4248996 spelling 2022-05-04 21:23:40 +02:00
Quinn Dougherty
6211d3cfb0 Some sorta klDivergence conclusion
Value: [1e-6 to 1e-3]
2022-05-04 14:55:49 -04:00
Umur Ozkul
85b8333a09 Merge branch 'develop' into Umur-reducer-dev 2022-05-04 20:45:48 +02:00
Umur Ozkul
ad220ed2b4 foreign function interface 2022-05-04 20:44:46 +02:00
Quinn Dougherty
898547f3a3 klDivergence is now LogarithmWithThreshold 2022-05-04 13:53:32 -04:00
Quinn Dougherty
cfa83e552d Merge remote-tracking branch 'origin/develop' into log-score-attempt 2022-05-04 13:05:40 -04:00
Quinn Dougherty
c95c56cfb8 Added logScaleWithThreshold(eps) and completed renaming to
`klDivergence`

Value: [1e-5 to 1e-3]
2022-05-04 13:02:58 -04:00
Ozzie Gooen
268f138dcf
Merge pull request #478 from quantified-uncertainty/reducer-dev
Reducer dev: map, reduce, reduceReverse, keep
2022-05-04 12:27:03 -04:00
Quinn Dougherty
236be470d5 Merge remote-tracking branch 'origin/develop' into log-score-attempt 2022-05-04 12:22:33 -04:00
Quinn Dougherty
3fcc82442d Completed renaming to KLDivergence
Value: [1e-8 to 1e-4]
2022-05-04 12:21:30 -04:00
Ozzie Gooen
7585bd3599
Merge pull request #479 from quantified-uncertainty/gamma-distribution
Add Gamma distribution
2022-05-04 12:01:28 -04:00
Quinn Dougherty
683439c7e5 Changed Ok(0) to Error(NegativeInfinityError).
Value: [1e-7 to 1e-5]
2022-05-04 11:59:46 -04:00
Quinn Dougherty
32f141abdc Renamed LogScoring to KLDivergence
Value: [1e-7 to 1e-4]
2022-05-04 11:54:23 -04:00
Sam Nolan
930c2d2b67 Add Gamma distribution 2022-05-04 15:53:41 +00:00
Quinn Dougherty
627616558a Made multiplicative factor in Scoring file rather than with bind
calls

Value: [1e-5 to 7.5e-4]
2022-05-04 11:48:20 -04:00
Quinn Dougherty
f5f5be2cfb ?? build broke, had to add a ModuleName. prefix to a constructor
Value: [1e-7 to 1e-5]
2022-05-04 11:43:44 -04:00
Quinn Dougherty
0baeedfb46 pointwiseSubtract test; logscale test
Value: [1e-5 to 5e-4]
2022-05-04 11:42:51 -04:00
Umur Ozkul
ea465c6047 Merge branch 'develop' into Umur-reducer-dev 2022-05-04 17:35:03 +02:00
Umur Ozkul
5de6aa8e0d map reduce reduceReverse reverse keep 2022-05-04 17:32:25 +02:00
dependabot[bot]
e561a47d51
⬆️ Bump @types/jest from 27.4.1 to 27.5.0
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 27.4.1 to 27.5.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

---
updated-dependencies:
- dependency-name: "@types/jest"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 14:41:05 +00:00
Umur Ozkul
ae48bd6420 pass reducer to dispatch
to define functions that has lambda arguments, dispatching requires a
reducer
2022-05-04 15:33:51 +02:00
Umur Ozkul
33ee0b27d5 remove inspect performance completely
Redesign required on the function interface
2022-05-04 15:14:34 +02:00
Quinn Dougherty
d5c9705811 Corrected log score
Value: [5e-5 to 2e-2]
2022-05-03 14:00:34 -04:00
Ozzie Gooen
94a1155264 Formatted rescript 2022-05-03 11:30:00 -04:00
Ozzie Gooen
c2155ef746 Merge branch 'develop' into documentation-refactors-april
* develop: (72 commits)
  cases to handle with new parser. lambdas in arrays and records
  Note duplicate parameters
  Note infinite recursion
  Note infinite recursion
  Add array string and function viewers
  Recurse showTypes
  Pass showTypes and showControls in playground
  do not export private modules from Reducer module
  Allows hiding controls
  sam's monkeying
  fixed function f not bound
  Refactor and rename lambda in partial
  Make error message more descriptive
  Refactor and shrink effect code
  Make a tooltip to restrict users from log scales
  Add Patrial storybook and update partial bindings async
  Lint js
  Format and fix CI bugs
  Hotfix playground chart
  Real log scales
  ...
2022-05-03 11:07:12 -04:00
Ozzie Gooen
b28df258e1 Ran formatter 2022-05-03 11:06:53 -04:00
Quinn Dougherty
cec4bbd334 fixed build
Value: [1e-6 to 1e-4]
2022-05-03 10:20:01 -04:00
Quinn Dougherty
6c815a62ff Merge remote-tracking branch 'origin/develop' into log-score-attempt 2022-05-03 10:17:17 -04:00
Quinn Dougherty
5d6de7b487 Response to CR
Value: [1e-4 to 4e-3]
2022-05-03 10:15:48 -04:00
Umur Ozkul
88428c74af cases to handle with new parser. lambdas in arrays and records 2022-05-03 00:44:38 +02:00
Quinn Dougherty
20adc4e25a describe and test strings. 2022-05-02 18:40:34 -04:00
Umur Ozkul
c5ae846df4 Note duplicate parameters 2022-05-03 00:30:41 +02:00
Quinn Dougherty
96ed0b44bb skip the bad test
Value: [1e-6 to 5e-4]
2022-05-02 18:29:47 -04:00
Umur Ozkul
78f46daed8 Note infinite recursion 2022-05-03 00:18:23 +02:00
Umur Ozkul
d26eaa2523 Note infinite recursion 2022-05-03 00:16:29 +02:00
Quinn Dougherty
ca95c7cef8 base 2 log => natural log (on the advice of Nuno)
Value: [1e-4 to 2e-1]
2022-05-02 17:46:43 -04:00
Umur Ozkul
11d4a3bc8b do not export private modules from Reducer module 2022-05-02 23:42:11 +02:00
Umur Ozkul
e92fc792a2 Merge branch 'develop' into Umur-reducer-dev 2022-05-02 23:21:26 +02:00
Umur Ozkul
490e4908e1 sam's monkeying 2022-05-02 23:18:36 +02:00
Quinn Dougherty
a986aac0a2 Merge remote-tracking branch 'origin/develop' into log-score-attempt 2022-05-02 17:16:09 -04:00
Quinn Dougherty
2d84805f88 Added infinity error; fixed infinities in logs
Value: [1e-3 to 3e-2]
2022-05-02 17:15:23 -04:00
Umur Ozkul
6a3b35eb4a fixed function f not bound 2022-05-02 23:12:57 +02:00
Sam Nolan
cc70047904 Lint js 2022-05-02 19:04:16 +00:00
Sam Nolan
f4085e93ad Real log scales 2022-05-02 18:29:59 +00:00
Quinn Dougherty
db3acbf96c Added extra multiplicative factor in logScore integrand
Value: [8e-2 to 7e-1]

migrated intregrand from `log(predicted / answer)` to `answer *
log(predicted / answer)`
2022-05-02 13:40:34 -04:00
Umur Ozkul
5a0b436932 No 666 2022-05-02 18:00:47 +02:00
Quinn Dougherty
d595285078 make lint happy
Value: [1e-9 to 1e-5]
2022-05-02 11:55:42 -04:00
Quinn Dougherty
e2762a0f62 Make typechecker happy
Value: [1e-7 to 1e-3]
2022-05-02 11:55:13 -04:00
Quinn Dougherty
58c885f963 Merge remote-tracking branch 'origin/develop' into log-score-attempt 2022-05-02 11:34:29 -04:00
Sam Nolan
0890607493 Merge branch 'reducer-dev' of github.com:quantified-uncertainty/squiggle into reducer-dev 2022-05-02 14:53:32 +00:00
Sam Nolan
946b38fa27 Fix Typescript build errors 2022-05-02 14:53:16 +00:00
dependabot[bot]
c8e50472ff
⬆️ Bump ts-loader from 9.2.9 to 9.3.0
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 9.2.9 to 9.3.0.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v9.2.9...v9.3.0)

---
updated-dependencies:
- dependency-name: ts-loader
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-02 14:40:06 +00:00
Umur Ozkul
f5d3da4c73 tests 2022-05-02 15:55:02 +02:00
Umur Ozkul
9e41f0399f RENotAFunction 2022-05-02 15:55:02 +02:00
Umur Ozkul
ba104e4dfe Catching unreduced values. This is not a lazy language 2022-05-02 15:55:02 +02:00
Umur Ozkul
c68138e5f6 arity error 2022-05-02 14:19:04 +02:00
Umur Ozkul
806ff93983 Merge branch 'Umur-reducer-dev' into reducer-dev 2022-05-02 12:35:58 +02:00
Umur Ozkul
711b230ecb Merge branch 'develop' into Umur-reducer-dev 2022-05-02 12:34:23 +02:00
Umur Ozkul
1e673e54c3 function tricks test defined (Sam's trials) 2022-05-02 12:27:07 +02:00
Umur Ozkul
c0fad8c668 define lambdaValue record as payload 2022-05-02 12:27:07 +02:00
Umur Ozkul
087596ec43 function trics 2022-05-02 11:44:09 +02:00
Umur Ozkul
6796db82b4 note weird distribution test 2022-05-02 11:44:09 +02:00
Umur Ozkul
e262f76d98 spelling 2022-05-02 11:20:08 +02:00
Umur Ozkul
76b3adddc4 rename to exampleStatementY 2022-05-02 11:12:12 +02:00
Ozzie Gooen
f41f6617df Merge branch 'develop' into documentation-refactors-april
* develop:
  Clean up the props, removing unused and making some optional
  lint
  hotfix: brackets in `components/README.md`
  17 increment
  hotfix: deleted `browser` field of `package.json`s
  Mixture last argument can be float
2022-05-01 15:04:04 -04:00
Ozzie Gooen
18af09ab04 Added delta function to produce delta distributions 2022-05-01 09:00:56 -04:00
Ozzie Gooen
ad16c08e9c
Merge pull request #444 from quantified-uncertainty/mixture-last-arg-fix
Mixture last argument can be float
2022-04-30 14:52:58 -04:00
Quinn Dougherty
f8f6a1ecc6 hotfix: deleted browser field of package.jsons
Value: [1e-9 to 1e-5]
2022-04-30 13:57:41 -04:00
Ozzie Gooen
fd957ef401 Mixture last argument can be float 2022-04-30 13:43:46 -04:00
Quinn
dabe76fed4
Merge pull request #443 from quantified-uncertainty/publish-script
`lang v0.2.8` and `components v0.2.16`
2022-04-30 13:03:47 -04:00
Quinn Dougherty
a3057789b0 ^-version everything
Value: [1e-9 to 1e-6]
2022-04-30 12:52:13 -04:00
Quinn Dougherty
93ef7c76a0 v0.2.16: jsImports prop and incremented minimal squiggle-lang
Value: [1e-5 to 1e-3]
2022-04-30 12:04:03 -04:00
Ozzie Gooen
e8b8b6cd80
Merge pull request #425 from quantified-uncertainty/scalePower
Scale power
2022-04-30 11:55:28 -04:00
Quinn Dougherty
9fe7034c51 v0.2.8: fromSamples and jsImports 2022-04-30 11:33:03 -04:00
Quinn Dougherty
ae7e5744dc Merge remote-tracking branch 'origin/develop' into fromsamples 2022-04-30 09:45:25 -04:00
Ozzie Gooen
3249f69155 Small cleanup to fromSamples 2022-04-29 21:41:09 -04:00
Sam Nolan
83e3759342 Merge branch 'develop' into reducer-dev 2022-04-29 22:51:00 +00:00
Quinn Dougherty
ba0baf31c6 Fixed a (now skipped) test
[1e-5 to 1e-4]
2022-04-29 18:45:12 -04:00
Quinn Dougherty
8217801de3 magic numbers in bandwidth; fromSamples implementation
Value: [1e-3 to 4e-2]
2022-04-29 18:38:55 -04:00
Sam Nolan
b710289096 Rename parameters to imports 2022-04-29 20:29:42 +00:00
Sam Nolan
74df093a42 Cleanup TS code (and fix rescript build warning) 2022-04-29 20:10:39 +00:00
Quinn Dougherty
8b30eb9f05 Added to convertRaw* stuff
Value: [1e-4 to 1e-3]
2022-04-29 15:25:29 -04:00
Sam Nolan
237cdf12f9 Remove accidental log 2022-04-29 19:13:30 +00:00
Sam Nolan
39be07cac0 Add parameters to components interface 2022-04-29 19:02:43 +00:00
Quinn Dougherty
f05d089524 Fixed most tests
Value: [1e-5 to 1e-3]
2022-04-29 15:02:24 -04:00
Sam Nolan
d4f929367d JS parameters in squiggle lang 2022-04-29 18:46:44 +00:00
Quinn Dougherty
0e9996256e Lint for Umur
Value: [1e-8 to 1e-6]
2022-04-29 14:42:34 -04:00
Quinn Dougherty
2c452163b6 I believe I have functionality in place for new run command, but I
could be wrong. Pushing so Sam can review

Value: [1e-5 to 9e-3]
2022-04-29 14:41:30 -04:00
Umur Ozkul
bbe8eced29 format 2022-04-29 19:31:34 +02:00
Umur Ozkul
992dd92d9b merge develop 2022-04-29 19:10:40 +02:00
Umur Ozkul
3bbc5e7149 Add evaluate partial for back compatibility 2022-04-29 19:03:58 +02:00
Umur Ozkul
351381339c bug fixed
logs removed
2022-04-29 18:19:52 +02:00
Umur Ozkul
8e318a8aa9 refactor reducer
removed some extra array references

rename Builder to ExpressionBuilder

Expression Builder

Trash Warning

remove parsePartial/Outer, add context to lambda

format

module Bindings

simplify types

module Macro

reduceValueList

do macro call

result map

bindings stop replacing on macro calls

Macro Test

doBindStatement

bind a statement

bindings tested. TODO bind shadowing in lambda

block tests defined

block tests defined

blocks tested

macro lambda test defined
2022-04-29 16:40:32 +02:00
Sam Nolan
58a357cce5 Add basic partial test 2022-04-29 14:10:41 +00:00
Sam Nolan
8f879b7168 Merge branch 'develop' into squiggle-editor-bindings 2022-04-29 13:51:31 +00:00
Sam Nolan
454ac0c252 Add bindings to Squiggle Editor 2022-04-29 13:50:57 +00:00
Ozzie Gooen
900aeeae29 Expose integralSum to Squiggle 2022-04-28 21:31:15 -04:00
Ozzie Gooen
282fa7726b Added scalePower and scaleLog 2022-04-28 21:14:03 -04:00
Ozzie Gooen
d52447183b
Merge pull request #422 from quantified-uncertainty/no-more-antd
No `antd` (paired with Sam)
2022-04-28 21:09:47 -04:00
Ozzie Gooen
ced3af5813 First attempt at LogScore 2022-04-28 20:24:13 -04:00
Quinn Dougherty
b15ba6563c Incremental README.md improvements
Value: [1e-7 to 1e-6]
2022-04-28 19:15:15 -04:00
Quinn
5f78399760
Merge pull request #416 from quantified-uncertainty/shape-validators
XYShape validator
2022-04-28 18:51:31 -04:00
Sam Nolan
8c59ad0ff1
Merge pull request #421 from quantified-uncertainty/packaging
`squiggle-lang v0.2.6` and `squiggle-components v0.2.13`: packaging fixed
2022-04-28 17:41:19 -04:00
Quinn Dougherty
c4ee0959ec dist/js/index.d.ts => dist/src/js/index.d.ts
Value: [1e-4 to 5e-3]
2022-04-28 17:28:37 -04:00
Quinn Dougherty
6e9315170f Spelling license correctly
Value: [1e-7 to 1e-5]
2022-04-28 17:25:47 -04:00
Sam Nolan
b72e7b42c4
Merge pull request #420 from quantified-uncertainty/dictionary-view
Add Dictionary Viewer and Recursive Array viewer
2022-04-28 16:58:34 -04:00
Ozzie Gooen
f7afbf9c39 Merged with develop 2022-04-28 16:51:02 -04:00
Ozzie Gooen
94d4a38540 Refactored errors for XYShape 2022-04-28 16:49:51 -04:00
Sam Nolan
b9c1f8d727 Move around declarations to be a bit more readable 2022-04-28 20:26:40 +00:00
Quinn Dougherty
de8eb76f4e v0.2.13: packaging works
Value: [2e-1 to 8e-1]
2022-04-28 16:19:40 -04:00
Sam Nolan
e499c1a887 Add tests for deeply nested and records 2022-04-28 20:16:31 +00:00
Quinn Dougherty
44215f540f v0.2.6: packaging fixed
Value: [1e-1 to 8e-1]
2022-04-28 15:20:58 -04:00
Ozzie Gooen
95a4bac49b Added NaN to test to make sure its caught 2022-04-28 15:01:57 -04:00
Sam Nolan
00f862725c Add Dictionary Viewer and Recursive Array viewer 2022-04-28 18:59:15 +00:00
Ozzie Gooen
5dd0292b52 Added tests for XYShape validator 2022-04-28 14:52:44 -04:00
Quinn
658c458c62
Merge pull request #418 from quantified-uncertainty/irrationale
Removed rationale (#410)
2022-04-28 13:42:01 -04:00
Quinn Dougherty
4ff14db6f3 response to CR
Value: [1e-3 to 4e-3]
2022-04-28 13:34:57 -04:00
Quinn Dougherty
5b1ee7f0a6 Removed rationale (#410)
Value: [2e-1 to 6.5e-1]
2022-04-28 13:19:15 -04:00
Ozzie Gooen
1cca9bde38 Merged with develop 2022-04-28 12:49:33 -04:00
Ozzie Gooen
03cd887084 Adding better error messages to XYShape validator 2022-04-28 12:47:04 -04:00
Ozzie Gooen
64c720209d
Merge pull request #415 from quantified-uncertainty/fix-unused-warnings
Add functions to implementation file to fix warnings
2022-04-28 12:00:02 -04:00
Sam Nolan
c9301085b9 Add functions to implementation file to fix warnings 2022-04-28 15:50:12 +00:00
Ozzie Gooen
e1551cb1d7
Merge pull request #409 from quantified-uncertainty/splidcontinuousDiscrete-refactor
Refactor of splitContinuousAndDiscrete to allow for customization
2022-04-28 11:41:06 -04:00
Ozzie Gooen
d1ffac492c Draft of Validates for XYShape 2022-04-28 11:39:29 -04:00
dependabot[bot]
a8cc554354
⬆️ Bump chalk from 4.1.2 to 5.0.1
Bumps [chalk](https://github.com/chalk/chalk) from 4.1.2 to 5.0.1.
- [Release notes](https://github.com/chalk/chalk/releases)
- [Commits](https://github.com/chalk/chalk/compare/v4.1.2...v5.0.1)

---
updated-dependencies:
- dependency-name: chalk
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-28 14:36:16 +00:00
Ozzie Gooen
dde28e54f0 Restructuring of E Sorted 2022-04-28 10:17:29 -04:00
Ozzie Gooen
934ce78399 Algebraic Strategy should use MC when inputs include sample set dists 2022-04-28 09:08:53 -04:00
Ozzie Gooen
b0bfe0f748 Fixed tests 2022-04-28 08:14:07 -04:00
Ozzie Gooen
ab4dcc233c Minor revisions from CR 2022-04-28 08:09:31 -04:00
Ozzie Gooen
2eec389b55 Added docstrings and cleanup 2022-04-28 07:56:23 -04:00
Ozzie Gooen
335d0b5d04 Cleaned tests 2022-04-28 07:36:53 -04:00
Ozzie Gooen
5025f2d55f Refactor of splitContinuousAndDiscrete to allow for more customization 2022-04-27 18:34:37 -04:00
Umur Ozkul
7b052ee3c3 format 2022-04-27 22:24:06 +02:00