Merged
Conversation
eerhardt
reviewed
Sep 20, 2019
eerhardt
reviewed
Sep 20, 2019
eerhardt
reviewed
Sep 20, 2019
eerhardt
reviewed
Sep 20, 2019
eerhardt
reviewed
Sep 20, 2019
eerhardt
reviewed
Sep 20, 2019
yaeldekel
reviewed
Sep 25, 2019
yaeldekel
reviewed
Sep 25, 2019
yaeldekel
reviewed
Sep 25, 2019
ganik
reviewed
Sep 27, 2019
| Contracts.Assert(predictor != null, "No predictor found in model"); | ||
| var transformedData = input.PredictorModel.TransformModel.Apply(env, input.Data); | ||
| IDataView result = PermutationFeatureImportanceUtils.GetMetrics(env, predictor, roleMappedData.Schema, transformedData, input); | ||
| return new PermutationFeatureImportanceOutput { Metrics = result }; |
eerhardt
reviewed
Sep 27, 2019
| var loadedData = mlContext.Data.LoadFromBinary(outputDataPath); | ||
| Assert.NotNull(loadedData.Schema.GetColumnOrNull("FeatureName")); | ||
| Assert.NotNull(loadedData.Schema.GetColumnOrNull("AreaUnderRocCurve")); | ||
| Assert.NotNull(loadedData.Schema.GetColumnOrNull("Accuracy")); |
Member
There was a problem hiding this comment.
Do we want to verify that the numbers that come back here are correct?
Member
Author
There was a problem hiding this comment.
We would verify this by loading the same predictor model and data that goes into the PFI node, and applying the same steps to them that the PFI node does, so I don't see the point of doing this.
yaeldekel
reviewed
Sep 30, 2019
| PermutationFeatureImportanceArguments input) | ||
| { | ||
| var roles = roleMappedData.Schema.GetColumnRoleNames(); | ||
| var featureColumnName = roles.Where(x => x.Key.Value == RoleMappedSchema.ColumnRole.Feature.Value).First().Value; |
There was a problem hiding this comment.
featureColumnName [](start = 16, length = 17)
All these special roles - features, label, group etc. have properties in RoleMappedSchema, but you need to check first that they are not null. (here and in the other Get***Metrics methods as well).
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #4231
Entrypoint is needed to add PFI to NimbusML
microsoft/NimbusML#92