C# Class Accord.MachineLearning.BaseBatches

Utility class for preparing mini-batches of data.
Inheritance: IEnumerable
Datei anzeigen Open project: Webreaper/Damselfly

Public Methods

Method Description
BaseBatches ( Array inputs, Array weights ) : System

Initializes a new instance of the BaseBatches{TBatch, TInput} class.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

Protected Methods

Method Description
Init ( ) : TBatch

Inheritors should use this method to create a new instance of a mini-batch object. You can use this method to create mini-batches containing different objects related to the mini-batch, such as auxiliary data, privileged information, etc).

PrepareBatch ( Array idx ) : void

Inheritors should use this method to prepare the data for the next batches, for example by reshuffling according to the ordering passed as argument.

PutCurrentSampleInMiniBatch ( batch, int positionInMiniBatch ) : void

Inheritors should use this method to put the current sample in the given mini-batch at the given position.

Private Methods

Method Description
IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

Method Details

BaseBatches() public method

Initializes a new instance of the BaseBatches{TBatch, TInput} class.
public BaseBatches ( Array inputs, Array weights ) : System
inputs Array The input data that should be divided into batches.
weights Array The weight for the data that should be divided into batches.
return System

GetEnumerator() public method

Returns an enumerator that iterates through a collection.
public GetEnumerator ( ) : IEnumerator
return IEnumerator

Init() protected abstract method

Inheritors should use this method to create a new instance of a mini-batch object. You can use this method to create mini-batches containing different objects related to the mini-batch, such as auxiliary data, privileged information, etc).
protected abstract Init ( ) : TBatch
return TBatch

PrepareBatch() protected method

Inheritors should use this method to prepare the data for the next batches, for example by reshuffling according to the ordering passed as argument.
protected PrepareBatch ( Array idx ) : void
idx Array The ordering for the samples in the new batches.
return void

PutCurrentSampleInMiniBatch() protected method

Inheritors should use this method to put the current sample in the given mini-batch at the given position.
protected PutCurrentSampleInMiniBatch ( batch, int positionInMiniBatch ) : void
batch The mini-batch being constructed.
positionInMiniBatch int The position in mini-batch where the current sample must be put.
return void