public class FoldGeneratorImpl extends Object implements FoldGenerator
Constructor and Description |
---|
FoldGeneratorImpl() |
Modifier and Type | Method and Description |
---|---|
void |
generateFolds(Set<String> labels,
InstanceData instances,
String corpusName,
String splitName,
int run,
String query,
int nFolds,
int nMinPerClass,
Random r)
generate folds for a run
|
SortedMap<String,SortedMap<Integer,SortedMap<Integer,SortedMap<Boolean,SortedMap<Long,String>>>>> |
generateRuns(SortedMap<String,SortedMap<Integer,SortedMap<Integer,SortedMap<Boolean,SortedMap<Long,String>>>>> labelToInstanceMap,
int nFolds,
int nMinPerClass,
Integer nSeed,
int nRuns)
Generate cross validation folds, don't store in database.
|
void |
generateRuns(String corpusName,
String splitName,
String query,
int nFolds,
int nMinPerClass,
Integer nSeed,
int nRuns)
Generate cross validation folds, store in database.
|
ClassifierEvaluationDao |
getClassifierEvaluationDao() |
KernelUtil |
getKernelUtil() |
static void |
main(String[] args) |
void |
setClassifierEvaluationDao(ClassifierEvaluationDao classifierEvaluationDao) |
void |
setKernelUtil(KernelUtil kernelUtil) |
public static void main(String[] args) throws org.apache.commons.cli.ParseException, IOException
org.apache.commons.cli.ParseException
IOException
public void generateFolds(Set<String> labels, InstanceData instances, String corpusName, String splitName, int run, String query, int nFolds, int nMinPerClass, Random r)
labels
- mapInstanceToClassLabel
- name
- splitName
- run
- query
- nFolds
- nMinPerClass
- r
- public void generateRuns(String corpusName, String splitName, String query, int nFolds, int nMinPerClass, Integer nSeed, int nRuns)
FoldGenerator
generateRuns
in interface FoldGenerator
corpusName
- class labelquery
- query to get instance id - label - class triplesnFolds
- number of folds to generatenMinPerClass
- minimum number of instances of each class per foldnSeed
- random number seed; if null will be set currentTime in millisnRuns
- number of runspublic ClassifierEvaluationDao getClassifierEvaluationDao()
public KernelUtil getKernelUtil()
public void setClassifierEvaluationDao(ClassifierEvaluationDao classifierEvaluationDao)
public void setKernelUtil(KernelUtil kernelUtil)
public SortedMap<String,SortedMap<Integer,SortedMap<Integer,SortedMap<Boolean,SortedMap<Long,String>>>>> generateRuns(SortedMap<String,SortedMap<Integer,SortedMap<Integer,SortedMap<Boolean,SortedMap<Long,String>>>>> labelToInstanceMap, int nFolds, int nMinPerClass, Integer nSeed, int nRuns)
FoldGenerator
generateRuns
in interface FoldGenerator
labelToInstanceMap
- an instance class map without folds @see
InstanceData.labelToInstanceMap
nFolds
- number of foldsnMinPerClass
- minimum instance per classnSeed
- random seed default to System.currentTimeMillis()nRuns
- number of runsCopyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.