Skip to content

Commit

Permalink
Changes from PR comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgsharp committed Sep 24, 2021
1 parent 86b7b95 commit 88e13d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/Microsoft.ML.Data/Prediction/CalibratorCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,11 @@ private protected CalibratorTransformer(IHostEnvironment env, ModelLoadContext c
}
}

public string FeatureColumnName => DefaultColumnNames.Score;
string ISingleFeaturePredictionTransformer<TICalibrator>.FeatureColumnName => DefaultColumnNames.Score;
string ISingleFeaturePredictionTransformer.FeatureColumnName => ((ISingleFeaturePredictionTransformer<TICalibrator>)this).FeatureColumnName;

public DataViewType FeatureColumnType => NumberDataViewType.Single;
DataViewType ISingleFeaturePredictionTransformer<TICalibrator>.FeatureColumnType => NumberDataViewType.Single;
DataViewType ISingleFeaturePredictionTransformer.FeatureColumnType => ((ISingleFeaturePredictionTransformer<TICalibrator>)this).FeatureColumnType;

TICalibrator IPredictionTransformer<TICalibrator>.Model => _calibrator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -669,9 +669,9 @@ private static double[] ComputeSequenceDeltas(IReadOnlyList<double> a, IReadOnly
{
foreach (var transformer in chain.Reverse())
{
if (transformer is ISingleFeaturePredictionTransformer)
if (transformer is ISingleFeaturePredictionTransformer singlePredictionTransformer)
{
lastTransformer = transformer as ISingleFeaturePredictionTransformer;
lastTransformer = singlePredictionTransformer;
break;
}
}
Expand All @@ -692,7 +692,7 @@ private static double[] ComputeSequenceDeltas(IReadOnlyList<double> a, IReadOnly
resultInitializer,
evaluationFunc,
deltaFunc,
lastTransformer.FeatureColumnName,
featureColumnName,
permutationCount,
useFeatureWeightFilter,
numberOfExamplesToUse
Expand Down

0 comments on commit 88e13d0

Please sign in to comment.