Main Page | Class Hierarchy | Class List | Class Members

kddml.Core.QueryElement.Condition.PP_REWRITING_CONDITION Class Reference

Inheritance diagram for kddml.Core.QueryElement.Condition.PP_REWRITING_CONDITION:

kddml.Core.QueryElement.Condition.BaseCondition kddml.Core.QueryElement.Condition.Condition kddml.Core.QueryElement.XMLSpecialElement kddml.Core.QueryElement.Condition.ConditionChecker kddml.Core.QueryElement.Condition.ConditionResolver kddml.Core.KDDMLObject kddml.Core.HTMLTranslator List of all members.

Public Member Functions

boolean evalCond (weka.core.Instance instance, weka.core.Instance meta_instance) throws XMLSpecialElementException

Static Public Member Functions

static void setRegularExpression (String pattern)
static void setRewritingAttributePosition (int attr_pos)

Protected Member Functions

 PP_REWRITING_CONDITION (String type, String term1, boolean term1_is_constant, String term2, boolean term2_is_constant, String term3, boolean term3_is_constant)
boolean evalSimpleCase (String op, String[] values) throws XMLSpecialElementException
boolean isMetaInstancesOperator ()
boolean evalMissingAttribute ()

Detailed Description

This condition can be used to restricts the rows to be rewrite in the PP_REWRITING operator. In other terms, the condition regards restrictions on the rows to be rewritten and the corresponding rewriting rule is applied only on instances on which the condition is satisfied. By using this strategy, more rewriting algorithm can be used on a single record. Each condition provides a constraint on these algorithms. Examples include:
  1. to rewrite only instances with the attribute temperature less than 80;
  2. to rewrite only instances where the attribute outlook is missing.
A special operator group can be used in the condition specification. With the group operator, given an attribute value previously matched with a regular expression, a positive integer N representing the index of a sub-sequence (group) related to pattern matching, and a string constant, it checks if the group N of the attribute value is equal to the input string. As a matter of notation, sub-sequences can be identified in the regular expression by grouping them within round parentheses.

Title: KDDML

Description: Knowledge Discovery in Database Environment

Copyright: Copyright (c) 2003-2005

Company: Universita' di Pisa - Dipartimento di Informatica

Author:
Andrea Romei (romei@di.unipi.it)
Version:
2.0.16


Constructor & Destructor Documentation

kddml.Core.QueryElement.Condition.PP_REWRITING_CONDITION.PP_REWRITING_CONDITION String  type,
String  term1,
boolean  term1_is_constant,
String  term2,
boolean  term2_is_constant,
String  term3,
boolean  term3_is_constant
[protected]
 

Constructor.

Parameters:
type String the value of op_type attribute.
term1 String the first term.
term1_is_constant boolean.
term2 String the second term value.
term2_is_constant boolean.
term3 String null.
term3_is_constant boolean false.


Member Function Documentation

boolean kddml.Core.QueryElement.Condition.PP_REWRITING_CONDITION.evalCond weka.core.Instance  instance,
weka.core.Instance  meta_instance
throws XMLSpecialElementException
 

Evaluates this condition on input istance. Here, instance stand both for a relational tupla and a preprocessing tupla. In the first case, the field preprocessing_instance is null.

Parameters:
instance Instance the input instance for the relationa table. The input instance is defined in the weka.Core.Instance class. Cannot be null.
meta_instance Instance Instance the input preprocessing instance. The input instance is defined in the weka.Core.Instance class. Can be null.
Exceptions:
XMLSpecialElementException 
Returns:
boolean the evaluation of this condition.

Reimplemented from kddml.Core.QueryElement.Condition.BaseCondition.

static void kddml.Core.QueryElement.Condition.PP_REWRITING_CONDITION.setRegularExpression String  pattern  )  [static]
 

Sets the regular expression related to this condition. The regular expression is used to evaluate the group condition.

Parameters:
pattern String the regular expression.

static void kddml.Core.QueryElement.Condition.PP_REWRITING_CONDITION.setRewritingAttributePosition int  attr_pos  )  [static]
 

Sets the rewriting attribute position. This information is used to evaluate the group condition.

Parameters:
attr_pos int a positive integer representing the rewriting attribute position.

boolean kddml.Core.QueryElement.Condition.PP_REWRITING_CONDITION.evalSimpleCase String  op,
String[]  values
throws XMLSpecialElementException [protected, virtual]
 

Evaluates a simple case expression.

Parameters:
op String the operator type.
values String[] the term values. The size of the array is equal to the cardinality of the op_type. If the value referes to a missing table attribute, then the array value is null.
Exceptions:
XMLSpecialElementException 
Returns:
boolean the condition evaluation.

Implements kddml.Core.QueryElement.Condition.BaseCondition.

boolean kddml.Core.QueryElement.Condition.PP_REWRITING_CONDITION.isMetaInstancesOperator  )  [protected, virtual]
 

Returns false it the condition is evaluates on a table instance. Returns true if the op_type is evaluated on the preprocessing data, including preprocessing information such as marks associated to a physical instance value.

Returns:
boolean

Implements kddml.Core.QueryElement.Condition.BaseCondition.

boolean kddml.Core.QueryElement.Condition.PP_REWRITING_CONDITION.evalMissingAttribute  )  [protected, virtual]
 

Evaluates the condition if the attribute value is missing. Returns true if the condition is true when a missing attribute value is found. Returns false otherwise.

Returns:
boolean

Implements kddml.Core.QueryElement.Condition.BaseCondition.


Generated on Thu Feb 23 13:04:45 2006 for kddml by  doxygen 1.4.3