Giter Club home page Giter Club logo

Comments (6)

lukaseder avatar lukaseder commented on July 21, 2024

Thanks, can confirm. Will look into this soon

from jool.

lukaseder avatar lukaseder commented on July 21, 2024

The test is correct. The expected result is 1.0:

select regr_r2(x, y)
from (values (1, 1), (1, 2)) t (x, y)

Produces:

|regr_r2|
|-------|
|1      |

from jool.

lukaseder avatar lukaseder commented on July 21, 2024

jOOQ/jOOQ#11547 defines REGR_R2 as:

REGR_R2(x, y) = CASE 
  WHEN VAR_POP(NVL2(x, y, NULL)) = 0 THEN NULL 
  WHEN VAR_POP(NVL2(y, x, NULL)) = 0 THEN 1 
  ELSE CORR(x, y)^2 
END

from jool.

lukaseder avatar lukaseder commented on July 21, 2024

The formula is implemented correctly, but the internal mapAll(Tuple3<Optional<T1>, Optional<T2>, Optional<T3>>) isn't. It's requires all optionals to be non-empty in order to map anything, when in fact this isn't what the CASE expression suggests.

from jool.

lukaseder avatar lukaseder commented on July 21, 2024

Well, mapAll() is implemented correctly, but using it is wrong.

from jool.

lukaseder avatar lukaseder commented on July 21, 2024

The reason why this hasn't been detected in our CI is because we recently migrated CI and jOOλ wasn't part of the new installation...

from jool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.