-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Refactor] Refactor Evaluator (#822)
*Issue #757, if available:* *Description of changes:* This PR includes code refactor of GraphStorm "**Evaluators**". And all codes, examples and documentations are refactored accordingly. The major changes include: 1. Unified `GSgnnInstanceEvaluator` and `GSgnnLPEvaluator` classes with `GSgnnBaseEvaluator` plus interface classes, i.e., `GSgnnPredictionEvalInterface` and `GSgnnLPRankingEvalInterface`. In such way, all sub evaluators share the same properties, and also can have different evaluation methods according to the interfaces they implemented. 2. Replaced `GSgnnAccEvaluator` with `GSgnnClassificationEvaluator`, which is implemented by extending `GSgnnBaseEvaluator` and `GSgnnPredictionEvalInterface`. Its behavior is nearly the same as the `GSgnnAccEvaluator`. 3. Modified `GSgnnRegressionEvaluator` in the new way by extending `GSgnnBaseEvaluator` and `GSgnnPredictionEvalInterface`, and unified its behavior as `GSgnnClassificationEvaluator`. 4. Modified `GSgnnMrrLPEvaluator` and `GSgnnPerEtypeMrrLPEvaluator` in the new way by extending `GSgnnBaseEvaluator` and `GSgnnRankingLPEvalInterface`. The detailed changes are: 1. `GSgnnBaseEvaluator` separates evaluator properties from abstract methods, i.e., `evaluate()` and `compute_score()`, which are defined in the interface classes. 2. `GSgnnPredictionEvalInterface` defines the `evaluate()` and `compute_score()` methods for classification and regression tasks, which ask for both predictions and labels as inputs. 3. `GSgnnRankingEvalInterface` defines the `evaluate()` and `compute_score()` methods for ranking-based LP tasks, which ask for ranking values as inputs. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Ubuntu <[email protected]> Co-authored-by: Ubuntu <[email protected]>
- Loading branch information
1 parent
28e3b0c
commit 51c6a95
Showing
30 changed files
with
665 additions
and
815 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.