Class 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
    • Constructor Detail

      • Simple

        public Simple()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.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 class AbstractMerge
        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 class AbstractMerge
        Returns:
        An enumeration of the source rows, one row for each dataset.