weka.roughset
Class RelativeReductComputation

java.lang.Object
  |
  +--weka.roughset.RelativeReductComputation

public class RelativeReductComputation
extends Object

Class for Relative Reducts, i.e. sets of attributes that maintain the discernability function between instances.

Version:
1.0
Author:
Ola Leifler

Constructor Summary
RelativeReductComputation(Instances i)
           
RelativeReductComputation(Instances i, int d)
           
 
Method Summary
 Reducts dynamicReducts(int choices, double confidence, double maxError, double stability, int numReducts)
          Obtains a set of reducts by using the method described in Dynamic reducts as a tool for extracting laws from decisions tables, Jan G.
 int getDebug()
          Get the value of debug.
static void main(String[] args)
           
 Reduct minimalRelativeReduct(int index)
          Returns the minimal set of attributes that discerns instance at position index from other instances.
 Reduct randomReduct()
          Works as semiMinimalReduct, only we use a non-deterministic algorithm that uses weka.roughset.SortedClasses.randomBestAttribute(Attributes attrs) for selecting each successive attribute.
static Reduct semiMinimalReduct(Attributes old, Instances instances)
          Starting from the attributes in old, build a superreduct that maintains the indiscernibility relation that is given by the whole set of attributes by using a greedy algorithm that selects the attribute that discerns the most objects as returned by the weka.roughset.SortedClasses.bestAttribute(Attributes attrs) method.
 void setDebug(int v)
          Set the value of debug.
 Reducts someProperReducts(int numIterations)
          This simple heuristic takes a random reduct and reduces it into a set of proper reducts
static Reducts someProperReducts(Reduct superReduct, int numIterations)
           
 Reduct wroblewskiReduct(int[] perm)
          Obtaina a reduct by using the method described in Genetic algorithms in decomposition of classification problems, Jakub Wróblewski in Rough Sets in Knowledge Discovery 2: Applications, Case Studies and Software Systems, 1998
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelativeReductComputation

public RelativeReductComputation(Instances i)

RelativeReductComputation

public RelativeReductComputation(Instances i,
                                 int d)
Method Detail

getDebug

public int getDebug()
Get the value of debug.

Returns:
value of debug.

setDebug

public void setDebug(int v)
Set the value of debug.

Parameters:
v - Value to assign to debug.

minimalRelativeReduct

public Reduct minimalRelativeReduct(int index)
Returns the minimal set of attributes that discerns instance at position index from other instances.

Parameters:
index - an int value
Returns:
a Reduct value

semiMinimalReduct

public static Reduct semiMinimalReduct(Attributes old,
                                       Instances instances)
Starting from the attributes in old, build a superreduct that maintains the indiscernibility relation that is given by the whole set of attributes by using a greedy algorithm that selects the attribute that discerns the most objects as returned by the weka.roughset.SortedClasses.bestAttribute(Attributes attrs) method.

Parameters:
old - an Attributes value
instances - an Instances value
Returns:
a Reduct value

randomReduct

public Reduct randomReduct()
Works as semiMinimalReduct, only we use a non-deterministic algorithm that uses weka.roughset.SortedClasses.randomBestAttribute(Attributes attrs) for selecting each successive attribute.

Returns:
a Reduct value

wroblewskiReduct

public Reduct wroblewskiReduct(int[] perm)
Obtaina a reduct by using the method described in Genetic algorithms in decomposition of classification problems, Jakub Wróblewski in Rough Sets in Knowledge Discovery 2: Applications, Case Studies and Software Systems, 1998

Parameters:
perm - an int[] value
Returns:
a Reduct value

dynamicReducts

public Reducts dynamicReducts(int choices,
                              double confidence,
                              double maxError,
                              double stability,
                              int numReducts)
                       throws Exception
Obtains a set of reducts by using the method described in Dynamic reducts as a tool for extracting laws from decisions tables, Jan G. Bazan and Andrzej Skowron and Piotr Synak 1994

Parameters:
choices - an int value
confidence - a double value
maxError - a double value
stability - a double value
numReducts - an int value
Returns:
a Reducts value
Throws:
Exception - if an error occurs

someProperReducts

public static Reducts someProperReducts(Reduct superReduct,
                                        int numIterations)
                                 throws Exception
Exception

someProperReducts

public Reducts someProperReducts(int numIterations)
                          throws Exception
This simple heuristic takes a random reduct and reduces it into a set of proper reducts

Exception

main

public static void main(String[] args)