public static class SVMLinFormatterFactory.SVMLinDataFormatter extends SemiLFormatterFactory.SemiLDataFormatter
Modifier and Type | Field and Description |
---|---|
private static Log |
log |
instanceLabel
foldInstanceLabelMap
exportProperties, kernelUtil, labelToClassIndexMap, maxAttributeIndex, nominalAttributeMap, numericAttributeMap, outdir
ATTR_INSTANCE_ID, SCOPE, SCOPE_FOLD, SCOPE_LABEL
Constructor and Description |
---|
SVMLinFormatterFactory.SVMLinDataFormatter(KernelUtil kernelUtil) |
Modifier and Type | Method and Description |
---|---|
protected void |
exportData(SparseData sparseData,
java.lang.String label,
java.lang.Integer run,
java.lang.Integer fold) |
private void |
exportOneAgainstAllCodes(java.lang.String label,
java.lang.Integer run,
java.lang.Integer fold,
java.util.SortedMap<java.lang.Long,java.lang.Integer> trainInstanceIdToClass,
java.util.Map<java.lang.Integer,java.lang.String> codeToClassNameMap)
recode the classes.
|
void |
initializeFold(SparseData sparseData,
java.lang.String label,
java.lang.Integer run,
java.lang.Integer fold,
java.util.SortedMap<java.lang.Boolean,java.util.SortedMap<java.lang.Long,java.lang.String>> foldInstanceLabelMap)
write a file with the attribute names corresponding to the indices in
the libsvm data file
|
exportFold, exportLabel, fillLabelToClassIndexMap, getTrainingClassMap, initializeExport, initializeLabel
clearFold, exportTransductiveData
clearLabel, exportDataForInstances, exportDataForLabel, writeLibsvmLine
addNumericAttribute, exportAttributeNames, exportAttributeNames, exportSparseMatrix, exportSparseRow, getSparseLineValues, updateLabelClassMapTransductive
public SVMLinFormatterFactory.SVMLinDataFormatter(KernelUtil kernelUtil)
protected void exportData(SparseData sparseData, java.lang.String label, java.lang.Integer run, java.lang.Integer fold) throws java.io.IOException
exportData
in class SemiLFormatterFactory.SemiLDataFormatter
java.io.IOException
private void exportOneAgainstAllCodes(java.lang.String label, java.lang.Integer run, java.lang.Integer fold, java.util.SortedMap<java.lang.Long,java.lang.Integer> trainInstanceIdToClass, java.util.Map<java.lang.Integer,java.lang.String> codeToClassNameMap) throws java.io.IOException
creates [scope]code.properties. file to write the codes to. When parsing results, we will read this properties file.
creates [scope]code[n]_label.txt. Class label files for one-against-all classification.
trainInstanceIdToClass
- map of training instance id to class idjava.io.IOException
public void initializeFold(SparseData sparseData, java.lang.String label, java.lang.Integer run, java.lang.Integer fold, java.util.SortedMap<java.lang.Boolean,java.util.SortedMap<java.lang.Long,java.lang.String>> foldInstanceLabelMap) throws java.io.IOException
LibSVMFormatterFactory.LibSVMFormatter
initializeFold
in interface SparseDataFormatter
initializeFold
in class SemiLFormatterFactory.SemiLDataFormatter
java.io.IOException