You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added convenience constructor for set of transforms. (#405)
* Added convenience constructor for set of transforms (#371).
* Removed useless validation from Concate transform.
* Added more parameters to some transforms.
* Addressed reviewers' comments.
* XML Comments added to constructors/helper methods.
* Created private static class for managing default values.
* Addressed reviewers' comments.
* Resolved some formatting issues.
[Argument(ArgumentType.AtMostOnce,HelpText="Whether this is the out-of-bag sample, that is, all those rows that are not selected by the transform.",
31
38
ShortName="comp")]
32
-
publicboolComplement;
39
+
publicboolComplement=Defaults.Complement;
33
40
34
41
[Argument(ArgumentType.AtMostOnce,HelpText="The random seed. If unspecified random state will be instead derived from the environment.")]
35
42
publicuint?Seed;
36
43
37
44
[Argument(ArgumentType.AtMostOnce,HelpText="Whether we should attempt to shuffle the source data. By default on, but can be turned off for efficiency.",ShortName="si")]
38
-
publicboolShuffleInput=true;
45
+
publicboolShuffleInput=Defaults.ShuffleInput;
39
46
40
47
[Argument(ArgumentType.LastOccurenceWins,HelpText="When shuffling the output, the number of output rows to keep in that pool. Note that shuffling of output is completely distinct from shuffling of input.",ShortName="pool")]
@@ -76,6 +83,25 @@ public BootstrapSampleTransform(IHostEnvironment env, Arguments args, IDataView
76
83
_poolSize=args.PoolSize;
77
84
}
78
85
86
+
/// <summary>
87
+
/// Convenience constructor for public facing API.
88
+
/// </summary>
89
+
/// <param name="env">Host Environment.</param>
90
+
/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param>
91
+
/// <param name="complement">Whether this is the out-of-bag sample, that is, all those rows that are not selected by the transform.</param>
92
+
/// <param name="seed">The random seed. If unspecified random state will be instead derived from the environment.</param>
93
+
/// <param name="shuffleInput">Whether we should attempt to shuffle the source data. By default on, but can be turned off for efficiency.</param>
94
+
/// <param name="poolSize">When shuffling the output, the number of output rows to keep in that pool. Note that shuffling of output is completely distinct from shuffling of input.</param>
/// A helper method to create <see cref="CategoricalHashTransform"/> for public facing API.
134
+
/// </summary>
135
+
/// <param name="env">Host Environment.</param>
136
+
/// <param name="input">Input <see cref="IDataView"/>. This is the output from previous transform or loader.</param>
137
+
/// <param name="name">Name of the output column.</param>
138
+
/// <param name="source">Name of the column to be transformed. If this is null '<paramref name="name"/>' will be used.</param>
139
+
/// <param name="hashBits">Number of bits to hash into. Must be between 1 and 30, inclusive.</param>
140
+
/// <param name="invertHash">Limit the number of keys used to generate the slot name to this many. 0 means no invert hashing, -1 means no limit.</param>
141
+
/// <param name="outputKind">The type of output expected.</param>
[Argument(ArgumentType.Multiple|ArgumentType.Required,HelpText="Columns to use for feature selection",ShortName="col",SortOrder=1)]
34
39
publicstring[]Column;
35
40
36
41
[Argument(ArgumentType.Required,HelpText="If the count of non-default values for a slot is greater than or equal to this threshold, the slot is preserved",ShortName="c",SortOrder=1)]
0 commit comments