|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.data.conversion.AbstractConversion
adams.data.conversion.WekaPredictionContainerToSpreadSheet
public class WekaPredictionContainerToSpreadSheet
Turns a WEKA prediction container into a SpreadSheet object.
Valid options are:-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-title-name-column <java.lang.String> (property: titleNameColumn) The title of the first column. default: Name
-title-value-column <java.lang.String> (property: titleValueColumn) The title of the second column. default: Value
-add-classification (property: addClassification) If enabled, then the numeric classification (index of class label for nominal classes) is added to the spreadsheet.
-classification-entry <java.lang.String> (property: classificationEntry) The value to use in the 'Name' column for the numeric classification. default: Classification
-add-classification-label (property: addClassificationLabel) If enabled, then the classification label (only for nominal classes) is added to the spreadsheet.
-classification-label-entry <java.lang.String> (property: classificationLabelEntry) The value to use in the 'Name' column for the classification label. default: Class
-add-distribution (property: addDistribution) If enabled, then the class distribution (only for nominal classes) is added to the spreadsheet.
-distribution-format <java.lang.String> (property: distributionFormat)
The format to use in the 'Name' column for the class distribution; '{INDEX
}' can be used for the 1-based index, '{LABEL}' can be used for the class
label (if available; if not, the 1-based index is used instead)
default: {LABEL}
-distribution-sorting <NONE|DESCENDING|ASCENDING> (property: distributionSorting) The type of sorting to apply to the distribution array. default: NONE
| Nested Class Summary | |
|---|---|
static class |
WekaPredictionContainerToSpreadSheet.SortContainer
Helper class for sorting the distribution. |
static class |
WekaPredictionContainerToSpreadSheet.Sorting
How to sort the distribution. |
| Field Summary | |
|---|---|
static String |
COLUMN_NAME
the name column in the spreadsheet. |
static String |
COLUMN_VALUE
the value column in the spreadsheet. |
protected boolean |
m_AddClassification
whether to add the numeric classification to the output. |
protected boolean |
m_AddClassificationLabel
whether to add the classification label to the output (nominal classes only). |
protected boolean |
m_AddDistribution
whether to add the distribution to the output (nominal classes only). |
protected String |
m_ClassificationEntry
the entry to use for the numeric classification in the spreadsheet. |
protected String |
m_ClassificationLabelEntry
the entry to use for the classification label in the spreadsheet. |
protected String |
m_DistributionFormat
the format to use for the distribution entries in the spreadsheet. |
protected WekaPredictionContainerToSpreadSheet.Sorting |
m_DistributionSorting
the type of sorting to apply to the distribution array (if applicable). |
protected String |
m_TitleNameColumn
the title of the name column. |
protected String |
m_TitleValueColumn
the title of the value column. |
static String |
PLACEHOLDER_INDEX
the placeholder for the class index in the distribution format. |
static String |
PLACEHOLDER_LABEL
the placeholder for the class label in the distribution format. |
| Fields inherited from class adams.data.conversion.AbstractConversion |
|---|
m_Input, m_Output, m_Owner |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
WekaPredictionContainerToSpreadSheet()
|
|
| Method Summary | |
|---|---|
Class |
accepts()
Returns the class that is accepted as input. |
String |
addClassificationLabelTipText()
Returns the tip text for this property. |
String |
addClassificationTipText()
Returns the tip text for this property. |
String |
addDistributionTipText()
Returns the tip text for this property. |
String |
classificationEntryTipText()
Returns the tip text for this property. |
String |
classificationLabelEntryTipText()
Returns the tip text for this property. |
void |
defineOptions()
Adds options to the internal list of options. |
String |
distributionFormatTipText()
Returns the tip text for this property. |
String |
distributionSortingTipText()
Returns the tip text for this property. |
protected Object |
doConvert()
Performs the actual conversion. |
Class |
generates()
Returns the class that is generated as output. |
boolean |
getAddClassification()
Returns whether to add the numeric classification (label index for nominal classes). |
boolean |
getAddClassificationLabel()
Returns whether to add the classification label (only for nominal classes). |
boolean |
getAddDistribution()
Returns whether to add the class distribution (only for nominal classes). |
String |
getClassificationEntry()
Returns the value for the 'Name' column for the numeric classification. |
String |
getClassificationLabelEntry()
Returns the value for the 'Name' column for the classification label. |
String |
getDistributionFormat()
Returns the format for the 'Name' column for the numeric classification. |
WekaPredictionContainerToSpreadSheet.Sorting |
getDistributionSorting()
Returns the format for the 'Name' column for the numeric classification. |
String |
getTitleNameColumn()
Returns the title of the "Name" column, i.e., the first column. |
String |
getTitleValueColumn()
Returns the title of the "Value" column, i.e., the first column. |
String |
globalInfo()
Returns a string describing the object. |
void |
setAddClassification(boolean value)
Sets whether to add the numeric classification (label index for nominal classes). |
void |
setAddClassificationLabel(boolean value)
Sets whether to add the classification label (only for nominal classes). |
void |
setAddDistribution(boolean value)
Sets whether to add the class distribution (only for nominal classes). |
void |
setClassificationEntry(String value)
Sets the value for the 'Name' column for the numeric classification. |
void |
setClassificationLabelEntry(String value)
Sets the value for the 'Name' column for the classification label. |
void |
setDistributionFormat(String value)
Sets the format for the 'Name' column for the class distribution. |
void |
setDistributionSorting(WekaPredictionContainerToSpreadSheet.Sorting value)
Sets the sorting for the distribution array. |
void |
setTitleNameColumn(String value)
Sets the title of the "Name" column, i.e., the first column. |
void |
setTitleValueColumn(String value)
Sets the title of the "Value" column, i.e., the first column. |
String |
titleNameColumnTipText()
Returns the tip text for this property. |
String |
titleValueColumnTipText()
Returns the tip text for this property. |
| Methods inherited from class adams.data.conversion.AbstractConversion |
|---|
checkData, cleanUp, convert, getInput, getOutput, getOwner, reset, setInput, setOwner, shallowCopy, shallowCopy |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debug, debugLevelTipText, destroy, finishInit, getDebugLevel, getOptionManager, initialize, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PLACEHOLDER_LABEL
public static final String PLACEHOLDER_INDEX
public static final String COLUMN_NAME
public static final String COLUMN_VALUE
protected String m_TitleNameColumn
protected String m_TitleValueColumn
protected boolean m_AddClassification
protected String m_ClassificationEntry
protected boolean m_AddClassificationLabel
protected String m_ClassificationLabelEntry
protected boolean m_AddDistribution
protected String m_DistributionFormat
protected WekaPredictionContainerToSpreadSheet.Sorting m_DistributionSorting
| Constructor Detail |
|---|
public WekaPredictionContainerToSpreadSheet()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractOptionHandlerpublic void setTitleNameColumn(String value)
value - the titlepublic String getTitleNameColumn()
public String titleNameColumnTipText()
public void setTitleValueColumn(String value)
value - the titlepublic String getTitleValueColumn()
public String titleValueColumnTipText()
public void setAddClassification(boolean value)
value - true if to add numeric classificationpublic boolean getAddClassification()
public String addClassificationTipText()
public void setClassificationEntry(String value)
value - the namepublic String getClassificationEntry()
public String classificationEntryTipText()
public void setAddClassificationLabel(boolean value)
value - true if to add classification labelpublic boolean getAddClassificationLabel()
public String addClassificationLabelTipText()
public void setClassificationLabelEntry(String value)
value - the namepublic String getClassificationLabelEntry()
public String classificationLabelEntryTipText()
public void setAddDistribution(boolean value)
value - true if to add class distributionpublic boolean getAddDistribution()
public String addDistributionTipText()
public void setDistributionFormat(String value)
value - the formatPLACEHOLDER_INDEX,
PLACEHOLDER_LABELpublic String getDistributionFormat()
PLACEHOLDER_INDEX,
PLACEHOLDER_LABELpublic String distributionFormatTipText()
public void setDistributionSorting(WekaPredictionContainerToSpreadSheet.Sorting value)
value - the sortingpublic WekaPredictionContainerToSpreadSheet.Sorting getDistributionSorting()
PLACEHOLDER_INDEX,
PLACEHOLDER_LABELpublic String distributionSortingTipText()
public Class accepts()
accepts in interface Conversionaccepts in class AbstractConversionpublic Class generates()
generates in interface Conversiongenerates in class AbstractConversion
protected Object doConvert()
throws Exception
doConvert in class AbstractConversionException - if something goes wrong with the conversion
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||