Encog.ML.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)
        {
            _numFolds = (int) Math.Min(numFolds, _underlying
                                                         .Count);
            _foldSize = (int) (_underlying.Count/_numFolds);
            _lastFoldSize = (int) (_underlying.Count - (_foldSize*_numFolds));
            CurrentFold = 0;
        }
    }