public class ClassEliminationModifier extends BaseDatasetModifier
Example: If you have a dataset where each entry is measured to be either a
metal, semiconductor, or insulator and want to only have a "metal" and "nonmetal"
class, you could use this entry to change all entries marked as a semiconductor
to be insulator.
Usage: <undesired class> [<new class>]
Constructor and Description |
---|
ClassEliminationModifier() |
Modifier and Type | Method and Description |
---|---|
protected void |
modifyDataset(Dataset Data)
Apply changes to the Dataset.
|
java.lang.String |
printUsage()
Print out required format for options.
|
void |
setClassToEliminate(java.lang.String classToEliminate)
Define the name of the class to eliminate.
|
void |
setNewClassName(java.lang.String newClassName)
Define the name of the new class for entries measured to exist in the undesired
class.
|
void |
setOptions(java.util.List<java.lang.Object> Options)
Set any options for this object.
|
transform
public void setOptions(java.util.List<java.lang.Object> Options) throws java.lang.Exception
Options
Options
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic java.lang.String printUsage()
Options
public void setClassToEliminate(java.lang.String classToEliminate)
classToEliminate
- Name of undesired classpublic void setNewClassName(java.lang.String newClassName)
newClassName
- New class value (null to delete)protected void modifyDataset(Dataset Data)
BaseDatasetModifier
modifyDataset
in class BaseDatasetModifier
Data
- Dataset to be modified