RandomSampling Class |
Namespace: Novacta.Analytics
The RandomSampling type exposes the following members.
Name | Description | |
---|---|---|
RandomSampling | Initializes a new instance of the RandomSampling class |
Name | Description | |
---|---|---|
InclusionProbabilities |
Gets the inclusion probabilities of the
population units.
| |
PopulationSize |
Gets the size of the population from which this
instance draws samples.
| |
RandomNumberGenerator |
Gets or sets the basic random generator for this instance.
(Inherited from RandomDevice.) | |
SampleSize |
Gets the size of the samples drawn by this
instance.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
NextDoubleMatrix |
Draws a random sample represented as a DoubleMatrix
instance.
| |
NextIndexCollection |
Draws a sample represented as an IndexCollection
instance.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
A finite population of size can be defined as the set . Elements of are referred to as units. Property PopulationSize should return the size of the population.
A sample is every non empty subset of . Class RandomSampling exposes several methods to draw samples having size returned by SampleSize from a finite population.
Method NextIndexCollection returns a sample which is represented as an IndexCollection instance having Count equal to SampleSize and whose indexes are less than PopulationSize .
Method NextDoubleMatrix returns a sample represented as a DoubleMatrix instance, having one row and a number of columns equal to PopulationSize. In this context, the sample is the set of linear indexes corresponding to entries in the returned matrix equal to 1, other entries storing 0 otherwise. For an introduction to linear indexes, see the remarks of the DoubleMatrix class.