edu.udo.cs.miningmart.operator
Class RowSelectionByRandomSampling

java.lang.Object
  extended by edu.udo.cs.miningmart.operator.ExecutableOperator
      extended by edu.udo.cs.miningmart.operator.ConceptOperator
          extended by edu.udo.cs.miningmart.operator.SingleCSOperator
              extended by edu.udo.cs.miningmart.operator.RowSelection
                  extended by edu.udo.cs.miningmart.operator.RowSelectionByRandomSampling

public final class RowSelectionByRandomSampling
extends RowSelection

This operator randomly selects rows with a probability that is computed such that roughly as many rows are selected as are given in the parameter HowMany.

Version:
$Id: RowSelectionByRandomSampling.java,v 1.5 2006/09/27 14:59:55 euler Exp $
Author:
Timm Euler

Field Summary
 
Fields inherited from class edu.udo.cs.miningmart.operator.ConceptOperator
suffixForIntermediateViews
 
Fields inherited from class edu.udo.cs.miningmart.operator.ExecutableOperator
generatedSQLDefinitions
 
Constructor Summary
RowSelectionByRandomSampling()
           
 
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 because an own definition format is needed.
 int getHowMany()
           
 java.lang.String getTypeOfNewColumnSet()
          Overrides the method from RowSelection because for Sampling a table is more efficient.
 
Methods inherited from class edu.udo.cs.miningmart.operator.RowSelection
mustCopyFeature
 
Methods inherited from class edu.udo.cs.miningmart.operator.SingleCSOperator
generateColumnSetsForOp, generateSQLDefinition, getNewCSName, getTypeOfNewColumnSet, handleExtraOutputFeature
 
Methods inherited from class edu.udo.cs.miningmart.operator.ConceptOperator
compileStatement, createMetadata, createMetadataForOneBA, createSingleColumnSet, createStatement, 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, getParameterObjectsOfAllLoops, getSingleParameter, getSingleParameter, getStep, giveWarningForChangedInputData, 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

RowSelectionByRandomSampling

public RowSelectionByRandomSampling()
Method Detail

generateSQLDefinition

public java.lang.String generateSQLDefinition(java.lang.String selectPart)
                                       throws M4CompilerError
Overrides the method from RowSelection because an own definition format is needed.

Overrides:
generateSQLDefinition in class RowSelection
Parameters:
selectPart - The SQL string between "SELECT" and "FROM" for the SQL definition to be returned.
Returns:
The SQL definition for the new ColumnSet.
Throws:
M4CompilerError
See Also:
edu.udo.cs.miningmart.m4.core.operator.SingleCSOperator#generateSQLDefinition(String), edu.udo.cs.miningmart.m4.core.operator.RowSelection#generateSQLDefinition(String)

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

getTypeOfNewColumnSet

public java.lang.String getTypeOfNewColumnSet()
Overrides the method from RowSelection because for Sampling a table is more efficient.

Overrides:
getTypeOfNewColumnSet in class RowSelection
Returns:
The type of the new Columnset, either "V" or "T".
See Also:
edu.udo.cs.miningmart.m4.core.operator.ConceptOperator#getTypeOfNewColumnSet(int)

getHowMany

public int getHowMany()
               throws M4CompilerError
Throws:
M4CompilerError


Copyright © 2001-2005