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, MissingValues, 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.7 2006/04/11 14:10:10 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.
`EstimatedStatistics` | `estimateStatistics(Step theStep)` Abstract method for estimating statistics for a concept.
`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, getSingleParameter, getSingleParameter, getStep, 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
  Returns:
    errorCode
  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

### estimateStatistics

    public EstimatedStatistics estimateStatistics(Step theStep)
                                           throws M4Exception

  Description copied from class: `ExecutableOperator`
  Abstract method for estimating statistics for a concept. The realisation of this method depends on the type of operator that is connected to the step that creates the concept whose statistics are to be estimated. Therefore the implementation is done in this class and its subclasses.

  Specified by:
    `estimateStatistics` in class `ExecutableOperator`
  Parameters:
    `theStep` - the step that creates the output concept whose statistics are to be estimated
  Returns:
    an `EstimatedStatistics` object, some of whose values may or may not be available, depending on whether they could be guessed or inferred.
  Throws:
    `M4Exception`
  See Also:
    `ExecutableOperator.estimateStatistics(Step)`

### generateColumnForOp

    public Column generateColumnForOp()
                               throws M4CompilerError

  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.

### generateSQL

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

  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.

### 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