private void learnKohonen() throws IOException, InvalidDimensionsException{
        readFiles();

        if (_cpNetwork == null){
            try {
                _cpNetwork = new CPNetwork(_inputNumber,new Integer(_rowsTextField.getText()), new Integer(_columnsTextField.getText()),
                        _outputNumber, _weightsInitializer, ActivationFunctionType.valueOf(_activationFunctionType.getSelection().getActionCommand()));
            } catch (TooMuchInputLayersException e) {
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            }
        }

        if (_learningParameters == null){
            _learningParameters = new LearningParameters();
            _cpNetwork.setLearningParameters(_learningParameters);
        }

        _cpNetwork.setKohonenLearningMode(true);
        _cpNetwork.setGrossbergLearningMode(false);
        _learningParameters.setAlpha(new Double(_alfa.getText()));
        _learningParameters.setNeighborhood(new Integer(_neighbourhood.getText()));
        for(int i=0; i < new Integer(_iterationCount.getText());i++){
            for(double[] input : _inputs){
//                System.out.println(input[0]);
//                System.out.println(input[1]);
//                System.out.println(input[2]);
                _cpNetwork.setInputs(input);
                _cpNetwork.calculate();
            }
        }
    }