Encog.Neural.Data.Folded.FoldedDataSet.Fold C# (CSharp) Method

Fold() public method

Fold the dataset. Must be done before the dataset is used.
public Fold ( int numFolds ) : void
numFolds int The number of folds.
return void
        public void Fold(int numFolds)
        {
            this.numFolds = (int)Math.Min(numFolds, this.underlying
                    .Count);
            this.foldSize = (int)(this.underlying.Count / this.numFolds);
            this.lastFoldSize = (int)(this.underlying.Count - (this.foldSize * this.numFolds));
            CurrentFold = 0;
        }