Class Simple
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.wekadatasetsmerge.AbstractMerge
-
- adams.flow.transformer.wekadatasetsmerge.Simple
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.QuickInfoSupporter
,adams.core.SizeOfHandler
,Serializable
public class Simple extends AbstractMerge
Just merges the datasets side by side. Requires the datasets to have the same number of rows.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-class-finder <adams.data.weka.columnfinder.ColumnFinder> (property: classFinder) The column finder to use to find class attributes in the datasets. default: adams.data.weka.columnfinder.Class
-dataset-names <adams.core.base.BaseString> [-dataset-names ...] (property: datasetNames) The list of dataset names to use in attribute renaming. default:
-attr-renames-exp <adams.core.base.BaseRegExp> [-attr-renames-exp ...] (property: attributeRenamesExp) The expressions to use to select attribute names for renaming (one per dataset ). default: more: https://docs.oracle.com/javase/tutorial/essential/regex/ https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html
-attr-renames-format <adams.core.base.BaseString> [-attr-renames-format ...] (property: attributeRenamesFormat) One format string for each renaming expression to specify how to rename the attribute. Can contain the {DATASET} keyword which will be replaced by the dataset name, and also group identifiers which will be replaced by groups from the renaming regex. default:
-output-name <java.lang.String> (property: outputName) The name to use for the merged dataset. default: output
-ensure-equal-values <boolean> (property: ensureEqualValues) Whether multiple attributes being merged into a single attribute require equal values from all sources. default: false
Performs a merge over a set of datasets of equal size by joining rows of equal index in a simple concatenation.
- Author:
- Corey Sterling (csterlin at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Simple.SimpleRowSetIterator
Enumeration class which just returns the concatenation of the source data rows in order.-
Nested classes/interfaces inherited from class adams.flow.transformer.wekadatasetsmerge.AbstractMerge
AbstractMerge.SourceAttribute
-
-
Field Summary
-
Fields inherited from class adams.flow.transformer.wekadatasetsmerge.AbstractMerge
DATASET_KEYWORD, m_AttributeRenameFindRegexs, m_AttributeRenameFormatStrings, m_ClassAttributes, m_ClassFinder, m_DatasetNames, m_Datasets, m_EnsureEqualValues, m_MergedDatasetName, ROW_MISSING
-
-
Constructor Summary
Constructors Constructor Description Simple()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
check(weka.core.Instances[] datasets)
Hook method for performing checks before attempting the merge.protected Enumeration<int[]>
getRowSetEnumeration()
Allows specific merge methods to specify the order in which rows are placed into the merged dataset, and which rows from the source datasets are used for the source data.String
globalInfo()
Returns a string describing the object.-
Methods inherited from class adams.flow.transformer.wekadatasetsmerge.AbstractMerge
attributeRenamesExpTipText, attributeRenamesFormatTipText, checkAttributeMapping, classFinderTipText, compare, createAttributeMapping, createEmptyResultantDataset, createMappedAttribute, datasetNamesTipText, defineOptions, ensureEqualValuesTipText, getAttributeRenamesExp, getAttributeRenamesFormat, getClassFinder, getDatasetNames, getEnsureEqualValues, getMappedAttributeName, getOutputName, getQuickInfo, getValue, getValueEnsureEqual, getValueFirstAvailable, isAnyClassAttribute, isClassAttribute, isClassAttribute, merge, newInstanceForDataset, outputNameTipText, recordClassAttributes, resetInternalState, setAttributeRenamesExp, setAttributeRenamesFormat, setClassFinder, setDatasetNames, setEnsureEqualValues, setOutputName, setValue
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
check
protected String check(weka.core.Instances[] datasets)
Hook method for performing checks before attempting the merge.- Overrides:
check
in classAbstractMerge
- Parameters:
datasets
- the datasets to merge- Returns:
- null if successfully checked, otherwise error message
-
getRowSetEnumeration
protected Enumeration<int[]> getRowSetEnumeration()
Allows specific merge methods to specify the order in which rows are placed into the merged dataset, and which rows from the source datasets are used for the source data.- Specified by:
getRowSetEnumeration
in classAbstractMerge
- Returns:
- An enumeration of the source rows, one row for each dataset.
-
-