Closed tcaivano closed 1 year ago
I can confirm that my schema appears to be incomplete:
And I'm still getting this issue when I explicitly redefine the pipeline:
var pipeline = mlContext.Transforms.CopyColumns(outputColumnName: "Label", inputColumnName: "IsRedTeam");
pipeline.Append(mlContext.Transforms.Categorical.OneHotEncoding("SourceUserEncoded", "SourceUser"))
.Append(mlContext.Transforms.Categorical.OneHotEncoding("DestinationUserEncoded", "DestinationUser"))
.Append(mlContext.Transforms.Categorical.OneHotEncoding("SourceComputerEncoded", "SourceComputer"))
.Append(mlContext.Transforms.Categorical.OneHotEncoding("DestinationComputerEncoded", "DestinationComputer"))
.Append(mlContext.Transforms.Categorical.OneHotEncoding("LogonTypeEncoded", "LogonType"))
.Append(mlContext.Transforms.Categorical.OneHotEncoding("AuthenticationOrientationEncoded", "AuthenticationOrientation"))
.Append(mlContext.Transforms.Categorical.OneHotEncoding("IsSuccessfulEncoded", "IsSuccessful"))
.Append(mlContext.Transforms.Concatenate("Features", "SourceUserEncoded", "DestinationUserEncoded", "SourceComputerEncoded", "DestinationComputerEncoded", "LogonTypeEncoded", "AuthenticationOrientationEncoded", "IsSuccessfulEncoded"));
pipeline.Append(mlContext.BinaryClassification.Trainers.FastTree(labelColumnName: @"IsRedTeam", featureColumnName: @"Features"));
var trainedModel = pipeline.Fit(trainingdata);
var predictions = trainedModel.Transform(testDataView);
var schema = predictions.Schema;
var metrics = mlContext.BinaryClassification.EvaluateNonCalibrated(predictions, "IsRedTeam");
because pipeline.Append will create new Estimator, you need to assign return value against to pipeline
IEstimator<ITransformer>>pipeline = ...
pipeline =pipeline.Append(...);
System Information (please complete the following information):
Describe the bug When calling
mlContext.BinaryClassification.Evaluate()
without the Score parameter, I get an exception:System.ArgumentOutOfRangeException: 'Score column 'Score' not found (Parameter 'schema')'
To Reproduce Steps to reproduce the behavior:
Expected behavior Score is not required