tfjs icon indicating copy to clipboard operation
tfjs copied to clipboard

Computing the R2 Score (coeficient of determination)

Open Flipper-afk opened this issue 2 years ago • 1 comments

System information

  • TensorFlow.js version (you are using): Latest, 4.17.0
  • Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state. Computing the R2 Score (coeficient of determination) Currently there is no R2 Score metrics in TFJS compared to TF.

Will this change the current api? How? Yes. Add's a new metrics in TFJS (tf.metrics.r2Score) https://js.tensorflow.org/api/latest/#Metrics

Who will benefit with this feature? Regression Tasks (e.g. Timeseries Forecasting) during training and evaluation. More convenience in developing (since it's not an own/customer function anymore).

Any Other info. https://www.tensorflow.org/api_docs/python/tf/keras/metrics/R2Score

Many thanks and looking forward.

Flipper-afk avatar Feb 02 '24 15:02 Flipper-afk

Hi, @Flipper-afk

Thank you for suggesting the addition of Computing the R2 Score (coeficient of determination) API feature to TensorFlow.js! We appreciate your feedback and interest in expanding the library's capabilities.

While we recognize the potential benefits of this feature, it's important to note that it's already available within the core TensorFlow codebase. You can access it using Python or other supported languages within that environment.

We understand that having this functionality directly in TensorFlow.js would be convenient for browser-based or JavaScript-focused projects. However, implementing it in TensorFlow.js involves technical considerations and alignment with our current development priorities.

If someone or you're interested in seeing this feature implemented directly in TensorFlow.js, we welcome contributions from the community please refer How to Contribute and How to Contribute a New op to TF.js Repository

Thank you for your cooperation and patience.

gaikwadrahul8 avatar Feb 02 '24 16:02 gaikwadrahul8