Apoc.math.regr calculations

Hello Neo4j knowledgable community,

I have a question regarding one of the apoc math functions, namely apoc.math.regr I have been using it to compute the linear regression estimators (slope, intercept) and the goodness-of-fit measure (R-squared). However, I noticed there is a huge difference between what is resultant out of this function and what is computed manually and using other tools adopting the least square approach. Therefore, I would appreciate your advice in figuring out/understanding what is used in the computation using the apoc regr function

I think we just use apache.commons.math there, feel free to have a look at the source

and the tests.

1 Like