Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/Microsoft.ML.Tests/Transformers/NAIndicatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void NAIndicatorMetadataTest()
};

var dataView = ComponentCreation.CreateDataView(Env, data);
var pipe = new CategoricalEstimator(Env, new CategoricalEstimator.ColumnInfo("A", "CatA"));
var pipe = new CategoricalEstimator(Env, new[] { new CategoricalEstimator.ColumnInfo("A", "CatA") });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified to:

var pipe = new CategoricalEstimator(Env, "A", "CatA");

var newpipe = pipe.Append(new NAIndicatorEstimator(Env, new (string input, string output)[] { ("CatA", "NAA") }));
var result = newpipe.Fit(dataView).Transform(dataView);
Assert.True(result.Schema.TryGetColumnIndex("NAA", out var col));
Expand Down