Commit Graph

205 Commits

Author SHA1 Message Date
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
87d6f8d4f6 fix: change integrand check order in KL divergence code 2022-05-06 09:49:42 -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
6211d3cfb0 Some sorta klDivergence conclusion
Value: [1e-6 to 1e-3]
2022-05-04 14:55:49 -04:00
Quinn Dougherty
898547f3a3 klDivergence is now LogarithmWithThreshold 2022-05-04 13:53:32 -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
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
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
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
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
Quinn Dougherty
2d84805f88 Added infinity error; fixed infinities in logs
Value: [1e-3 to 3e-2]
2022-05-02 17:15:23 -04: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
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
946b38fa27 Fix Typescript build errors 2022-05-02 14:53:16 +00:00
Umur Ozkul
806ff93983 Merge branch 'Umur-reducer-dev' into reducer-dev 2022-05-02 12:35:58 +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
Quinn Dougherty
f8f6a1ecc6 hotfix: deleted browser field of package.jsons
Value: [1e-9 to 1e-5]
2022-04-30 13:57:41 -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
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
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
8217801de3 magic numbers in bandwidth; fromSamples implementation
Value: [1e-3 to 4e-2]
2022-04-29 18:38:55 -04: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
ced3af5813 First attempt at LogScore 2022-04-28 20:24:13 -04:00
Ozzie Gooen
94d4a38540 Refactored errors for XYShape 2022-04-28 16:49:51 -04:00
Ozzie Gooen
1cca9bde38 Merged with develop 2022-04-28 12:49:33 -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
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
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
5025f2d55f Refactor of splitContinuousAndDiscrete to allow for more customization 2022-04-27 18:34:37 -04:00
Ozzie Gooen
b2189777d5 Linted 2022-04-27 15:21:27 -04:00
Ozzie Gooen
dfa404f0d0 Merged with develop 2022-04-27 15:06:15 -04:00
Quinn Dougherty
7b87f64658 Issue 325
Value: [1e-3 to 3e-2]
2022-04-27 13:59:33 -04:00
Quinn Dougherty
a22fbb1afd lint
Value: [1e-7 to 1e-6]
2022-04-27 12:57:49 -04:00
Ozzie Gooen
6045fe5e62 Organized AlgebraicCombination functionality into submodules 2022-04-27 12:48:46 -04:00
Quinn Dougherty
b8a2ecc7f0 Merge remote-tracking branch 'origin/develop' into normalize-improvements 2022-04-27 12:38:08 -04:00
Ozzie Gooen
d104494f02 First attempt at refactoring algebraicCombination code 2022-04-27 11:13:10 -04:00
Quinn Dougherty
4f2dda4625 CR comment about toString.
Value: [0.001 to 0.04]
2022-04-27 09:45:48 -04:00
Quinn Dougherty
938a10766c Response to CR
Value: [0.005 to 0.43]
2022-04-26 20:30:38 -04:00
Quinn Dougherty
f0d9404a68 merge develop into issue326 2022-04-26 18:43:12 -04:00
Quinn Dougherty
2553229d28 The real 326
Value: [0.04 to 0.3]
2022-04-26 18:41:57 -04:00
Sam Nolan
1ef766a6c8
Merge pull request #388 from quantified-uncertainty/issue387
Input validation for cauchy
2022-04-26 17:09:28 -04:00
Quinn Dougherty
b9c8a7e2c7 Input validation for cauchy
Value: [0.01 to 0.08]

Sam gets most of the credit
2022-04-26 16:58:36 -04:00
Quinn Dougherty
6f00716722 deleted comment
Value: [0.001 to 0.01]
2022-04-26 16:39:52 -04:00
Quinn Dougherty
5469435dc5 Merge remote-tracking branch 'origin/develop' into issue326 2022-04-26 16:07:56 -04:00
Quinn Dougherty
c53e56e773 The proper issue326 (again)
Value: [1 to 3.6]
2022-04-26 16:06:51 -04:00
Sam Nolan
7302a3ec10 Give isNormalised lower bound 2022-04-26 13:28:08 -04:00
Sam Nolan
350e420884 Add isNormalized to Continuous 2022-04-26 13:25:45 -04:00
Sam Nolan
e47deb8433 Translate pmf to pdf for kde 2022-04-26 12:22:31 -04:00
Quinn Dougherty
e2da81812f Merge remote-tracking branch 'origin/develop' into issue326 2022-04-26 09:56:25 -04:00
Ozzie Gooen
d84420b1ff Merge branch 'develop' into normalize-improvements
* develop:
  hotfix: codecov stuff in `.npmignore`
  Rename flip argument to be more descriptive
  Fix pointwise not commuting for subtraction
  Fix missing paramater in test
  Rename AlgebraicShapeCombination test case
  Fixed package versions in `website/package.json`
  Refactor and rename checkOrdered
  Moved dependencies to devDependencies; updated versions
  rm react-codejar
  Mistake in #371
  Fix build issues in components
  Move dependencies to devDependencies
  Ensure xyShape is ordered by x coordinates when multiplying by negatives
  ⬆️ Bump @types/node from 17.0.25 to 17.0.26
  ⬆️ Bump antd from 4.19.5 to 4.20.0
  Turned error into actual error
  Show correct errors early on when log(distribution) has bad arguments
  Fix subtraction not commuting under pointsets
2022-04-25 21:59:45 -04:00
Ozzie Gooen
2c1aff25d3 Added basic functins to SampleSetDist 2022-04-25 21:46:40 -04:00
Quinn Dougherty
5ef8cf5dde Fixed implementation
Value: [0.4 to 2]
2022-04-25 21:04:11 -04:00
Quinn Dougherty
3367b82eef mode to determine dist mode to operate in
Value: [1.2 to 4.6]
2022-04-25 20:55:16 -04:00
Ozzie Gooen
dc127a884a
Merge pull request #359 from quantified-uncertainty/log-inputs-errors
Show correct errors early on when log(distribution) has bad arguments
2022-04-25 20:50:26 -04:00
Sam Nolan
6bfecf2204 Rename flip argument to be more descriptive 2022-04-25 15:55:25 -04:00
Sam Nolan
62653d55b4 Fix pointwise not commuting for subtraction 2022-04-25 15:46:56 -04:00
Sam Nolan
cf44e6d3c7 Merge branch 'develop' into commutative-error 2022-04-25 15:08:57 -04:00
Sam Nolan
f9c02ba626 Refactor and rename checkOrdered 2022-04-25 14:50:45 -04:00
Sam Nolan
d7151907d3 Ensure xyShape is ordered by x coordinates when multiplying by negatives
Value: [0.00001 to 0.0005]
2022-04-25 11:44:50 -04:00
Sam Nolan
fe493af0b9 Merge branch 'develop' into commutative-error 2022-04-25 11:00:45 -04:00
Ozzie Gooen
260d159500 Make sure pointSetDist toPointSet is normalized 2022-04-23 18:29:58 -04:00
Ozzie Gooen
51e2cf167c Turned error into actual error 2022-04-23 18:07:26 -04:00
Ozzie Gooen
1102ceb4ec Show correct errors early on when log(distribution) has bad arguments 2022-04-23 17:51:41 -04:00
Sam Nolan
8cb138b84a Fix convolution for negative multiplication 2022-04-23 17:48:00 -04:00
Sam Nolan
ee6551a694 Prevent negative standard deviation in symbolic multiplication
Introduced in #242
2022-04-23 16:57:06 -04:00
Sam Nolan
9090c44284 Fix subtraction not commuting under pointsets 2022-04-23 15:58:42 -04:00
Sam Nolan
df4b734a49 Rename invalidOperationError 2022-04-23 14:35:49 -04:00
Sam Nolan
7e8c16b923 Rename Other to OtherError 2022-04-23 14:13:38 -04:00
Sam Nolan
c7e601e15b Remove NaN from pointwise operations 2022-04-23 14:09:06 -04:00
Sam Nolan
98bf4f81c7 Rename assertOk to toExn 2022-04-23 10:30:03 -04:00
Sam Nolan
9fb7148290 Refactor mapY and mapYResult in mixed to remove duplication 2022-04-23 10:17:07 -04:00
Sam Nolan
ad593e659b Move error types to types modules 2022-04-23 09:56:47 -04:00
Sam Nolan
79af95ed78 Remove unneeded prefix to error 2022-04-23 09:47:48 -04:00
Sam Nolan
508f673873 Change NaN operations to results
- Also deleting old GenericDist_Types
- Also removing some string errors
2022-04-22 16:27:17 -04:00
Sam Nolan
2845bd3e39 Use a more conservative convolution policy 2022-04-22 12:43:18 -04:00
Sam Nolan
cfb969f2b3 Remove rescript warning 102 2022-04-21 18:42:15 -04:00
Sam Nolan
e1bf47b6b3 Remove old parser and warning 27 2022-04-21 18:09:06 -04:00