Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type class instance for Sample equivalence #127

Open
dlindhol opened this issue Aug 24, 2020 · 0 comments
Open

Add type class instance for Sample equivalence #127

dlindhol opened this issue Aug 24, 2020 · 0 comments

Comments

@dlindhol
Copy link
Member

We want to be able to check Sample equivalence in tests. It seems worthy to provide that concept outside of the testing code, e.g. as a type class instance in the Sample companion object. Not sure if this should be a cats.Eq or a scala.math.Equiv.

We effectively have the latter for Samples via a PartialOrdering[Sample] defined in LatisOrdering. That uses only domain values to determine the ordering of samples.

First we need to carefully define what we mean by Sample equivalence and outline use cases (especially as they relate to sample ordering). We presumably want to use the concept of "scientific equivalence" here which can be forgiving of value types and precision. It may be sufficient to extract doubles from numeric variables or strings from text variables. Not sure what to do about precision. It's one thing to deal with in tests but another if we start using this in other operations.

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

No branches or pull requests

1 participant