src/main/components/network/models/MoParseData.java
// and add it to the trainingData ArrayList
and add it to the trainingData ArrayList
and add it to the trainingData ArrayList
private void parseTraining(String line) {
        String[] split = line.split("=>");
        if (split.length == 2) {
            float[] inputs = MoFunctions.getFloatVersion(split[0]);
            float[] outputs = MoFunctions.getFloatVersion(split[1]);
            MoTrainingData moTrainingData = new MoTrainingData(inputs,outputs);
            this.trainingData.add(moTrainingData);
        }
    }
private void parseTraining ( String line ) { String [ ] split = line . split ( "=>" ) ; if ( split . length == 2 ) { float [ ] inputs = MoFunctions . getFloatVersion ( split [ 0 ] ) ; float [ ] outputs = MoFunctions . getFloatVersion ( split [ 1 ] ) ; MoTrainingData moTrainingData = new MoTrainingData ( inputs , outputs ) ; this . trainingData . add ( moTrainingData ) ; } }
and add it to the trainingData ArrayList
and add it to the trainingData ArrayList
// then we can add it // otherwise their code is wrong // split [0] is the inputs // split [1] is the expected output // we add this training data to the rest of them