Skip to main content

Sample (Bootstrapping)

Synopsis

This operator creates a bootstrapped sample from an ExampleSet. Bootstrapped sampling uses sampling with replacement, thus the sample may not have all unique examples. The size of the sample can be specified on absolute and relative basis.

Description

This operator is different from other sampling operators because it uses sampling with replacement. In sampling with replacement, at every step all examples have equal probability of being selected. Once an example has been selected for the sample, it remains candidate for selection and it can be selected again in any other coming steps. Thus a sample with replacement can have the same example multiple number of times. More importantly, a sample with replacement can be used to generate a sample that is greater in size than the original ExampleSet. The number of examples in the sample can be specified on absolute or relative basis depending on the setting of the sample parameter.

Input

example set input

This input port expects an ExampleSet. It is output of the Generate ID operator in the attached Example Process.

Output

example set output

A bootstrapped sample of the input ExampleSet is output of this port.

original

The ExampleSet that was given as input is passed without changing to the output through this port. This is usually used to reuse the same ExampleSet in further operators or to view the ExampleSet in the Results Workspace.

Parameters

Sample

This parameter determines how the amount of data is specified.

  • absolute: If the sample parameter is set to 'absolute' the sample is created of the exactly specified number of examples. The required number of examples is specified in the sample size parameter.
  • relative: If the sample parameter is set to 'relative' the sample is created as a fraction of the total number of examples in the input ExampleSet. The required ratio of examples is specified in the sample ratio parameter.

Sample size

This parameter specifies the exact number of examples which should be sampled. This parameter is only available when the sample parameter is set to 'absolute'.

Sample ratio

This parameter specifies the fraction of examples which should be sampled. This parameter is only available when the sample parameter is set to 'relative'.

Use weights

If set to true, example weights will be considered during the bootstrapping if such weights are present.

Use local random seed

This parameter indicates if a local random seed should be used for randomizing examples of the sample. Using the same value of the local random seed will produce the same sample. Changing the value of this parameter changes the way the examples are randomized, thus the sample will have a different set of examples.

Local random seed

This parameter specifies the local random seed. This parameter is only available if the use local random seed parameter is set to true.