Comments (3)
I wish i knew. It's very much open problem and it seems not much research about it. I didn't look much though. I guess best introductory reading about floating point and its problems is "What every computer scientist should know about floating-point"
Problem with approximate equality is it's extremely context dependent and exact meaning of "approximately" depends on problem at hand. Relative equality |a - b| / max |a| |b| < ε
forks fine save for problem of choosing ε. Absolute difference |a-b|<ε
breaks down when value vary over many orders of magnitude. Once you go to more complex objects such as vectors/matrices there're much more ways to compare them. Thus type class with method approximately equal is impossible. Best we can hope is to provide tools and combinators for user
from dh-core.
Would it be reasonable to take the pytest approach and use both relative and absolute tests?
A set of utility functions could be provided along these lines, and it seems to me that providing type classes that are sufficiently constrained makes sense. For instance, providing instances only for field-level types and using tools for more complex objects. But I'm quite open to being wrong about that.
from dh-core.
I'm interested in this, but I wouldn't know where to start looking for theory about approximate comparisions. Can you give me some pointers?
Edit: also, type classes for approximate comparision of other data types- particularly vectors and matrices- would be incredibly useful.
from dh-core.
Related Issues (20)
- datasets: add unit tests HOT 7
- datasets : split off datasets-core
- analyze : evaluate `streaming` for RFrame HOT 9
- analyze: generate and check random test data HOT 17
- datasets : add ARFF format HOT 10
- datasets: remove data-default-class HOT 1
- datasets: Add fashion-mnist
- Cross validation layer HOT 1
- Bump Stackage to latest Nightly
- datasets: fix benchmark dataset folder HOT 1
- Add test coverage HOT 1
- Cannot build project on macOS 10.14.3 HOT 4
- dense-linear-algebra : Add chronos-bench benchmarks HOT 4
- dense-linear-algebra : Weird memory and runtime behavior from `generateSym` HOT 2
- dense-linear-algebra: Getting stream fusion to work across `Matrix`'s HOT 5
- Add QMNIST
- dense-linear-algebra: Add support for SIMD instructions
- BostonHousing data set URL needs to be updated. HOT 1
- Cut new release
- Move CI from Travis to Github Actions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dh-core.