public class KnnProblemMediator extends ProblemMediatorCentral
Modifier and Type | Field and Description |
---|---|
protected KNN |
knn
The K-Nearest Neighbour algorithm
|
protected KnnConfig |
knnConfig
Configuration values specific to the knn
|
dataHash, serviceNames, solutionHierarc
bestResult, fullTrace, problem, result, solutionOrder, solutionSet, solutionsNumber, solverType, testEnded
constructorParams, createServices, dataConditions, datasetType, dirPath, externalScript, heuristicOptions, heuristicType, inputVariables, linkSpec, metricType, serverSpec, serviceClasses, serviceJarFiles, servicesNum, serviceType, tokenizer
Constructor and Description |
---|
KnnProblemMediator(org.licas.PasswordHandler thePasswordHandler)
Create a new instance of KnnProblemMediator.
|
Modifier and Type | Method and Description |
---|---|
void |
copyToConfig(TestSpec testSpec)
Copy any related values to the knn config structure.
|
protected void |
createKnnData(TestSpec testSpec,
java.lang.String separator)
Create a new knn with the problem datasets.
|
org.licas_xml.abs.Element |
getResultXml()
Get the results of the test.
|
boolean |
resetForNextRun(java.util.HashMap<java.lang.String,?> varList)
Reset the problem-solving structures for the next run.
|
Result |
solve(TestSpec testSpec)
Optimise the solutions using the appropriate framework.
|
createStoreData, getProblemsList, getSolutionHierarchy, hasSolutions, readData, resetValues
addHeuristicOption, clearHeuristicOptions, getFullTrace, getHeuristicOptions, getHeuristicType, getProblem, getProblemNames, getSolutionSet, getSolutionsNumber, getTestEnded, processResult, setDatasetType, setFullTrace, setHeuristicOptions, setHeuristicType, setProblem, setSolutionSet, setSolutionsNumber
protected KnnConfig knnConfig
protected KNN knn
public KnnProblemMediator(org.licas.PasswordHandler thePasswordHandler)
thePasswordHandler
- for storing passwords.public void copyToConfig(TestSpec testSpec) throws java.lang.Exception
copyToConfig
in interface ProblemMediatorDef
copyToConfig
in class ProblemMediator
testSpec
- the model of the tests to perform.java.lang.Exception
- any error.public Result solve(TestSpec testSpec) throws java.lang.Exception
testSpec
- the model of the tests to perform.java.lang.Exception
- any error.public boolean resetForNextRun(java.util.HashMap<java.lang.String,?> varList) throws java.lang.Exception
resetForNextRun
in class ProblemMediator
varList
- a list of variables as key-value pairs. Can be null in this case.java.lang.Exception
- any error.protected void createKnnData(TestSpec testSpec, java.lang.String separator) throws java.lang.Exception
','
-style separator in the file.testSpec
- the model of the tests to perform.separator
- the tokenizer character.java.lang.Exception
- any error.public org.licas_xml.abs.Element getResultXml() throws java.lang.Exception
java.lang.Exception
- any error.