[FLINK-2108] [ml] [WIP] Add score function for Predictors#902
Closed
thvasilo wants to merge 19 commits intoapache:masterfrom
Closed
[FLINK-2108] [ml] [WIP] Add score function for Predictors#902thvasilo wants to merge 19 commits intoapache:masterfrom
thvasilo wants to merge 19 commits intoapache:masterfrom
Conversation
…instead of functions. Not too happy with the extra biolerplate of Score as classes will probably revert, and have objects like RegressionsScores, ClassificationScores that contain the definitions of the relevant scores.
All predictors must now implement a calculateScore function. We are for now assuming that predictors are supervised learning algorithms, once unsupervised learning algorithms are added this will need to be reworked. Also added an evaluate dataset operation to ALS, to allow for scoring of the algorithm. Default performance measure for ALS is RMSE.
This operation is similar to the predict and evaluate operations, allowing type-dependent implementations of scoring functions for predictors.
This allows us to score classifiers and regressors without needing to provide a Scorer object, by using default scores instead.
Contributor
|
Closing since flink-ml is effectively frozen. |
pnowojski
pushed a commit
that referenced
this pull request
Jul 3, 2024
* [FRT-476] Adds main thread callback to AsyncWaitOperator * Fixes and adds tests * Feedback * Feedback * Fix test bug * Remove use of MailboxThreadResultFuture * Feedback
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR build upon the evaluation PR currently under review (#871) and adds to new operations to the Predictor class, one that takes a scorer and a test set and produces a score as an evaluation of the Predictor performance using the provided score, and one that takes only a test set and a default score is used.
This PR includes implementations for custom scores and simple scores for all Predictor implementations, either through the Classifier and Regressor base classes, or specific ones, like the one provided for ALS. The provided score custom score operation currently expects DataSet[LabeledVector] as the type of test set and Double as the type of prediction.
TODO: Docs and code cleanup