Multiple formulas for r squared eval metric for regression I was came across different formulas for R squared on different articles.


  R Squared = 1 - RSS/TSS
  
  R Squared = ESS/TSS


RSS -Residual sum of squares.
TSS - Total sum of squares.
ESS - Explained sum of squares.

Can any one explain which one should be the correct one.
Both are correct. R squared tells you how many variance of the dependent variable is explained by your model. This can be written in different ways.
It is like to say that the probability of being alive is 1 minus the probability of dying. 

ESS=TSS-RSS

https://en.m.wikipedia.org/wiki/Coefficient_of_determination

[1]: https://i.stack.imgur.com/QlM6O.jpg