// Path: src/com/learningmodule/association/conceptdrug/ConceptDrugDatabaseInterface.java
// public interface ConceptDrugDatabaseInterface {
// 
// 	/*
// 	 * get name of file that will contain the prediction matrix generated by
// 	 * algorithm
// 	 */
// 	public String getMatrixFileName();
// 
// 	/*
// 	 * Method to get all the medical records containing encounterId(integer that
// 	 * represent an id for prescriptions written for a patient),
// 	 * ConceptId(integer that represent a diagnosis/diseases/observation for
// 	 * patient has been treated), DrugId(integer representing a drug that was
// 	 * written in the prescription)
// 	 */
// 	public LinkedList<EncounterIdConceptDrug> getData();
// 
// 	/*
// 	 * Method to get the medical records with given list of concepts Ids contaning encounterId, conceptId, DrugId,
// 	 * and feature related to medical records like age of patient, location of doctor/patient etc.
// 	 */
// 	
// 	public LinkedList<EncounterIdConceptFeaturesDrugModel> getDataByConceptIds(LinkedList<String> ids);
// 
// 	/*
// 	 * Method to get the list of conceptId and concept_name for given list of conceptId(integer)
// 	 */
// 	
// 	public LinkedList<ConceptNameModel> getConceptIdNameByConceptIds(LinkedList<String> conceptIds);
// 
// 	/*
// 	 * Method to get the list of Drugs for given drugIds(integers)
// 	 */
// 	public LinkedList<AbstractDrugModel> getDrugInfoByDrugIds(LinkedList<String> conceptIds);
// 
// 	/*
// 	 * Method to get the list of all conceptId and concept_words
// 	 */
// 	public LinkedList<ConceptWordModel> getConceptWords();
// }
// 
// Path: src/com/learningmodule/association/conceptdrug/PredictionResult.java
// public interface PredictionResult {
// 	public double getConfidence();
// 	public Object getValue();
// }
// 
// Path: src/com/machine/learning/interfaces/LearningModuleInterface.java
// public interface LearningModuleInterface {
// 	public void learn();
// 	public List<PredictionResult> predict(String query, SearchAttribute[] features);
// }
// 
// Path: src/com/machine/learning/request/SearchAttribute.java
// public class SearchAttribute {
// 	private String name;
// 	private Object value;
// 
// 	public SearchAttribute(String name, Object value) {
// 		super();
// 		this.name = name;
// 		this.value = value;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public void setName(String name) {
// 		this.name = name;
// 	}
// 
// 	public Object getValue() {
// 		return value;
// 	}
// 
// 	public void setValue(Object value) {
// 		this.value = value;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "SearchAttribute [name=" + name + ", value=" + value + "]";
// 	}
// }


import java.util.List;
import com.learningmodule.association.conceptdrug.ConceptDrugDatabaseInterface;
import com.learningmodule.association.conceptdrug.PredictionResult;
import com.machine.learning.interfaces.LearningModuleInterface;
import com.machine.learning.request.SearchAttribute;
package com.learningmodule.association.conceptdrug.multifeature;



public class ConceptDrugLearningMultiFeatureModule implements LearningModuleInterface {

	private PredictionMethod predictionMethod;
	// min support for association rules
	private int minSupport = 1;

	// minConfidence for association rules
	private double minConfidence = 0.3;
	
	private ConceptDrugDatabaseInterface databaseInterface;
	
	public ConceptDrugLearningMultiFeatureModule(ConceptDrugDatabaseInterface databaseInterface) {
		this.databaseInterface = databaseInterface;
		predictionMethod = new PredictionMethod(minSupport, minConfidence, databaseInterface);
	}

	@Override
	public void learn() {
		predictionMethod = new PredictionMethod(minSupport, minConfidence, databaseInterface);
	}

	@Override
// Path: src/com/learningmodule/association/conceptdrug/ConceptDrugDatabaseInterface.java
// public interface ConceptDrugDatabaseInterface {
// 
// 	/*
// 	 * get name of file that will contain the prediction matrix generated by
// 	 * algorithm
// 	 */
// 	public String getMatrixFileName();
// 
// 	/*
// 	 * Method to get all the medical records containing encounterId(integer that
// 	 * represent an id for prescriptions written for a patient),
// 	 * ConceptId(integer that represent a diagnosis/diseases/observation for
// 	 * patient has been treated), DrugId(integer representing a drug that was
// 	 * written in the prescription)
// 	 */
// 	public LinkedList<EncounterIdConceptDrug> getData();
// 
// 	/*
// 	 * Method to get the medical records with given list of concepts Ids contaning encounterId, conceptId, DrugId,
// 	 * and feature related to medical records like age of patient, location of doctor/patient etc.
// 	 */
// 	
// 	public LinkedList<EncounterIdConceptFeaturesDrugModel> getDataByConceptIds(LinkedList<String> ids);
// 
// 	/*
// 	 * Method to get the list of conceptId and concept_name for given list of conceptId(integer)
// 	 */
// 	
// 	public LinkedList<ConceptNameModel> getConceptIdNameByConceptIds(LinkedList<String> conceptIds);
// 
// 	/*
// 	 * Method to get the list of Drugs for given drugIds(integers)
// 	 */
// 	public LinkedList<AbstractDrugModel> getDrugInfoByDrugIds(LinkedList<String> conceptIds);
// 
// 	/*
// 	 * Method to get the list of all conceptId and concept_words
// 	 */
// 	public LinkedList<ConceptWordModel> getConceptWords();
// }
// 
// Path: src/com/learningmodule/association/conceptdrug/PredictionResult.java
// public interface PredictionResult {
// 	public double getConfidence();
// 	public Object getValue();
// }
// 
// Path: src/com/machine/learning/interfaces/LearningModuleInterface.java
// public interface LearningModuleInterface {
// 	public void learn();
// 	public List<PredictionResult> predict(String query, SearchAttribute[] features);
// }
// 
// Path: src/com/machine/learning/request/SearchAttribute.java
// public class SearchAttribute {
// 	private String name;
// 	private Object value;
// 
// 	public SearchAttribute(String name, Object value) {
// 		super();
// 		this.name = name;
// 		this.value = value;
// 	}
// 
// 	public String getName() {
// 		return name;
// 	}
// 
// 	public void setName(String name) {
// 		this.name = name;
// 	}
// 
// 	public Object getValue() {
// 		return value;
// 	}
// 
// 	public void setValue(Object value) {
// 		this.value = value;
// 	}
// 
// 	@Override
// 	public String toString() {
// 		return "SearchAttribute [name=" + name + ", value=" + value + "]";
// 	}
// }


// Path: src/com/learningmodule/association/conceptdrug/multifeature/ConceptDrugLearningMultiFeatureModule.java
import java.util.List;
import com.learningmodule.association.conceptdrug.ConceptDrugDatabaseInterface;
import com.learningmodule.association.conceptdrug.PredictionResult;
import com.machine.learning.interfaces.LearningModuleInterface;
import com.machine.learning.request.SearchAttribute;

package com.learningmodule.association.conceptdrug.multifeature;



public class ConceptDrugLearningMultiFeatureModule implements LearningModuleInterface {

	private PredictionMethod predictionMethod;
	// min support for association rules
	private int minSupport = 1;

	// minConfidence for association rules
	private double minConfidence = 0.3;
	
	private ConceptDrugDatabaseInterface databaseInterface;
	
	public ConceptDrugLearningMultiFeatureModule(ConceptDrugDatabaseInterface databaseInterface) {
		this.databaseInterface = databaseInterface;
		predictionMethod = new PredictionMethod(minSupport, minConfidence, databaseInterface);
	}

	@Override
	public void learn() {
		predictionMethod = new PredictionMethod(minSupport, minConfidence, databaseInterface);
	}

	@Override
	public List<PredictionResult> predict(String query, SearchAttribute[] features) {