-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix a bug with group Id column in CV macro and add NameColumn argument to CV and TrainTest macros #467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -535,9 +535,9 @@ public float Cost | |||
ch.Assert(groupColFieldType == typeof(string)); | |||
var inputGroup = inputInstance.GetType().GetField(groupColField).GetValue(inputInstance); | |||
if (group != (Optional<string>)inputGroup) | |||
ch.Warning(warning, "group Id", label, inputGroup); | |||
ch.Warning(warning, "group Id", group, inputGroup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group [](start = 52, length = 5)
ugh.
Thank you finding this, and fixing it! #Resolved
public Optional<string> GroupColumn = Optional<string>.Implicit(DefaultColumnNames.GroupId); | ||
|
||
[Argument(ArgumentType.AtMostOnce, HelpText = "Name column name", ShortName = "name", SortOrder = 6)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
sort order is same for weight, kind, name, but 12 for group column. #Closed
public Optional<string> GroupColumn = Optional<string>.Implicit(DefaultColumnNames.GroupId); | ||
|
||
[Argument(ArgumentType.AtMostOnce, HelpText = "Name column name", ShortName = "name", SortOrder = 6)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 [](start = 110, length = 1)
should it be 13? #Closed
return new MultiOutputRegressionMamlEvaluator(env, new MultiOutputRegressionMamlEvaluator.Arguments()); | ||
default: | ||
throw env.ExceptParam(nameof(kind), $"Trainer kind {kind} does not have an evaluator"); | ||
case MacroUtils.TrainerKinds.SignatureBinaryClassifierTrainer: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[](start = 0, length = 12)
My VS put extra indent after "{" so if I format code, i get current formatting.
So next time if I happen to format this file, I'll revert your changes.
It's not a blocker, but maybe we need to discuss at some point default VS setting... #Closed
public Optional<string> GroupColumn = Optional<string>.Implicit(DefaultColumnNames.GroupId); | ||
|
||
[Argument(ArgumentType.AtMostOnce, HelpText = "Name column name", ShortName = "name", SortOrder = 6)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13? #Closed
if (name != (Optional<string>)inputName) | ||
ch.Warning(warning, "name", name, inputName); | ||
else | ||
_inputBuilder.TrySetValue(nameColField, weight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
weight [](start = 60, length = 6)
name! #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…t to CV and TrainTest macros (dotnet#467) * Fix a bug with group Id column in CV macro * add NameColumn argument
This PR fixes bug #456, and also introduces a NameColumn argument to the TrainTest and CV macros, to enable the evaluator to use it in the per-instance results.
Fixes #456
Fixes #466