machinelearning icon indicating copy to clipboard operation
machinelearning copied to clipboard

Feature Contribution Calculation Top/Bottom arguments are confusing

Open glebuk opened this issue 7 years ago • 2 comments

Issue

The current API for Feature Contribution are confusing. They have the following parameters: FeatureContributionCalculation(... int top = 10, int bottom = 10..); those arg names are confusing. From naming it is unclear if bottom means max negative or min abs() contribution.
Let's rename them params to topPositive and topNegative

glebuk avatar Jan 04 '19 00:01 glebuk

Would it be also confusing if the 'top negative' values were, in fact, positive? :)

Also, topNegative is itself not super clear: Think of a 'very high' negative number.

I personally think top and bottom are fine. But maybe numHighest and numLowest? Frankly, I think that, no matter how we name the parameters, the names alone wouldn't convey their roles clearly enough.

Note that IntelliSense will show the xmldoc comments, so we can put more verbose descriptions there to make them clearer.

Zruty0 avatar Jan 04 '19 04:01 Zruty0

I agree with both sentiments, however, the one clear piece of feedback that we've gotten since porting FCC into ML.NET is that the names top and bottom are confusing. People tend to think that these are the "Most important" and "Least Important", respectively.

I'd prefer to rename them to something that conveys that they are the "largest-magnitude positive contributions" and "largest-magnitude negative contributions".

How about the following: numPositiveContributions: The number of positive contributions to report, sorted from highest magnitude to lowest magnitude. numNegativeContributions: The number of negative contributions to report, sorted from highest magnitude to lowest magnitude.

Related to #1765

rogancarr avatar Jan 04 '19 19:01 rogancarr