Closed
Description
var loader = mlContext.Data.CreateTextLoader(new TextLoader.Options()
{
HasHeader = true,
Columns = new[] {
new TextLoader.Column("NumericFeatures", DataKind.Single, 0, 189),
new TextLoader.Column("CatFeatures", DataKind.String, 189, 229),
new TextLoader.Column("Label", DataKind.Int32, 230)
}
});
var data = loader.Load("train.tsv");
var dic = new Dictionary<int, bool>();
dic.Add(1, true);
dic.Add(-1, false);
var pipeline = mlContext.Transforms.IndicateMissingValues("NumericFeatures").
Append(mlContext.Transforms.Categorical.OneHotEncoding("CatFeatures")).
Append(mlContext.Transforms.Concatenate("Features","NumericFeatures", "CatFeatures")).
Append(mlContext.Transforms.Conversion.MapValue("Label", dic));
System.InvalidOperationException: 'Column 'CatFeatures' has values of Singlewhich is not the same as earlier observed type of Boolean.'
A) would be nice to have space between type and sentence.
B) this exception happened in Concat transform and only indication of that is stack trace.
Metadata
Metadata
Assignees
Labels
No labels