You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Microsoft.ML.Data/Transforms/ExplainabilityCatalog.cs
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,17 @@ public static class ExplainabilityCatalog
18
18
/// <param name="catalog">The model explainability operations catalog.</param>
19
19
/// <param name="modelParameters">Trained model parameters that support Feature Contribution Calculation and which will be used for scoring.</param>
20
20
/// <param name="featureColumn">The name of the feature column that will be used as input.</param>
21
-
/// <param name="top">The number of features with highest positive contributions for each data sample that will be retained in the FeatureContribution column.
22
-
/// Note that if there are fewer features with positive contributions than <paramref name="top"/>, the rest will be returned as zeros.</param>
23
-
/// <param name="bottom">The number of features with least negative contributions for each data sample that will be retained in the FeatureContribution column.
24
-
/// Note that if there are fewer features with negative contributions than <paramref name="bottom"/>, the rest will be returned as zeros.</param>
21
+
/// <param name="numPositiveContributions">The number of positive contributions to report, sorted from highest magnitude to lowest magnitude.
22
+
/// Note that if there are fewer features with positive contributions than <paramref name="numPositiveContributions"/>, the rest will be returned as zeros.</param>
23
+
/// <param name="numNegativeContributions">The number of negative contributions to report, sorted from highest magnitude to lowest magnitude.
24
+
/// Note that if there are fewer features with negative contributions than <paramref name="numNegativeContributions"/>, the rest will be returned as zeros.</param>
25
25
/// <param name="normalize">Whether the feature contributions should be normalized to the [-1, 1] interval.</param>
/// <param name="env">The environment to use.</param>
99
123
/// <param name="modelParameters">Trained model parameters that support Feature Contribution Calculation and which will be used for scoring.</param>
100
124
/// <param name="featureColumn">The name of the feature column that will be used as input.</param>
101
-
/// <param name="top">The number of features with highest positive contributions for each data sample that will be retained in the FeatureContribution column.
102
-
/// Note that if there are fewer features with positive contributions than <paramref name="top"/>, the rest will be returned as zeros.</param>
103
-
/// <param name="bottom">The number of features with least negative contributions for each data sample that will be retained in the FeatureContribution column.
104
-
/// Note that if there are fewer features with negative contributions than <paramref name="bottom"/>, the rest will be returned as zeros.</param>
125
+
/// <param name="numPositiveContributions">The number of positive contributions to report, sorted from highest magnitude to lowest magnitude.
126
+
/// Note that if there are fewer features with positive contributions than <paramref name="numPositiveContributions"/>, the rest will be returned as zeros.</param>
127
+
/// <param name="numNegativeContributions">The number of negative contributions to report, sorted from highest magnitude to lowest magnitude.
128
+
/// Note that if there are fewer features with negative contributions than <paramref name="numNegativeContributions"/>, the rest will be returned as zeros.</param>
105
129
/// <param name="normalize">Whether the feature contributions should be normalized to the [-1, 1] interval.</param>
@@ -258,8 +282,8 @@ public sealed class FeatureContributionCalculatingEstimator : TrivialEstimator<F
258
282
259
283
publicstaticclassDefaults
260
284
{
261
-
publicconstintTop=10;
262
-
publicconstintBottom=10;
285
+
publicconstintNumPositiveContributions=10;
286
+
publicconstintNumNegativeContributions=10;
263
287
publicconstboolNormalize=true;
264
288
}
265
289
@@ -270,18 +294,18 @@ public static class Defaults
270
294
/// <param name="env">The environment to use.</param>
271
295
/// <param name="modelParameters">Trained model parameters that support Feature Contribution Calculation and which will be used for scoring.</param>
272
296
/// <param name="featureColumn">The name of the feature column that will be used as input.</param>
273
-
/// <param name="top">The number of features with highest positive contributions for each data sample that will be retained in the FeatureContribution column.
274
-
/// Note that if there are fewer features with positive contributions than <paramref name="top"/>, the rest will be returned as zeros.</param>
275
-
/// <param name="bottom">The number of features with least negative contributions for each data sample that will be retained in the FeatureContribution column.
276
-
/// Note that if there are fewer features with negative contributions than <paramref name="bottom"/>, the rest will be returned as zeros.</param>
297
+
/// <param name="numPositiveContributions">The number of positive contributions to report, sorted from highest magnitude to lowest magnitude.
298
+
/// Note that if there are fewer features with positive contributions than <paramref name="numPositiveContributions"/>, the rest will be returned as zeros.</param>
299
+
/// <param name="numNegativeContributions">The number of negative contributions to report, sorted from highest magnitude to lowest magnitude.
300
+
/// Note that if there are fewer features with negative contributions than <paramref name="numNegativeContributions"/>, the rest will be returned as zeros.</param>
277
301
/// <param name="normalize">Whether the feature contributions should be normalized to the [-1, 1] interval.</param>
0 commit comments