-
Notifications
You must be signed in to change notification settings - Fork 1.9k
WIP: Adding WhatTheFeature Scorer #1671
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
// <copyright company="Microsoft Corporation"> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// </copyright> | ||
//------------------------------------------------------------------------------ |
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.
please use other header. #Resolved
using Microsoft.ML.Runtime.Internal.Internallearn; | ||
using Microsoft.ML.Runtime.Internal.Utilities; | ||
using Microsoft.ML.Runtime.Model; | ||
using Float = System.Single; |
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.
can you remove this line, and use float
in code? #Resolved
[Argument(ArgumentType.AtMostOnce, HelpText = "Whether or not output of Features contribution in string key-value format", ShortName = "str", SortOrder = 4)] | ||
public bool Stringify = false; | ||
|
||
// REVIEW olgali(petelu): the scorer currently ignores the 'suffix' argument from the base class. It should respect it. |
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.
olgali(petelu) [](start = 22, length = 14)
strip aliases #Resolved
/// The What The Feature scorer is superset of a generic scorer. | ||
/// It outputs score columns from Generic Scorer plus for given features provides vector of corresponding feature contributions. | ||
/// </summary> | ||
public sealed class WhatTheFeatureScorerTransform |
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.
WhatTheFeatureScorerTransform [](start = 24, length = 29)
we need samples and documentation.
// Apparently, loader signature is limited in length to 24 characters. | ||
public const string MapperLoaderSignature = "WTFBindable"; | ||
public const string LoaderSignature = "WTFScorer"; | ||
public const int MaxTopBottom = 1000; |
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.
make them internal or private. #Resolved
/// The What The Feature scorer is superset of a generic scorer. | ||
/// It outputs score columns from Generic Scorer plus for given features provides vector of corresponding feature contributions. | ||
/// </summary> | ||
public sealed class WhatTheFeatureScorerTransform |
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.
WhatTheFeatureScorerTransform [](start = 24, length = 29)
This may have been considered funny at the time when this was an internal tool, but I feel we should come up with a different name for this externally.
|
||
var featureGetter = input.GetGetter<TSrc>(colSrc); | ||
|
||
// REVIEW olgali: WTF Scorer can do call to Sparicification\Norm routine. |
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.
WTF [](start = 34, length = 3)
Yeah, no. :P This is just asking for trouble. :) #Resolved
fixes #1644