/// <summary> /// Construct a cross validation trainer. /// </summary> /// /// <param name="train">The training</param> /// <param name="k">The number of folds.</param> public CrossValidationKFold(IMLTrain train, int k) : base(train.Method, (FoldedDataSet) train.Training) { _train = train; Folded.Fold(k); _flatNetwork = ((BasicNetwork) train.Method).Structure.Flat; _networks = new NetworkFold[k]; for (int i = 0; i < _networks.Length; i++) { _networks[i] = new NetworkFold(_flatNetwork); } }
/// <summary> /// Construct a cross validation trainer. /// </summary> /// /// <param name="train">The training</param> /// <param name="k">The number of folds.</param> public CrossValidationKFold(IMLTrain train, int k) : base(train.Method, (FoldedDataSet)train.Training) { _train = train; Folded.Fold(k); _flatNetwork = ((BasicNetwork)train.Method).Structure.Flat; _networks = new NetworkFold[k]; for (int i = 0; i < _networks.Length; i++) { _networks[i] = new NetworkFold(_flatNetwork); } }