dm.mine
Class OLAPRuleLearn
java.lang.Object
|
+--dm.mine.OLAPRuleLearn
- All Implemented Interfaces:
- ClassificationProc
- public class OLAPRuleLearn
- extends java.lang.Object
- implements ClassificationProc
Implements a Decision Tree Classification Procedure using OLAP
operations on a DataCube.
- Author:
- Scott Sanner
Inner Class Summary |
class |
OLAPRuleLearn.Rule
Internal class to represents a data mining rule |
Method Summary |
protected double |
calcEntropy(java.util.Collection c)
Determines the entropy metric for a list of values. |
protected java.util.HashMap |
calcValueFrequencies(java.util.Collection c)
Determines the entropy metric for a list of values. |
protected java.util.List |
mineClassRules()
Perform a data mining procedure to find classification rules
using decision tree learning based on OLAP operations. |
java.util.List |
mineClassRules(DMQL.FindClassRules com,
DataCube d)
Perform a data mining procedure to find classification rules
using decision tree learning and the Gini metric. |
protected void |
showData()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_dMinSupport
public double _dMinSupport
- Local data members
_dMinConf
public double _dMinConf
_alLegalSplitDims
public java.util.List _alLegalSplitDims
_dc
public DataCube _dc
OLAPRuleLearn
public OLAPRuleLearn()
mineClassRules
public java.util.List mineClassRules(DMQL.FindClassRules com,
DataCube d)
- Perform a data mining procedure to find classification rules
using decision tree learning and the Gini metric.
Uses the parameters of com and operates on DataCube d.
- Specified by:
mineClassRules
in interface ClassificationProc
- Parameters:
com
- The command defining the paramters of this
classification procedured
- The datacube to mine- Returns:
- A List object containing rules. The type of this
object is undefined. At the very least, it must simply
implement the toString() method so that its rule
contents can be displayed for the user.
mineClassRules
protected java.util.List mineClassRules()
- Perform a data mining procedure to find classification rules
using decision tree learning based on OLAP operations.
This procedure searches all of the remaining dimensions,
i.e. those elements in SplitDims which have not been
restricted, and determines which one yields the highest
information gain. The procedure then restricts on each of
these split values and recursively calls itself.
Before returning, it determines if a rule should be added at
this level of the decision tree and adds it to the return
list.
- Returns:
- A List object containing Rules (see the internal class
at the end of this file)
showData
protected void showData()
calcEntropy
protected double calcEntropy(java.util.Collection c)
- Determines the entropy metric for a list of values.
This method simply calculates the frequency of each value in the
list and uses this information to calculate the entropy of the
data.
- Parameters:
c
- Collection of data- Returns:
- The value of the Info metric for this data list
calcValueFrequencies
protected java.util.HashMap calcValueFrequencies(java.util.Collection c)
- Determines the entropy metric for a list of values.
This method simply calculates the frequency of each value in the
list and returns an array of frequencies for each value.
- Parameters:
l
- Collection of data- Returns:
- HashMap Maps from list-values (Integer) to their frequency (Integer)