-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Part 3] Added convenience constructors for set of transforms. #520
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
Changes from 4 commits
d9c4a29
6cd77eb
75a8b6d
d72a4ac
3dd9847
730fe93
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,15 @@ | |
|
|
||
| namespace Microsoft.ML.Runtime.DataPipe | ||
| { | ||
| public class OptionalColumnTransform : RowToRowMapperTransformBase | ||
| /// <summary> | ||
| /// This transform is used to mark some of the columns (e.g. Label) optional during training so that the columns are not required during scoring. | ||
| /// When applied to new data, if optional columns are not present a meta column is created having the same properties (e.g. 'name', 'type' etc.) as used during training. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The phrase meta-column is a bit odd, I'm not sure that's a good description. Maybe dummy column? Mock column? #Closed |
||
| /// The columns are filled with default values. The value is | ||
| /// - scalar for scalar column | ||
| /// - totally sparse vector for vector column. | ||
| /// If value of the column is requested the default value will be returned. | ||
| /// </summary> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This last line seems redundant. #Closed |
||
| public sealed class OptionalColumnTransform : RowToRowMapperTransformBase | ||
| { | ||
| public sealed class Arguments : TransformInputBase | ||
| { | ||
|
|
@@ -232,6 +240,17 @@ private static VersionInfo GetVersionInfo() | |
|
|
||
| private const string RegistrationName = "OptionalColumn"; | ||
|
|
||
| /// <summary> | ||
| /// Convenience constructor for public facing API. | ||
| /// </summary> | ||
| /// <param name="env">Host Environment.</param> | ||
| /// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param> | ||
| /// <param name="columns">Columns to transform.</param> | ||
| public OptionalColumnTransform(IHostEnvironment env, IDataView input, params string[] columns) | ||
| : this(env, new Arguments() { Column = columns }, input) | ||
| { | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Public constructor corresponding to SignatureDataTransform. | ||
| /// </summary> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Empty? #Closed