Skip to content

Monte Carlo Percent Error #324

Closed
Closed
@june128

Description

@june128

The percent error can be displayed in two different ways:

  • Way 1: Having a positive or negative percent error depending on the estimate we have.
  • Way 2: Always having a positive value by just taking the absolute.

The two ways would be calculated like the following:

  • Way 1: percent error = [experimental value - theoretical value] / theoretical value x 100%
  • Way 2: percent error = (AbsoluteOf([experimental value - theoretical value])) / theoretical value x 100%

We now have the following state for the Monte Carlo implementations of the AAA:

  • Some implementations are using Way 2 of the percent error and just provide an always positive number. The following languages are using way 2: Clojure, D, Go, Haskell, Python, R
  • And some other languages are using Way 1, but making a mistake by doing so, they aer using the following calculation: [theoretical value - experimental value] / theoretical value x 100% instead of [experimental value - theoretical value] / theoretical value x 100% The following languages are using way 1 incorrectly: C, Java, JavaScript, Julia, Rust, Swift

So the question is now: Should we use way 1 or way 2 in the AAA?

I vote for way 1 because it provides some nice additional information, i.e.:
Having a theoretical value of 3 would result in a negative percentage and having a theoretical value of 3.5 would result in a positive percentage. With way 2 it would be a positive percentage in both cases.

Progress Tracker - Way 2

Since we decided for way 2, the following to do list, shows which implementations need to be updated:

Metadata

Metadata

Assignees

No one assigned

    Labels

    DiscussionThis is open for a discussion.ProblemThis is a problem in the archive or an implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions