public static BookmarkReader predictSample(String filename, int trainSize, int sampleSize, boolean userBased, boolean resBased, int dVal, int beta, CalculationType cType ) {
		//filename += "_res";

		BookmarkReader reader = new BookmarkReader(trainSize, false);
		reader.readFile(filename);

		List<Map<Integer, Double>> actValues = startActCreation(reader, sampleSize, true, userBased, resBased, dVal, beta, cType);
		
		List<int[]> predictionValues = new ArrayList<int[]>();
		for (int i = 0; i < actValues.size(); i++) {
			Map<Integer, Double> modelVal = actValues.get(i);
			predictionValues.add(Ints.toArray(modelVal.keySet()));
		}
		String suffix = "_bll_c";
		if (!userBased) {
			suffix = "_bll_r";
		} else if (!resBased) {
			suffix = "_bll";
		}
		if (cType == CalculationType.USER_TO_RESOURCE) {
			suffix += "_ac";
		}
		reader.setUserLines(reader.getBookmarks().subList(trainSize, reader.getBookmarks().size()));
		PredictionFileWriter writer = new PredictionFileWriter(reader, predictionValues);
		String outputfile = filename + suffix + "_" + beta + "_" + dVal;
		writer.writeFile(outputfile);
		
		Utilities.writeStringToFile("./data/metrics/" + outputfile + "_TIME.txt", timeString);
		return reader;
	}