13
13
using Microsoft . ML . Model ;
14
14
using Microsoft . ML . Transforms ;
15
15
16
- [ assembly: LoadableClass ( BootstrapSamplingTransformer . Summary , typeof ( BootstrapSamplingTransformer ) , typeof ( BootstrapSamplingTransformer . Arguments ) , typeof ( SignatureDataTransform ) ,
16
+ [ assembly: LoadableClass ( BootstrapSamplingTransformer . Summary , typeof ( BootstrapSamplingTransformer ) , typeof ( BootstrapSamplingTransformer . Options ) , typeof ( SignatureDataTransform ) ,
17
17
BootstrapSamplingTransformer . UserName , "BootstrapSampleTransform" , "BootstrapSample" ) ]
18
18
19
19
[ assembly: LoadableClass ( BootstrapSamplingTransformer . Summary , typeof ( BootstrapSamplingTransformer ) , null , typeof ( SignatureLoadDataTransform ) ,
@@ -36,7 +36,7 @@ internal static class Defaults
36
36
public const int PoolSize = 1000 ;
37
37
}
38
38
39
- public sealed class Arguments : TransformInputBase
39
+ public sealed class Options : TransformInputBase
40
40
{
41
41
[ Argument ( ArgumentType . AtMostOnce , HelpText = "Whether this is the out-of-bag sample, that is, all those rows that are not selected by the transform." ,
42
42
ShortName = "comp" ) ]
@@ -76,16 +76,16 @@ private static VersionInfo GetVersionInfo()
76
76
private readonly bool _shuffleInput ;
77
77
private readonly int _poolSize ;
78
78
79
- public BootstrapSamplingTransformer ( IHostEnvironment env , Arguments args , IDataView input )
79
+ public BootstrapSamplingTransformer ( IHostEnvironment env , Options options , IDataView input )
80
80
: base ( env , RegistrationName , input )
81
81
{
82
- Host . CheckValue ( args , nameof ( args ) ) ;
83
- Host . CheckUserArg ( args . PoolSize >= 0 , nameof ( args . PoolSize ) , "Cannot be negative" ) ;
82
+ Host . CheckValue ( options , nameof ( options ) ) ;
83
+ Host . CheckUserArg ( options . PoolSize >= 0 , nameof ( options . PoolSize ) , "Cannot be negative" ) ;
84
84
85
- _complement = args . Complement ;
86
- _state = new TauswortheHybrid . State ( args . Seed ?? ( uint ) Host . Rand . Next ( ) ) ;
87
- _shuffleInput = args . ShuffleInput ;
88
- _poolSize = args . PoolSize ;
85
+ _complement = options . Complement ;
86
+ _state = new TauswortheHybrid . State ( options . Seed ?? ( uint ) Host . Rand . Next ( ) ) ;
87
+ _shuffleInput = options . ShuffleInput ;
88
+ _poolSize = options . PoolSize ;
89
89
}
90
90
91
91
/// <summary>
@@ -103,7 +103,7 @@ public BootstrapSamplingTransformer(IHostEnvironment env,
103
103
uint ? seed = null ,
104
104
bool shuffleInput = Defaults . ShuffleInput ,
105
105
int poolSize = Defaults . PoolSize )
106
- : this ( env , new Arguments ( ) { Complement = complement , Seed = seed , ShuffleInput = shuffleInput , PoolSize = poolSize } , input )
106
+ : this ( env , new Options ( ) { Complement = complement , Seed = seed , ShuffleInput = shuffleInput , PoolSize = poolSize } , input )
107
107
{
108
108
}
109
109
@@ -242,7 +242,7 @@ protected override bool MoveNextCore()
242
242
internal static class BootstrapSample
243
243
{
244
244
[ TlcModule . EntryPoint ( Name = "Transforms.ApproximateBootstrapSampler" , Desc = BootstrapSamplingTransformer . Summary , UserName = BootstrapSamplingTransformer . UserName , ShortName = BootstrapSamplingTransformer . RegistrationName ) ]
245
- public static CommonOutputs . TransformOutput GetSample ( IHostEnvironment env , BootstrapSamplingTransformer . Arguments input )
245
+ public static CommonOutputs . TransformOutput GetSample ( IHostEnvironment env , BootstrapSamplingTransformer . Options input )
246
246
{
247
247
Contracts . CheckValue ( env , nameof ( env ) ) ;
248
248
env . CheckValue ( input , nameof ( input ) ) ;
0 commit comments