-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal to add support to allow non-generalizing models to contribute to a machine's report #806
Merged
Conversation
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
cc @pazzo83 |
I've now tested this using MLJTestIntegration.jl, which tests integration with wider MLJ ecosystem, and all good. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #806 +/- ##
==========================================
+ Coverage 85.61% 85.70% +0.08%
==========================================
Files 36 36
Lines 3477 3497 +20
==========================================
+ Hits 2977 2997 +20
Misses 500 500 ☔ View full report in Codecov by Sentry. |
This was referenced Jul 14, 2022
Merged
3 tasks
This was referenced Nov 3, 2022
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.
In response to design discussions at JuliaAI/MLJ.jl#950 and JuliaAI/MLJ.jl#852.
Requires:
reporting_operations
to list of model traits MLJModelInterface.jl#158Related: JuliaAI/StatisticalTraits.jl#25
To do:
Context. Some clustering models (eg, DBSCAN) and some imputing models do not generalize to new data. That is, there is no training data - only a transformation determined completely by input data. From the point-of-view of model composition, such models fit most naturally fit into the current
Static
model typing, which means thatfit
is a no-op; all the heavy lifting occurs in thetransform
method. However, at present, only thefit
method can contribute areport
, which at the level of machines is accessible viareport(mach)
. So extra byproducts of the transformation computation (eg, point types in DBSCAN) cannot be easily exposed to the user.It is proposed that we add a new model trait
reporting_operations
that lists those operations (such as:transform
) which are understood to return two pieces of information, when called on a model instance: the usualoutput
, and somereport
data (named tuple) . In those cases, calling the operation on a machine is only to return theoutput
, but thereport
gets merged into the machine's report.While the main use-case is
Static
models, such enhancements could be applied to any model, and such models can be used in composite models (eg, pipelines) with their reports accessible as usual.The proposal in action
In implementation
User workflow
If you don't care to see the report, there's the one-liner,