C# Class Accord.MachineLearning.BaseBatches

Utility class for preparing mini-batches of data.
Inheritance: IEnumerable
Afficher le fichier Open project: Webreaper/Damselfly

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode Description
IEnumerable ( ) : IEnumerator

Returns an enumerator that iterates through a collection.

Method Details

BaseBatches() public méthode

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.
Résultat System

GetEnumerator() public méthode

Returns an enumerator that iterates through a collection.
public GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

Init() protected abstract méthode

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
Résultat TBatch

PrepareBatch() protected méthode

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.
Résultat void

PutCurrentSampleInMiniBatch() protected méthode

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.
Résultat void