Skip to content

Commit

Permalink
drop sampling key while crossvalidating
Browse files Browse the repository at this point in the history
  • Loading branch information
torronen committed Aug 8, 2023
1 parent 077a6b8 commit 076fd26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Microsoft.ML.Data/TrainCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ internal CrossValidationResult(ITransformer model, T metrics, IDataView scores,
// spawn off a separate host per fold in that case.
foreach (var split in DataOperationsCatalog.CrossValidationSplit(Environment, data, splitColumn, numFolds))
{
var model = estimator.Fit(split.TrainSet);
var trainSetWithoutSamplingKey = ColumnSelectingTransformer.CreateDrop(Environment, split.TrainSet, samplingKeyColumn);
var testSetWithoutSamplingKey = ColumnSelectingTransformer.CreateDrop(Environment, split.TestSet, samplingKeyColumn);

var model = estimator.Fit(trainSetWithoutSamplingKey);
IDataView scoredTest;

if (IsCastableToTransformerChainOfITransformer(model))
Expand Down

0 comments on commit 076fd26

Please sign in to comment.