edu.udo.cs.miningmart.operator
Class RowSelectionByUnbiasing

java.lang.Object
  extended byedu.udo.cs.miningmart.operator.ExecutableOperator
      extended byedu.udo.cs.miningmart.operator.ConceptOperator
          extended byedu.udo.cs.miningmart.operator.SingleCSOperator
              extended byedu.udo.cs.miningmart.operator.RowSelection
                  extended byedu.udo.cs.miningmart.operator.RowSelectionByUnbiasing

public class RowSelectionByUnbiasing
extends RowSelection

Version:
$Id: RowSelectionByUnbiasing.java,v 1.4 2006/04/11 14:10:11 euler Exp $
Author:
Martin Scholz

Field Summary
 
Fields inherited from class edu.udo.cs.miningmart.operator.ExecutableOperator
generatedSQLDefinitions
 
Constructor Summary
RowSelectionByUnbiasing()
           
 
Method Summary
 java.lang.String generateConditionForOp()
          Abstract method to be implemented by all subclasses.
 java.lang.String generateSQLDefinition(java.lang.String selectPart)
          Overrides the method from RowSelection
 int getHowMany()
           
 BaseAttribute getLabelBA()
           
 int getMaxTuplesToRead()
           
 BaseAttribute getPredictedLabelBA()
           
protected  void initByMasterBlock()
          This method reads a block of the target size from the input Columnset and initializes counters.
protected  void selectRowsForResult()
          This method tries to find a set of tuples satisfying the specifications created by the initByMasterBlock method.
 
Methods inherited from class edu.udo.cs.miningmart.operator.RowSelection
getTypeOfNewColumnSet, mustCopyFeature
 
Methods inherited from class edu.udo.cs.miningmart.operator.SingleCSOperator
generateColumnSetsForOp, generateSQLDefinition, getNewCSName, getTypeOfNewColumnSet
 
Methods inherited from class edu.udo.cs.miningmart.operator.ConceptOperator
compileStatement, createMetadata, createMetadataForOneBA, createSingleColumnSet, createStatement, estimateStatistics, generateColumns, getInputConcept, getNewCSName, getOutputConcept, getStringForSelection, setNewCSMultiStepBranch
 
Methods inherited from class edu.udo.cs.miningmart.operator.ExecutableOperator
autoPrint, checkConditions, doPrint, doPrint, execute, 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, load, print, putM4ObjectToCache, showCreateStatement, storedProceduresAvailable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowSelectionByUnbiasing

public RowSelectionByUnbiasing()
Method Detail

generateSQLDefinition

public java.lang.String generateSQLDefinition(java.lang.String selectPart)
                                       throws M4CompilerError
Overrides the method from RowSelection

Overrides:
generateSQLDefinition in class RowSelection
Throws:
M4CompilerError
See Also:
edu.udo.cs.miningmart.m4.core.operator.SingleCSOperator#generateSQLDefinition(String), edu.udo.cs.miningmart.m4.core.operator.RowSelection#generateSQLDefinition(String)

initByMasterBlock

protected void initByMasterBlock()
                          throws M4CompilerError,
                                 java.sql.SQLException
This method reads a block of the target size from the input Columnset and initializes counters. The priors of the class labels are estimated from their frequency in this "master block". The number of occurences of instances in different "prediction subsets" is kept, just the associated classes are randomly assigned according to the estimated priors.

Throws:
M4CompilerError
java.sql.SQLException

selectRowsForResult

protected void selectRowsForResult()
                            throws M4CompilerError
This method tries to find a set of tuples satisfying the specifications created by the initByMasterBlock method. A table is created for the selected row numbers and it is filled with the result of this sampling step. The number of tuples maximally read can be limited if the according parameter is set to a positive value. Otherwise the size of the input Columnset is chosen as the default value. Sampling is done with replacement.

Throws:
M4CompilerError

generateConditionForOp

public java.lang.String generateConditionForOp()
Description copied from class: RowSelection
Abstract method to be implemented by all subclasses. Must return the String for the WHERE part of the SQL definition of the output columnset.

Specified by:
generateConditionForOp in class RowSelection
Returns:
the WHERE condition

getPredictedLabelBA

public BaseAttribute getPredictedLabelBA()
                                  throws M4CompilerError
Returns:
the attribute with the predicted label in case of models, or an attribute defining a segment
Throws:
M4CompilerError

getLabelBA

public BaseAttribute getLabelBA()
                         throws M4CompilerError
Returns:
the attribute with a nominal label (or property of interest)
Throws:
M4CompilerError

getHowMany

public int getHowMany()
               throws M4CompilerError
Returns:
the number of tuples to be selected
Throws:
M4CompilerError

getMaxTuplesToRead

public int getMaxTuplesToRead()
                       throws M4CompilerError
Returns:
the number of tuples to be read at most, '0' means not to limit the search
Throws:
M4CompilerError


Copyright © 2001-2005