public static class WekaFormatterFactory.WekaFormatter extends BaseSparseDataFormatter
Modifier and Type | Field and Description |
---|---|
static String |
CLASS |
static String |
INSTANCE_ID |
exportProperties, kernelUtil, labelToClassIndexMap, maxAttributeIndex, nominalAttributeMap, numericAttributeMap, outdir
ATTR_INSTANCE_ID, SCOPE, SCOPE_FOLD, SCOPE_LABEL
Constructor and Description |
---|
WekaFormatter(KernelUtil kernelUtil) |
Modifier and Type | Method and Description |
---|---|
void |
clearFold()
clear all data structures set up during initializeFold
|
void |
clearLabel() |
void |
exportFold(SparseData sparseData,
SortedMap<Long,String> sortedMap,
boolean train,
String label,
Integer run,
Integer fold)
export the fold train/test set.
|
protected void |
initializeAttributes(SparseData bagOfWordsData,
SortedSet<String> classNames)
initialize attributes
|
void |
initializeExport(InstanceData instanceLabel,
Properties properties,
SparseData sparseData)
get needed properties out of outdir.
|
void |
initializeFold(SparseData sparseData,
String label,
Integer run,
Integer fold,
SortedMap<Boolean,SortedMap<Long,String>> foldInstanceLabelMap)
initialize data structures for the fold that will be exported.
|
weka.core.Instances |
initializeInstances(SparseData sparseData,
SortedMap<Long,String> instanceClasses,
boolean train,
String label,
Integer run,
Integer fold)
initialize the weka Instances
|
void |
initializeLabel(String label,
SortedMap<Integer,SortedMap<Integer,SortedMap<Boolean,SortedMap<Long,String>>>> labelInstances,
Properties properties,
SparseData sparseData)
initialize attributes on a per-label basis even if the data is the
same across all labels.
|
addNumericAttribute, exportAttributeNames, exportAttributeNames, exportSparseMatrix, exportSparseRow, getSparseLineValues, updateLabelClassMapTransductive
public static final String CLASS
public static final String INSTANCE_ID
public WekaFormatter(KernelUtil kernelUtil)
public void clearFold()
SparseDataFormatter
public void clearLabel()
public void exportFold(SparseData sparseData, SortedMap<Long,String> sortedMap, boolean train, String label, Integer run, Integer fold) throws IOException
SparseDataFormatter
IOException
protected void initializeAttributes(SparseData bagOfWordsData, SortedSet<String> classNames)
bagOfWordsData
- classNames
- public void initializeExport(InstanceData instanceLabel, Properties properties, SparseData sparseData) throws IOException
BaseSparseDataFormatter
initializeExport
in interface SparseDataFormatter
initializeExport
in class BaseSparseDataFormatter
IOException
public void initializeFold(SparseData sparseData, String label, Integer run, Integer fold, SortedMap<Boolean,SortedMap<Long,String>> foldInstanceLabelMap) throws IOException
SparseDataFormatter
IOException
public weka.core.Instances initializeInstances(SparseData sparseData, SortedMap<Long,String> instanceClasses, boolean train, String label, Integer run, Integer fold) throws IOException
arffRelation
- sql
- classLabels
- idfMap
- docLengthMap
- IOException
public void initializeLabel(String label, SortedMap<Integer,SortedMap<Integer,SortedMap<Boolean,SortedMap<Long,String>>>> labelInstances, Properties properties, SparseData sparseData) throws IOException
IOException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.