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 YaleModelApplier

    java.lang.Object
      edu.udo.cs.miningmart.operator.ExecutableOperator
          edu.udo.cs.miningmart.operator.ConceptOperator
              edu.udo.cs.miningmart.operator.SingleCSOperator
                  edu.udo.cs.miningmart.operator.ModelApplier
                      edu.udo.cs.miningmart.operator.YaleModelApplier

    public class YaleModelApplier

extends ModelApplier

This operator applies a model written by YALE to a set of examples. Please note:

- Please note, that up to now the order and the names of the predicting attributes has to be identical during learning and application! The relevant order is given by the operator's parameter array, the relvant names in MiningMart are the attribute names at database (SQL) level.
- The key attribute is ignored by the ModelApplier of YALE. It has to be a unique attribute, otherwise the operator will not work correctly and exit with an exception! It is not necessary for the applier to work to have an ID attribute during learning.

Version:
  $Id: YaleModelApplier.java,v 1.5 2006/09/27 14:59:57 euler Exp $
Author:
  Martin Scholz

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
`YaleModelApplier()`

Method Summary
`protected edu.udo.cs.yale.example.Attribute` | `applyModel(java.io.File modelFile, edu.udo.cs.yale.example.ExampleSet exampleSet, java.lang.String targetAttribute, int loop)` This is the main applier model.
`protected java.lang.String` | `getDatabaseDtForNewColumn(BaseAttribute ba)` Specifies the relational datatype for the new Columns based on their BaseAttribute.
`java.io.File` | `getModelFile(int loop)`
`protected java.lang.String` | `getRelationalDtForNewColumn(BaseAttribute ba)` Specifies the relational datatype for the new Columns based on their BaseAttribute.
`protected void` | `predict()` Predicts the values applying the specified models.

Methods inherited from class edu.udo.cs.miningmart.operator.ModelApplier
`createPredictedAttributeInDb, createSingleColumnSet, findCorrespondingBaInConcept, generateSQLDefinition, getDatabaseQueryForRows, getInputConcept, getKeyColumnNames, getKeyColumns, getOutputConcept, getPredictedAttribute, getPredictionColumnNames, getPredictionColumns, getSelectStatementOfKeys, getSelectStatementOfPredAttribs, getTargetTableName, getTheKeys, getThePredictingAttributes, getTypeOfNewColumnSet, mustCopyFeature, stringCollectionToCommaSeparatedString`

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, createStatement, generateColumns, getNewCSName, 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

### YaleModelApplier

    public YaleModelApplier()

Method Detail

### getRelationalDtForNewColumn

    protected java.lang.String getRelationalDtForNewColumn(BaseAttribute ba)

  Description copied from class: `ModelApplier`
  Specifies the relational datatype for the new Columns based on their BaseAttribute.

  Specified by:
    `getRelationalDtForNewColumn` in class `ModelApplier`
  Parameters:
    `ba` - the BaseAttribute of a Column to be predicted
  Returns:
    M4 relational datatype for the predicted Column(s)

### getDatabaseDtForNewColumn

    protected java.lang.String getDatabaseDtForNewColumn(BaseAttribute ba)
                                                  throws M4CompilerError

  Description copied from class: `ModelApplier`
  Specifies the relational datatype for the new Columns based on their BaseAttribute.

  Specified by:
    `getDatabaseDtForNewColumn` in class `ModelApplier`
  Parameters:
    `ba` - the BaseAttribute of a Column to be predicted
  Returns:
    the database level attribute of the predicted Column(s) for creating the table.
  Throws:
    `M4CompilerError`

### predict

    protected void predict()
                    throws M4Exception,
                           M4CompilerError

  Predicts the values applying the specified models. The models are applied to larger blocks of data, trading of performance when complex models are applied (which need to be parsed and loaded for each block) against memory consumption when huge amounts of data need to be processed.

  Specified by:
    `predict` in class `ModelApplier`
  Throws:
    `M4Exception`
    `M4CompilerError`

### applyModel

    protected edu.udo.cs.yale.example.Attribute applyModel(java.io.File modelFile,
                                                           edu.udo.cs.yale.example.ExampleSet exampleSet,
                                                           java.lang.String targetAttribute,
                                                           int loop)
                                                    throws M4CompilerError

  This is the main applier model. It reads a model from a flat file and applies it to a given `ExampleTable` of YALE, creating a new attribute.

  Parameters:
    `modelFile` - a `File` pointing to a YALE model file
    `exampleSet` - an `ExampleSet` as used by YALE
    `targetAttribute` - the name of the output `Column` in the database
    `loop` - the current loop number
  Returns:
    the predicted YALE `Attribute` created for the model application
  Throws:
    `M4CompilerError`

### getModelFile

    public java.io.File getModelFile(int loop)
                              throws M4CompilerError

  Returns:
    the path to the YALE model file to be used.
  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