|
||||||||||
| 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.flow.core.AbstractActor
adams.flow.transformer.AbstractTransformer
adams.flow.transformer.WekaMultiLabelSplitter
public class WekaMultiLabelSplitter
Splits a dataset containing multiple class attributes ('multi-label') into separate datasets with only a single class attribute.
Input/output:-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
-name <java.lang.String> (property: name) The name of the actor. default: MultiLabelSplitter
-annotation <adams.core.base.BaseText> (property: annotations) The annotations to attach to this actor. default:
-skip (property: skip) If set to true, transformation is skipped and the input token is just forwarded as it is.
-regexp <java.lang.String> (property: regExp) The regular expression used for matching the strings. default: .*
-invert (property: invert) If set to true, then the matching sense is inverted.
-update (property: updateRelationName) If set to true, then the name of the class attribute is used as new relation name.
-make-class-last (property: makeClassLast) If set to true, then the new class attribute will be moved to the end.
| Field Summary | |
|---|---|
static String |
BACKUP_ATTRIBUTESTOPROCESS
the key for storing the current attributes to process in the backup. |
static String |
BACKUP_CLASSATTRIBUTES
the key for storing the current class attributes in the backup. |
protected Vector<Integer> |
m_AttributesToProcess
the indices of the class attributes still to process. |
protected Vector<Integer> |
m_ClassAttributes
the indices of the class attributes. |
protected weka.core.Instances |
m_Dataset
the dataset to process. |
protected boolean |
m_Invert
whether to invert the matching sense. |
protected boolean |
m_MakeClassLast
whether to move the class attribute to the end. |
protected BaseRegExp |
m_RegExp
the regular expression that the class attribute names have to match. |
protected boolean |
m_UpdateRelationName
whether to use the class attribute name as new relation name. |
| Fields inherited from class adams.flow.transformer.AbstractTransformer |
|---|
BACKUP_INPUT, BACKUP_OUTPUT, m_InputToken, m_OutputToken |
| Fields inherited from class adams.flow.core.AbstractActor |
|---|
FILE_EXTENSION, FILE_EXTENSION_GZ, m_Annotations, m_BackupState, m_DetectedObjectVariables, m_DetectedVariables, m_ErrorHandler, m_Executed, m_FullName, m_Headless, m_Name, m_Parent, m_Root, m_Self, m_Skip, m_StopFlowOnError, m_StopMessage, m_Stopped, m_StorageHandler, m_VariablesUpdated |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
WekaMultiLabelSplitter()
|
|
| Method Summary | |
|---|---|
Class[] |
accepts()
Returns the class that the consumer accepts. |
protected Hashtable<String,Object> |
backupState()
Backs up the current state of the actor before update the variables. |
void |
defineOptions()
Adds options to the internal list of options. |
protected String |
doExecute()
Executes the flow item. |
Class[] |
generates()
Returns the class of objects that it generates. |
boolean |
getInvert()
Returns whether to invert the matching sense. |
boolean |
getMakeClassLast()
Returns whether to make the class attribute the last attribute. |
String |
getQuickInfo()
Returns a quick info about the actor, which will be displayed in the GUI. |
BaseRegExp |
getRegExp()
Returns the regular expression to match the strings against. |
boolean |
getUpdateRelationName()
Returns whether to update the relation name with the new class attribute. |
String |
globalInfo()
Returns a string describing the object. |
boolean |
hasPendingOutput()
Checks whether there is pending output to be collected after executing the flow item. |
String |
invertTipText()
Returns the tip text for this property. |
String |
makeClassLastTipText()
Returns the tip text for this property. |
Token |
output()
Returns the generated token. |
protected void |
pruneBackup()
Removes entries from the backup. |
String |
regExpTipText()
Returns the tip text for this property. |
protected void |
reset()
Resets the scheme. |
protected void |
restoreState(Hashtable<String,Object> state)
Restores the state of the actor before the variables got updated. |
void |
setInvert(boolean value)
Sets whether to invert the matching sense. |
void |
setMakeClassLast(boolean value)
Sets whether to make the class attribute the last attribute. |
void |
setRegExp(BaseRegExp value)
Sets the regular expression to match the strings against. |
void |
setUpdateRelationName(boolean value)
Sets whether to update the relation name with the new class attribute. |
String |
updateRelationNameTipText()
Returns the tip text for this property. |
void |
wrapUp()
Cleans up after the execution has finished. |
| Methods inherited from class adams.flow.transformer.AbstractTransformer |
|---|
execute, input, postExecute |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String BACKUP_CLASSATTRIBUTES
public static final String BACKUP_ATTRIBUTESTOPROCESS
protected BaseRegExp m_RegExp
protected boolean m_Invert
protected boolean m_UpdateRelationName
protected boolean m_MakeClassLast
protected Vector<Integer> m_ClassAttributes
protected Vector<Integer> m_AttributesToProcess
protected weka.core.Instances m_Dataset
| Constructor Detail |
|---|
public WekaMultiLabelSplitter()
| Method Detail |
|---|
public String globalInfo()
globalInfo in class AbstractOptionHandlerpublic void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractActorpublic String getQuickInfo()
getQuickInfo in interface QuickInfoSupportergetQuickInfo in class AbstractActorpublic void setRegExp(BaseRegExp value)
value - the regular expressionpublic BaseRegExp getRegExp()
public String regExpTipText()
public void setInvert(boolean value)
value - true if inverting matching sensepublic boolean getInvert()
public String invertTipText()
public void setUpdateRelationName(boolean value)
value - true if to update the relation namepublic boolean getUpdateRelationName()
public String updateRelationNameTipText()
public void setMakeClassLast(boolean value)
value - if true then the class attribute will be lastpublic boolean getMakeClassLast()
public String makeClassLastTipText()
public Class[] accepts()
public Class[] generates()
protected void pruneBackup()
pruneBackup in class AbstractActorprotected Hashtable<String,Object> backupState()
backupState in class AbstractTransformerprotected void restoreState(Hashtable<String,Object> state)
restoreState in class AbstractTransformerstate - the backup of the state to restore fromprotected void reset()
reset in class AbstractTransformerprotected String doExecute()
doExecute in class AbstractActorpublic boolean hasPendingOutput()
hasPendingOutput in interface OutputProducerhasPendingOutput in class AbstractTransformerpublic Token output()
output in interface OutputProduceroutput in class AbstractTransformerpublic void wrapUp()
wrapUp in class AbstractTransformer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||