public void makeThreeSamplesRandomized() {
        samples.clear();
        samples.add(new ArrayList<Integer>());
        samples.add(new ArrayList<Integer>());
        samples.add(new ArrayList<Integer>());

        int countInitialSample = datas.size();
        int countTrainingSample = (int) (countInitialSample * p_train_pattern);
        int countTestSample = (int) (countInitialSample * p_test_pattern);

        List<Integer> allNumbers = new ArrayList<Integer>();
        for (int i = 0; i < countInitialSample; i++) {
            allNumbers.add(i);
        }

        int restInInitialSample = countInitialSample;
        for (int i = 0; i < countTrainingSample; i++) {
            int rand = (int) (Math.random() * restInInitialSample);
            samples.get(0).add(allNumbers.remove(rand));
            restInInitialSample--;
        }
        for (int i = 0; i < countTestSample; i++) {
            int rand = (int) (Math.random() * restInInitialSample);
            samples.get(1).add(allNumbers.remove(rand));
            restInInitialSample--;
        }
        for (int i = 0; i < allNumbers.size(); i++) {
            samples.get(2).add(allNumbers.get(i));
        }
    }