Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.udo.cs.miningmart.operator
Class FeatureConstruction

    java.lang.Object
      edu.udo.cs.miningmart.operator.ExecutableOperator
          edu.udo.cs.miningmart.operator.FeatureConstruction

Direct Known Subclasses:
  Binarify, DateToNumeric, Discretization, Discretization, GenericFeatureConstruction, Grouping, Mapping, MergeAttributes, MissingValues, ReverseFeatureConstruction, Scaling, SVMforDataMining

    public abstract class FeatureConstruction

extends ExecutableOperator

This class is the superclass for all operators whose output is a BaseAttribute. It implements the loop mechanism for these operators. Use the method `getCurrentLoopNumber()` to learn the number of the loop in which your operator is applied.

Version:
  $Id: FeatureConstruction.java,v 1.11 2006/10/02 12:39:55 euler Exp $
Author:
  Martin Scholz

Constructor Summary
`FeatureConstruction()`

Method Summary
`void` | `compileStatement()` Abstract method for compiling the generated sql-statement.
`void` | `createStatement(boolean lazy)` Abstract method for generating an sql-statement.
`void` | `execute(boolean lazy)` Execute everything to be done to compile an operator.
`Column` | `generateColumnForOp()` Method to generate the new Column that all FeatureConstruction operators create.
`abstract java.lang.String` | `generateSQL(Column targetColumn)` Abstract method to be implemented by all subclasses.
`int` | `getCurrentLoopNumber()` Get the current loop number.
`Concept` | `getTheInputConcept()` All FeatureConstruction operators have an input concept which is the same in all loops.
`BaseAttribute` | `getTheOutputAttribute()` All FeatureConstruction operators have an output BaseAttribute which is different from loop to loop.
`BaseAttribute` | `getTheOutputAttribute(int loopNr)` All FeatureConstruction operators have an output attribute which is different from loop to loop.
`BaseAttribute` | `getTheTargetAttribute()` All FeatureConstruction operators have a target attribute which is different from loop to loop.
`BaseAttribute` | `getTheTargetAttribute(int loopNr)` All FeatureConstruction operators have a target attribute which is different from loop to loop.
`void` | `load(Step st)` Load method to load all parameters for this operator.
`void` | `writeResults()` Deprecated

Methods inherited from class edu.udo.cs.miningmart.operator.ExecutableOperator
`autoPrint, checkConditions, doPrint, doPrint, executeBusinessSingleValueSqlRead, executeBusinessSingleValueSqlReadL, executeBusinessSqlRead, executeBusinessSqlWrite, executeM4SingleValueSqlRead, executeM4SingleValueSqlReadL, executeM4SqlRead, executeM4SqlWrite, getArtificalColumnName, getBusinessDbms, getHighestLoopNr, getM4Db, getM4Dbms, getM4ObjectFromCache, getName, getNextM4SequenceValue, getNumberOfLoops, getOperator, getOpParamsIterator, getParameter, getParameter, getParameterObjectsOfAllLoops, getSingleParameter, getSingleParameter, getStep, giveWarningForChangedInputData, handleAssertions, isDeselectedParameter, isLoopable, isManual, isStepable, print, putM4ObjectToCache, showCreateStatement, storedProceduresAvailable`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FeatureConstruction

    public FeatureConstruction()

Method Detail

### load

    public void load(Step st)
              throws M4CompilerError

  Load method to load all parameters for this operator.

  Overrides:
    `load` in class `ExecutableOperator`
  Parameters:
    `st` - the step this operator is applied in
  Throws:
    `M4CompilerError`

### execute

    public void execute(boolean lazy)
                 throws UserError,
                        M4CompilerWarning,
                        M4CompilerError,
                        M4Exception,
                        java.sql.SQLException

  Description copied from class: `ExecutableOperator`
  Execute everything to be done to compile an operator. This method consists of the actual execution phase of an operator. Every implementation needs the functions createStatement, compileStatement and writeResults. All functions called here are abstract and must be implemented differently at lower levels, e.g. by the abstract classes ConceptOperator and FeatureConstruction.

  Overrides:
    `execute` in class `ExecutableOperator`
  Parameters:
    `lazy` - If TRUE, run the operator in lazy mode
  Throws:
    `UserError`
    `M4CompilerError`
    `java.sql.SQLException`
    `M4Exception`
    `M4CompilerWarning`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.Operator#execute`

### createStatement

    public void createStatement(boolean lazy)
                         throws java.sql.SQLException,
                                M4CompilerWarning,
                                M4CompilerError

  Description copied from class: `ExecutableOperator`
  Abstract method for generating an sql-statement. This method handles the process of generating an sql-statement for an operator. The implementation is done individually by every operator.

  Specified by:
    `createStatement` in class `ExecutableOperator`
  Parameters:
    `lazy` - If TRUE, run in lazy mode: create atmost one output ColumnSet
  Throws:
    `java.sql.SQLException`
    `M4CompilerWarning`
    `M4CompilerError`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.Operator#createStatement`

### compileStatement

    public void compileStatement()
                          throws java.sql.SQLException,
                                 M4CompilerWarning,
                                 M4CompilerError

  Description copied from class: `ExecutableOperator`
  Abstract method for compiling the generated sql-statement. This method tests if the generated sql-statement is executable in the database. The implementation is done individually by every operator.

  Specified by:
    `compileStatement` in class `ExecutableOperator`
  Throws:
    `java.sql.SQLException`
    `M4CompilerWarning`
    `M4CompilerError`
  See Also:
    `edu.udo.cs.miningmart.m4.core.operator.Operator#compileStatement`

### writeResults

    public void writeResults()

  Deprecated

### generateColumnForOp

    public Column generateColumnForOp()
                               throws M4CompilerError,
                                      M4CompilerWarning

  Method to generate the new Column that all FeatureConstruction operators create. The SQL definition of the new column is operator specific, thus every subclass of FeatureConstruction has to implement the method `generateSQL()`.

  Returns:
    A Column object with the new structure
  Throws:
    `M4CompilerError` - A simple exception object with an error message.
    `M4CompilerWarning`

### generateSQL

    public abstract java.lang.String generateSQL(Column targetColumn)
                                          throws M4CompilerError,
                                                 M4CompilerWarning

  Abstract method to be implemented by all subclasses. In this method the SQL definition for the Column which this operator creates is created.

  Parameters:
    `targetColumn` - The Column to which this FeatureConstruction Operator is applied. Some subclasses may ignore this parameter.
  Returns:
    An SQL definition for the newly constructed Column.
  Throws:
    `M4CompilerError` - A simple exception object with an error message.
    `M4CompilerWarning`

### getCurrentLoopNumber

    public int getCurrentLoopNumber()

  Get the current loop number.

  Returns:
    the current loop in which this operator is applied

### getTheInputConcept

    public Concept getTheInputConcept()
                               throws M4CompilerError

  All FeatureConstruction operators have an input concept which is the same in all loops. Get it with this method.

  Returns:
    the input concept for this operator
  Throws:
    `M4CompilerError`

### getTheOutputAttribute

    public BaseAttribute getTheOutputAttribute()
                                        throws M4CompilerError

  All FeatureConstruction operators have an output BaseAttribute which is different from loop to loop. Get it with this method.

  Returns:
    the output attribute for this operator in the current loop
  Throws:
    `M4CompilerError`

### getTheTargetAttribute

    public BaseAttribute getTheTargetAttribute()
                                        throws M4CompilerError

  All FeatureConstruction operators have a target attribute which is different from loop to loop. Get it with this method.

  Returns:
    the target attribute for this operator in the current loop
  Throws:
    `M4CompilerError`

### getTheOutputAttribute

    public BaseAttribute getTheOutputAttribute(int loopNr)
                                        throws M4CompilerError

  All FeatureConstruction operators have an output attribute which is different from loop to loop. Get it with this method.

  Parameters:
    `loopNr` - the number of the loop for which the output attribute is wanted
  Returns:
    the output attribute for this operator in the given loop
  Throws:
    `M4CompilerError`

### getTheTargetAttribute

    public BaseAttribute getTheTargetAttribute(int loopNr)
                                        throws M4CompilerError

  All FeatureConstruction operators have a target attribute which is different from loop to loop. Get it with this method.

  Parameters:
    `loopNr` - the number of the loop for which the target attribute is wanted
  Returns:
    the target attribute for this operator in the given loop
  Throws:
    `M4CompilerError`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005