// Path: happyresearch/src/main/java/happy/research/cf/ConfigParams.java
// public enum DatasetMode {
// 	all("All"), coldUsers("Cold Users"), heavyUsers("Heavy Users"), opinUsers("Opin. Users"), blackSheep(
// 			"Black Sheep"), nicheItems("Niche Items"), contrItems("Contr. Items"), batch("Batch"), userDegree(
// 			"user-degree"), itemDegree("item-degree");
// 
// 	public String label = null;
// 
// 	DatasetMode(String _label) {
// 		this.label = _label;
// 	}
// 
// }
// 
// Path: happyresearch/src/main/java/happy/research/cf/ConfigParams.java
// public enum ValidateMethod {
// 	leave_one_out, cross_validation
// }


import happy.coding.io.FileIO;
import happy.coding.io.Logs;
import happy.research.cf.ConfigParams.DatasetMode;
import happy.research.cf.ConfigParams.ValidateMethod;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;


		if (params.auto_trust_sets) {
			trustDirs = new String[] { Dataset.TEMP_DIRECTORY, trustDir, trustDir0, trustDir2 };
		} else {
			trustDirs = new String[] { Dataset.TEMP_DIRECTORY, trustDir, trustDir2 };
		}
		trustDirPath = FileIO.makeDirPath(trustDirs);

		FileIO.makeDirectory(trustDirPath);
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	protected void prepTestRatings() {
		if (params.VALIDATE_METHOD == ValidateMethod.leave_one_out)
			super.prepTestRatings();
		else if (testRatings == null) {
			String testSet = Dataset.DIRECTORY + params.TEST_SET;
			Logs.debug("Loading test set {}", testSet);
			testRatings = new ArrayList<>();

			Map<String, Map<String, Rating>> userMap = null;
			Map<String, Map<String, Rating>> itemMap = null;
			try {
				Map[] data = Dataset.loadTestSet(testSet);
				userMap = data[0];
				itemMap = data[1];
			} catch (Exception e) {
				e.printStackTrace();
			}


// Path: happyresearch/src/main/java/happy/research/cf/ConfigParams.java
// public enum DatasetMode {
// 	all("All"), coldUsers("Cold Users"), heavyUsers("Heavy Users"), opinUsers("Opin. Users"), blackSheep(
// 			"Black Sheep"), nicheItems("Niche Items"), contrItems("Contr. Items"), batch("Batch"), userDegree(
// 			"user-degree"), itemDegree("item-degree");
// 
// 	public String label = null;
// 
// 	DatasetMode(String _label) {
// 		this.label = _label;
// 	}
// 
// }
// 
// Path: happyresearch/src/main/java/happy/research/cf/ConfigParams.java
// public enum ValidateMethod {
// 	leave_one_out, cross_validation
// }


// Path: happyresearch/src/main/java/happy/research/cf/DefaultCF_mt.java
import happy.coding.io.FileIO;
import happy.coding.io.Logs;
import happy.research.cf.ConfigParams.DatasetMode;
import happy.research.cf.ConfigParams.ValidateMethod;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;


		if (params.auto_trust_sets) {
			trustDirs = new String[] { Dataset.TEMP_DIRECTORY, trustDir, trustDir0, trustDir2 };
		} else {
			trustDirs = new String[] { Dataset.TEMP_DIRECTORY, trustDir, trustDir2 };
		}
		trustDirPath = FileIO.makeDirPath(trustDirs);

		FileIO.makeDirectory(trustDirPath);
	}

	@SuppressWarnings({ "rawtypes", "unchecked" })
	protected void prepTestRatings() {
		if (params.VALIDATE_METHOD == ValidateMethod.leave_one_out)
			super.prepTestRatings();
		else if (testRatings == null) {
			String testSet = Dataset.DIRECTORY + params.TEST_SET;
			Logs.debug("Loading test set {}", testSet);
			testRatings = new ArrayList<>();

			Map<String, Map<String, Rating>> userMap = null;
			Map<String, Map<String, Rating>> itemMap = null;
			try {
				Map[] data = Dataset.loadTestSet(testSet);
				userMap = data[0];
				itemMap = data[1];
			} catch (Exception e) {
				e.printStackTrace();
			}


			if (params.DATASET_MODE == DatasetMode.nicheItems || params.DATASET_MODE == DatasetMode.contrItems) {
