Skip to content

[ENH] efficient _evaluate_by_index for GeometricMeanAbsoluteError#6461

Closed
KaustubhUp025 wants to merge 25 commits intosktime:mainfrom
KaustubhUp025:Ksktime
Closed

[ENH] efficient _evaluate_by_index for GeometricMeanAbsoluteError#6461
KaustubhUp025 wants to merge 25 commits intosktime:mainfrom
KaustubhUp025:Ksktime

Conversation

@KaustubhUp025
Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Towards #6244

What does this implement/fix? Explain your changes.

Added a new function _compute_psuedo_values for calculating jackknife pseudo-values.

Does your contribution introduce a new dependency? If yes, which one?

No

What should a reviewer concentrate their feedback on?

Did you add any tests for the change?

No

Any other comments?

PR checklist

For all contributions
  • I've added myself to the list of contributors with any new badges I've earned :-)
    How to: add yourself to the all-contributors file in the sktime root directory (not the CONTRIBUTORS.md). Common badges: code - fixing a bug, or adding code logic. doc - writing or improving documentation or docstrings. bug - reporting or diagnosing a bug (get this plus code if you also fixed the bug in the PR).maintenance - CI, test framework, release.
    See here for full badge reference
  • Optionally, for added estimators: I've added myself and possibly to the maintainers tag - do this if you want to become the owner or maintainer of an estimator you added.
    See here for further details on the algorithm maintainer role.
  • 👍 The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI, test framework, [ENH] - adding or improving code, [DOC] - writing or improving documentation or docstrings.
For new estimators
  • I've added the estimator to the API reference - in docs/source/api_reference/taskname.rst, follow the pattern.
  • I've added one or more illustrative usage examples to the docstring, in a pydocstyle compliant Examples section.
  • If the estimator relies on a soft dependency, I've set the python_dependencies tag and ensured
    dependency isolation, see the estimator dependencies guide.

KaustubhUp025 and others added 20 commits March 24, 2024 21:02
…MeanAbsoluteError with documentation as well
…MAE.

This modification ensures that the errors are strictly positive before taking their logarithm, improving the numerical stability of the calculation.
…ient _evaluate_by_index for GMAE.

Additional methods added :- 
_compute_pseudo_values: Computes the jackknife pseudo-values for the Geometric Mean Absolute Error (GMAE) metric, estimating the influence of each observation on the overall metric.

_evaluate: Evaluates the GMAE metric on given inputs, providing the overall metric value. This method is the core logic called from the evaluate method and computes the arithmetic mean over time points by default.
Copy link
Copy Markdown
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

I think there's a bit of code bloat going on, can you perhaps have a look a MeanSquaredError, the square_root=True case? Have a look how the pseudo-values are implemented there.

@fkiraly fkiraly changed the title Implementation for GeometricMeanAbsoluteError with correct code quality #6244 [ENH] efficient _evaluate_by_index for GeometricMeanAbsoluteError May 22, 2024
@fkiraly fkiraly added enhancement Adding new functionality module:metrics&benchmarking metrics and benchmarking modules labels May 22, 2024
@KaustubhUp025
Copy link
Copy Markdown
Contributor Author

I checked it once more for the code bloat, by checking the implementation from the MeanSquaredError class. Could you suggest what else I can modify to make it more efficient.

@fkiraly
Copy link
Copy Markdown
Collaborator

fkiraly commented Jun 16, 2024

@KaustubhUp025, are you still working on this?

@KaustubhUp025
Copy link
Copy Markdown
Contributor Author

KaustubhUp025 commented Jun 16, 2024

Yes I am working on it @fkiraly and it will be solved soon. The code I wrote got a wrong answer on one of my custom test values that I took as a reference from the initial documentation of GeometricMeanAbsoluteError. So, I am working on that error.

@fkiraly
Copy link
Copy Markdown
Collaborator

fkiraly commented Jul 24, 2024

I am confused about your multiple PR, the other PR contains changes to two metrics classes.

I would suggest to use this PR for the GMAE and the GMAE only. Could you take my changes and wrap them up?

@KaustubhUp025
Copy link
Copy Markdown
Contributor Author

So should I close the other PR and work upon this on only @fkiraly

@KaustubhUp025 KaustubhUp025 closed this by deleting the head repository Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adding new functionality module:metrics&benchmarking metrics and benchmarking modules

Projects

Status: Under review

Development

Successfully merging this pull request may close these issues.

2 participants