public interface KernelUtil
Modifier and Type | Method and Description |
---|---|
void |
exportClassIds(String outdir,
Map<String,Integer> classIdMap,
String label)
export the class id to class name map.
|
void |
fillGramMatrix(KernelEvaluation kernelEvaluation,
SortedSet<Long> trainInstanceLabelMap,
double[][] trainGramMatrix) |
void |
fillLabelToClassToIndexMap(Map<String,SortedSet<String>> labelToClasMap,
Map<String,com.google.common.collect.BiMap<String,Integer>> labelToClassIndexMap) |
void |
generateFolds(InstanceData instanceLabel,
Properties props)
generate folds from the label to instance map.
|
double[][] |
loadGramMatrix(SortedSet<Long> instanceIds,
String name,
String splitName,
String experiment,
String label,
int run,
int fold,
double param1,
String param2) |
InstanceData |
loadInstances(String strQuery)
read query
|
void |
loadProperties(String propertyFile,
Properties props) |
void loadProperties(String propertyFile, Properties props) throws FileNotFoundException, IOException, InvalidPropertiesFormatException
InstanceData loadInstances(String strQuery)
[instance id] [class name] [train/test boolean optioanl] [label optional] [fold optional] [run optional]return map of
[label, [run, [fold, [train/test , [instance id, class]]]]]
void fillGramMatrix(KernelEvaluation kernelEvaluation, SortedSet<Long> trainInstanceLabelMap, double[][] trainGramMatrix)
double[][] loadGramMatrix(SortedSet<Long> instanceIds, String name, String splitName, String experiment, String label, int run, int fold, double param1, String param2)
void generateFolds(InstanceData instanceLabel, Properties props)
instanceLabel
- props
- void fillLabelToClassToIndexMap(Map<String,SortedSet<String>> labelToClasMap, Map<String,com.google.common.collect.BiMap<String,Integer>> labelToClassIndexMap)
void exportClassIds(String outdir, Map<String,Integer> classIdMap, String label) throws IOException
classIdMap
- label
- run
- fold
- IOException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.