public T[] getInputsForTarget(int targetIndex) { T[] inps = new T[TrainInputs.GetLength(1)]; for (int i = 0; i < inps.Length; i++) { inps[inps.Length - 1 - i] = TimeSeri[targetIndex - i - 1]; } return(inps); }
public T[,] getTrainWithTestInputs() { T[,] result = new T[TrainInputs.GetLength(0) + TestInputs.GetLength(0), TrainInputs.GetLength(1)]; int l = 0; for (; l < TrainInputs.GetLength(0); l++) { for (int j = 0; j < TrainInputs.GetLength(1); j++) { result[l, j] = TrainInputs[l, j]; } } for (int i = 0; i < TestInputs.GetLength(0); i++, l++) { for (int j = 0; j < TestInputs.GetLength(1); j++) { result[l, j] = TestInputs[i, j]; } } return(result); }