public static List<Map<Integer, Double>> startLdaCreation(BookmarkReader reader, int sampleSize, boolean sorting, int numTopics, boolean userBased, boolean resBased, boolean topicCreation, boolean smoothing) {
		timeString = "";
		int size = reader.getBookmarks().size();
		int trainSize = size - sampleSize;
		
		Stopwatch timer = new Stopwatch();
		timer.start();
		MalletCalculator userCalc = null;
		List<Map<Integer, Integer>> userMaps = null;
		//List<Double> userDenoms = null;
		if (userBased) {
			userMaps = Utilities.getUserMaps(reader.getBookmarks().subList(0, trainSize));
			userCalc = new MalletCalculator(userMaps, numTopics);
			userCalc.predictValuesProbs();
			//userDenoms = getDenoms(userPredictionValues);
			System.out.println("User-Training finished");
		}
		MalletCalculator resCalc = null;
		List<Map<Integer, Integer>> resMaps = null;
		//List<Double> resDenoms = null;
		if (resBased) {
			resMaps = Utilities.getResMaps(reader.getBookmarks().subList(0, trainSize));
			resCalc = new MalletCalculator(resMaps, numTopics);
			resCalc.predictValuesProbs();
			//resDenoms = getDenoms(resPredictionValues);
			System.out.println("Res-Training finished");
		}
		List<Map<Integer, Double>> results = new ArrayList<Map<Integer, Double>>();
		if (trainSize == size) {
			trainSize = 0;
		}
        timer.stop();
        long trainingTime = timer.elapsed(TimeUnit.MILLISECONDS);
        
		timer = new Stopwatch();
		timer.start();
		for (int i = trainSize; i < size; i++) { // the test set
			Bookmark data = reader.getBookmarks().get(i);
			int userID = data.getUserID();
			int resID = data.getWikiID();
			//Map<Integer, Integer> userMap = null;
			//if (userBased && userMaps != null && userID < userMaps.size()) {
			//	userMap = userMaps.get(userID);
			//}
			//Map<Integer, Integer> resMap = null;
			//if (resBased && resMaps != null && resID < resMaps.size()) {
			//	resMap = resMaps.get(resID);
			//}
			double userTagCount = 0.0;//Utilities.getMapCount(userMap);
			double resTagCount = 0.0;//Utilities.getMapCount(resMap);
			/*
			double userDenomVal = 0.0;
			if (userDenoms != null && userID < userDenoms.size()) {
				userDenomVal = userDenoms.get(userID);
			}
			double resDenomVal = 0.0;
			if (resDenoms != null && resID < resDenoms.size()) {
				resDenomVal = resDenoms.get(resID);
			}
			*/
			Map<Integer, Double> userPredMap = null;
			if (userCalc != null) {
				userPredMap = userCalc.getValueProbsForID(userID, topicCreation);
			}
			Map<Integer, Double> resPredMap = null;
			if (resCalc != null) {
				resPredMap = resCalc.getValueProbsForID(resID, topicCreation);
			}
			Map<Integer, Double> map = getRankedTagList(reader, userPredMap, userTagCount, resPredMap, resTagCount, sorting, smoothing, topicCreation);
			results.add(map);
		}
		timer.stop();
		long testTime = timer.elapsed(TimeUnit.MILLISECONDS);
		timeString += ("Full training time: " + trainingTime + "\n");
		timeString += ("Full test time: " + testTime + "\n");
		timeString += ("Average test time: " + testTime / (double)sampleSize) + "\n";
		timeString += ("Total time: " + (trainingTime + testTime) + "\n");
		return results;
	}