weka.classifiers.misc
Class FLR

java.lang.Object
  extended byweka.classifiers.Classifier
      extended byweka.classifiers.misc.FLR
All Implemented Interfaces:
AdditionalMeasureProducer, java.lang.Cloneable, OptionHandler, java.io.Serializable, Summarizable

public class FLR
extends Classifier
implements java.io.Serializable, Summarizable, AdditionalMeasureProducer

Fuzzy Lattice Reasoning Classifier

FLR Classifier implementation in WEKA

The Fuzzy Lattice Reasoning Classifier uses the notion of Fuzzy Lattices for creating a Reasoning Environment.

The current version can be used for classification using numeric predictors. Valid options are:

-R rhoa
Set vignilance parameter rhoa (a float in range [0,1])

-B BoundsPath
Point the boundaries file (use full path of the file)

-Y Display the induced ruleset
(if set true)

For further information contact I.N.Athanasiadis (ionathan@iti.gr)

Version:
5.0

This classifier is described in the following papers:

I. N. Athanasiadis, V. G. Kaburlasos, P. A. Mitkas and V. Petridis Applying Machine Learning Techniques on Air Quality Data for Real-Time Decision Support, Proceedings 1st Intl. NAISO Symposium on Information Technologies in Environmental Engineering (ITEE-2003). Gdansk, Poland: ICSC-NAISO Academic Press. Abstract in ICSC-NAISO Academic Press, Canada (ISBN:3906454339), pg.51.

V. G. Kaburlasos, I. N. Athanasiadis, P. A. Mitkas and V. Petridis Fuzzy Lattice Reasoning (FLR) Classifier and its Application on Improved Estimation of Ambient Ozone Concentration, unpublished working paper (2003)

Author:
Ioannis N. Athanasiadis
See Also:
Serialized Form

Nested Class Summary
private  class FLR.FuzzyLattice
          Fuzzy Lattice implementation in WEKA
 
Field Summary
private  FLR.FuzzyLattice bounds
           
private  java.lang.String[] classNames
           
static float EPSILON
           
private  int[] index
           
private  java.util.Vector learnedCode
           
private  java.io.File m_BoundsFile
           
private  double m_Rhoa
           
private  boolean m_showRules
           
 
Fields inherited from class weka.classifiers.Classifier
m_Debug
 
Constructor Summary
FLR()
           
 
Method Summary
 java.lang.String boundsFileTipText()
          Returns the tip text for this property
 void buildClassifier(Instances data)
          Builds the FLR Classifier
 void checkBounds()
          Checks the metric space
 double classifyInstance(Instance instance)
          Classifies a given instance using the FLR Classifier model
 java.util.Enumeration enumerateMeasures()
          Returns an enumeration of the additional measure names
 java.lang.String getBoundsFile()
          Get boundaries File
 double getMeasure(java.lang.String additionalMeasureName)
          Returns the value of the named measure
 java.lang.String[] getOptions()
          Gets the current settings of the Classifier.
 double getRhoa()
          Get rhoa
 boolean getShowRules()
          Get ShowRules parameter
 java.lang.String globalInfo()
          Returns a description of the classifier suitable for displaying in the explorer/experimenter gui
 java.util.Enumeration listOptions()
          Returns an enumeration describing the available options.
static void main(java.lang.String[] args)
          Main method for testing this class.
 double measureNumRules()
          Additional measure Number of Rules
 java.lang.String rhoaTipText()
          Returns the tip text for this property
 void setBounds(Instances data)
          Sets the metric space from the training set using the min-max stats, in case -B option is not used.
 void setBoundsFile(java.lang.String newBoundsFile)
          Set Boundaries File
 void setOptions(java.lang.String[] options)
          Parses a given list of options.
 void setRhoa(double newRhoa)
          Set rhoa
 void setShowRules(boolean flag)
          Set ShowRules flag
 java.lang.String showRules()
          Returns the induced set of Fuzzy Lattice Rules
 java.lang.String showRulesTipText()
          Returns the tip text for this property
 java.lang.String toString()
          Returns a description of the classifier.
 java.lang.String toSummaryString()
          Returns a superconcise version of the model
 
Methods inherited from class weka.classifiers.Classifier
debugTipText, distributionForInstance, forName, getDebug, makeCopies, setDebug
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EPSILON

public static final float EPSILON
See Also:
Constant Field Values

learnedCode

private java.util.Vector learnedCode

m_Rhoa

private double m_Rhoa

bounds

private FLR.FuzzyLattice bounds

m_BoundsFile

private java.io.File m_BoundsFile

m_showRules

private boolean m_showRules

index

private int[] index

classNames

private java.lang.String[] classNames
Constructor Detail

FLR

public FLR()
Method Detail

buildClassifier

public void buildClassifier(Instances data)
                     throws java.lang.Exception
Builds the FLR Classifier

Specified by:
buildClassifier in class Classifier
Parameters:
data - the training dataset (Instances)
Throws:
java.lang.Exception - if the training dataset is not supported or is erroneous

classifyInstance

public double classifyInstance(Instance instance)
Classifies a given instance using the FLR Classifier model

Overrides:
classifyInstance in class Classifier
Parameters:
instance - the instance to be classified
Returns:
the class index into which the instance is classfied

toString

public java.lang.String toString()
Returns a description of the classifier.

Returns:
String describing the FLR model

toSummaryString

public java.lang.String toSummaryString()
Returns a superconcise version of the model

Specified by:
toSummaryString in interface Summarizable
Returns:
String descibing the FLR model very shortly

showRules

public java.lang.String showRules()
Returns the induced set of Fuzzy Lattice Rules

Returns:
String containing the ruleset

listOptions

public java.util.Enumeration listOptions()
Returns an enumeration describing the available options. Valid options are:

-R rhoa
Set vignilance parameter rhoa (a float in range [0,1])

-B BoundsPath
Set the path pointing to the boundaries file (a full path of the file)

-Y Display the induced ruleset
(if set true)

Note: The boundaries file is a simple text file containing a row with a Fuzzy Lattice defining the metric space . For example, the boundaries file could contain the following the metric space for the iris dataset:
[ 4.3 7.9 ] [ 2.0 4.4 ] [ 1.0 6.9 ] [ 0.1 2.5 ] in Class: -1
This lattice just contains the min and max value in each dimention. In other kind of problems this may not be just a min-max operation, but it could contain limits defined by the problem itself. Thus, this option should be set by the user. If ommited, the metric space used contains the mins and maxs of the training split.

Specified by:
listOptions in interface OptionHandler
Overrides:
listOptions in class Classifier
Returns:
enumeration an enumeration of valid options

setOptions

public void setOptions(java.lang.String[] options)
                throws java.lang.Exception
Parses a given list of options.

Specified by:
setOptions in interface OptionHandler
Overrides:
setOptions in class Classifier
Parameters:
options - the list of options as an array of strings
Throws:
java.lang.Exception - if an option is not supported (

getOptions

public java.lang.String[] getOptions()
Gets the current settings of the Classifier.

Specified by:
getOptions in interface OptionHandler
Overrides:
getOptions in class Classifier
Returns:
an array of strings suitable for passing to setOptions

getRhoa

public double getRhoa()
Get rhoa

Returns:
the value of this parameter

getBoundsFile

public java.lang.String getBoundsFile()
Get boundaries File

Returns:
the value of this parameter

getShowRules

public boolean getShowRules()
Get ShowRules parameter

Returns:
the value of this parameter

setRhoa

public void setRhoa(double newRhoa)
             throws java.lang.Exception
Set rhoa

Parameters:
newRhoa - sets the rhoa value
Throws:
java.lang.Exception - if rhoa is not in range [0,1]

setBoundsFile

public void setBoundsFile(java.lang.String newBoundsFile)
Set Boundaries File

Parameters:
newBoundsFile - a new file containing the boundaries
Throws:
java.lang.Exception - if the Bounds file is incompatible with the training set or missing

setShowRules

public void setShowRules(boolean flag)
Set ShowRules flag

Parameters:
flag - the new value of this parameter

setBounds

public void setBounds(Instances data)
Sets the metric space from the training set using the min-max stats, in case -B option is not used.

Parameters:
data - is the training set

checkBounds

public void checkBounds()
Checks the metric space


rhoaTipText

public java.lang.String rhoaTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

boundsFileTipText

public java.lang.String boundsFileTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

showRulesTipText

public java.lang.String showRulesTipText()
Returns the tip text for this property

Returns:
tip text for this property suitable for displaying in the explorer/experimenter gui

getMeasure

public double getMeasure(java.lang.String additionalMeasureName)
Returns the value of the named measure

Specified by:
getMeasure in interface AdditionalMeasureProducer
Parameters:
additionalMeasureName - the name of the measure to query for its value
Returns:
the value of the named measure
Throws:
java.lang.IllegalArgumentException - if the named measure is not supported

enumerateMeasures

public java.util.Enumeration enumerateMeasures()
Returns an enumeration of the additional measure names

Specified by:
enumerateMeasures in interface AdditionalMeasureProducer
Returns:
an enumeration of the measure names

measureNumRules

public double measureNumRules()
Additional measure Number of Rules

Returns:
the number of rules induced

globalInfo

public java.lang.String globalInfo()
Returns a description of the classifier suitable for displaying in the explorer/experimenter gui

Returns:
the description

main

public static void main(java.lang.String[] args)
Main method for testing this class.

Parameters:
args - should contain command line arguments for evaluation (see Evaluation).