C# Class Accord.MachineLearning.Bootstrap

Show file Open project: accord-net/framework Class Usage Examples

Public Methods

Method Description
Bootstrap ( int size, int subsamples ) : System

Creates a new Bootstrap estimation algorithm.

Bootstrap ( int size, int subsamples, int subsampleSize ) : System

Creates a new Bootstrap estimation algorithm.

Compute ( ) : BootstrapResult

Computes the cross validation algorithm.

CreatePartitions ( int index, int &trainingSet, int &validationSet ) : void

Gets the indices for the training and validation sets for the specified validation fold index.

GetPartitionSize ( int index, int &trainingCount, int &validationCount ) : void

Gets the number of instances in training and validation sets for the specified validation fold index.

Samplings ( int size, int resamplings, int subsampleSize ) : int[][]

Draws the bootstrap samples from the population.

Method Details

Bootstrap() public method

Creates a new Bootstrap estimation algorithm.
public Bootstrap ( int size, int subsamples ) : System
size int The size of the complete dataset.
subsamples int The number B of bootstrap resamplings to perform.
return System

Bootstrap() public method

Creates a new Bootstrap estimation algorithm.
public Bootstrap ( int size, int subsamples, int subsampleSize ) : System
size int The size of the complete dataset.
subsamples int The number B of bootstrap resamplings to perform.
subsampleSize int The number of samples in each subsample. Default /// is to use the total number of samples in the population dataset.
return System

Compute() public method

Computes the cross validation algorithm.
public Compute ( ) : BootstrapResult
return BootstrapResult

CreatePartitions() public method

Gets the indices for the training and validation sets for the specified validation fold index.
public CreatePartitions ( int index, int &trainingSet, int &validationSet ) : void
index int The index of the validation fold.
trainingSet int The indices for the observations in the training set.
validationSet int The indices for the observations in the validation set.
return void

GetPartitionSize() public method

Gets the number of instances in training and validation sets for the specified validation fold index.
public GetPartitionSize ( int index, int &trainingCount, int &validationCount ) : void
index int The index of the bootstrap sample.
trainingCount int The number of instances in the training set.
validationCount int The number of instances in the validation set.
return void

Samplings() public static method

Draws the bootstrap samples from the population.
public static Samplings ( int size, int resamplings, int subsampleSize ) : int[][]
size int The size of the samples to be drawn.
resamplings int The number of samples to drawn.
subsampleSize int The size of the samples to be drawn.
return int[][]