Conversation
5481c0c to
9381871
Compare
|
Like the mcc is for classification so I can overwrite the check_shape method to allow y_pred and y_true to be of 3 dimention and just apply argmax on compute_fn but I am not sure as EpochMetric class say y_pred and y_true should be either 1d or 2d. |
I'm not totally sure to understand your point here, if you can detail a bit more, it would help |
|
I don't know why those tests were failing I used make html command and it didn't gave me no error that time. |
No worries I got it I will update the code. |
e8b1f81 to
8dc7360
Compare
vfdev-5
left a comment
There was a problem hiding this comment.
Thanks for working on this PR!
I left more comments to improve it. Please check
|
done |
499c084 to
49c4f4a
Compare
|
sorry, I don't know why why the pre-commit hook wasn't running properly on my system with docs. I have fixed it and squashed all the commits. Sorry for wasting your time everthing should pass now |
|
doctest failure is real: |
…ests fix: handle dimensionality inconsistencies in matthews_corrcoef_compute_fn feat: add Matthews correlation coefficient to the complete list of metrics docs: update documentation for Matthews correlation coefficient metric to clarify input shapes and classification support fix: update example input shapes in MatthewsCorrCoef documentation
0b95c0b to
f0b6945
Compare
|
There was a error in tensor shape in example I fixed it. |
vfdev-5
left a comment
There was a problem hiding this comment.
LGTM, thanks @aaishwarymishra !
This pull request introduces a new metric, Matthews correlation coefficient (MCC), to the Ignite metrics package, enhancing the library's support for evaluating classification models. The implementation includes the metric class, integration with the metrics API, and a comprehensive test suite. Additionally, there is a minor type annotation update in the early stopping handler.
New Metric Addition and Integration:
MatthewsCorrCoefmetric inignite/metrics/matthews_corrcoef.py, which computes the Matthews correlation coefficient for binary and multiclass classification using scikit-learn under the hood.MatthewsCorrCoefin the metrics package by importing it inignite/metrics/__init__.pyand adding it to the__all__list, making it available for users. [1] [2]Testing Improvements:
tests/ignite/metrics/test_matthews_corrcoef.pyto verify correct behavior, input validation, scikit-learn dependency handling, and integration with the Ignite engine.Type Annotation Update:
self.best_scorein the early stopping handler for consistency with modern Python syntax, changing fromOptional[float]tofloat | None.Optionalinignite/handlers/early_stopping.pyas a result of the type annotation update.Fixes #{issue number}Fixes #3536