public static BookmarkReader predictSample(String filename, int trainSize, int sampleSize, boolean predictTags, boolean userBased, boolean resBased, boolean allResources, int beta, boolean bll, Features features) {
		//filename += "_res";
		
		//int size = 0;
		//if (predictTags) {
		//	size = trainSize;
		//}
		BookmarkReader reader = new BookmarkReader(trainSize, false); // TODO
		reader.readFile(filename);
		
		List<Map<Integer, Double>> cfValues = null;	
		if (predictTags) {
			cfValues = startBM25CreationForTagPrediction(reader, sampleSize, userBased, resBased, beta);
		} else {
			cfValues = startBM25CreationForResourcesPrediction(reader, sampleSize, userBased, resBased, allResources, bll, features);
		}
		
		List<int[]> predictionValues = new ArrayList<int[]>();
		for (int i = 0; i < cfValues.size(); i++) {
			Map<Integer, Double> modelVal = cfValues.get(i);
			predictionValues.add(Ints.toArray(modelVal.keySet()));
		}		
		String suffix = "_cf_";
		if (!userBased) {
			suffix = "_rescf_";
		} else if (!resBased) {
			suffix = "_usercf_";
		}
		suffix += features + "_"; 
		if (predictTags) {
			reader.setUserLines(reader.getBookmarks().subList(trainSize, reader.getBookmarks().size()));
			PredictionFileWriter writer = new PredictionFileWriter(reader, predictionValues);
			String outputFile = filename + suffix + beta;
			writer.writeFile(outputFile);
			
			Utilities.writeStringToFile("./data/metrics/" + outputFile + "_TIME.txt", timeString);
		} else {
			if (!userBased && !allResources) {
				suffix += "mixed_";
			}
			if (bll) {
				suffix += "bll_";
			}
			PredictionFileWriter writer = new PredictionFileWriter(reader, predictionValues);
			writer.writeResourcePredictionsToFile(filename + suffix + beta, trainSize, MAX_NEIGHBORS);
		}
		return reader;
	}