PermutationFeatureImportance <TModel>(
     this BinaryClassificationCatalog catalog,
     IPredictionTransformer <TModel> model,
     IDataView data,
     string label                = DefaultColumnNames.Label,
     string features             = DefaultColumnNames.Features,
     bool useFeatureWeightFilter = false,
     int?topExamples             = null,
     int permutationCount        = 1)
 {
     return(PermutationFeatureImportance <TModel, BinaryClassificationMetrics, BinaryClassificationMetricsStatistics> .GetImportanceMetricsMatrix(
                catalog.GetEnvironment(),
                model,
                data,
                idv => catalog.Evaluate(idv, label),
                BinaryClassifierDelta,
                features,
                permutationCount,
                useFeatureWeightFilter,
                topExamples));
 }
Exemple #2
0
 PermutationFeatureImportance <TModel>(
     this BinaryClassificationCatalog catalog,
     ISingleFeaturePredictionTransformer <TModel> predictionTransformer,
     IDataView data,
     string labelColumnName      = DefaultColumnNames.Label,
     bool useFeatureWeightFilter = false,
     int?numberOfExamplesToUse   = null,
     int permutationCount        = 1) where TModel : class
 {
     return(PermutationFeatureImportance <TModel, BinaryClassificationMetrics, BinaryClassificationMetricsStatistics> .GetImportanceMetricsMatrix(
                catalog.GetEnvironment(),
                predictionTransformer,
                data,
                () => new BinaryClassificationMetricsStatistics(),
                idv => catalog.Evaluate(idv, labelColumnName),
                BinaryClassifierDelta,
                predictionTransformer.FeatureColumnName,
                permutationCount,
                useFeatureWeightFilter,
                numberOfExamplesToUse));
 }