public static void generateTrainingDataRandom(int trainingDataSize) { testDataLL = (LinkedList<String[]>) dataLL.clone(); actualClassifications = (LinkedList<String>) classificationsLL.clone(); for (int i = 0; i < trainingDataSize; i++) { int index = (int) (Math.random() * testDataLL.size()); generateTrainingData(index); } }
public static void generateTrainingDataStride(int trainingDataSize) { testDataLL = (LinkedList<String[]>) dataLL.clone(); actualClassifications = (LinkedList<String>) classificationsLL.clone(); int removalCount = 0; for (int i = 0; i < trainingDataSize; i++) { double index = i * ((double) dataLL.size() / (double) trainingDataSize); generateTrainingData((int) (Math.round(index) - removalCount)); removalCount++; } }