net.sf.myra.datamining.statistics
Class Parser

java.lang.Object
  extended by net.sf.myra.datamining.statistics.Parser
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener

public class Parser
extends java.lang.Object
implements java.beans.PropertyChangeListener

Generates PR curves from a predictions file.

Version:
$Revision$ $Date:: $
Author:
Fernando Esteban Barril Otero

Field Summary
static java.lang.String CLASS_LABEL
          Property name for the event of loading a class label.
static java.lang.String ENABLED
          Flag to indicate that the attribute is enabled.
static java.lang.String MAPPING_SIZE
          Property name for the mapping size event.
static java.lang.String ORIGINAL_PREFIX
          Prefix for 'original' (true) class attribute flags.
static java.lang.String PREDICTED_PREFIX
          Prefix for predicted class attribute flags.
 
Constructor Summary
Parser()
           
 
Method Summary
 void addListener(java.beans.PropertyChangeListener listener)
          Adds a listener to this parser.
static void main(java.lang.String[] args)
           
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 Information read(Dataset dataset, CurveFactory factory, java.util.Set<java.lang.String> filter)
          Parses the specified prediction file.
 Information read(java.io.File file, CurveFactory factory)
          Parses the specified prediction file.
 Information read(java.io.File file, CurveFactory factory, java.util.Set<java.lang.String> filter)
          Parses the specified prediction file.
 Information read(java.lang.String file, CurveFactory factory)
          Parses the specified prediction file.
 Information read(java.lang.String file, CurveFactory factory, java.util.Set<java.lang.String> filter)
          Parses the specified prediction file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAPPING_SIZE

public static final java.lang.String MAPPING_SIZE
Property name for the mapping size event.

See Also:
Constant Field Values

CLASS_LABEL

public static final java.lang.String CLASS_LABEL
Property name for the event of loading a class label.

See Also:
Constant Field Values

ORIGINAL_PREFIX

public static final java.lang.String ORIGINAL_PREFIX
Prefix for 'original' (true) class attribute flags.

See Also:
Constant Field Values

PREDICTED_PREFIX

public static final java.lang.String PREDICTED_PREFIX
Prefix for predicted class attribute flags.

See Also:
Constant Field Values

ENABLED

public static final java.lang.String ENABLED
Flag to indicate that the attribute is enabled.

See Also:
Constant Field Values
Constructor Detail

Parser

public Parser()
Method Detail

read

public Information read(java.lang.String file,
                        CurveFactory factory)
                 throws java.io.IOException
Parses the specified prediction file.

Parameters:
file - the name of the file.
Throws:
java.io.IOException

read

public Information read(java.lang.String file,
                        CurveFactory factory,
                        java.util.Set<java.lang.String> filter)
                 throws java.io.IOException
Parses the specified prediction file.

Parameters:
file - the name of the file.
Throws:
java.io.IOException

read

public Information read(java.io.File file,
                        CurveFactory factory)
                 throws java.io.IOException
Parses the specified prediction file.

Parameters:
file - the file to parse.
Throws:
java.io.IOException

read

public Information read(java.io.File file,
                        CurveFactory factory,
                        java.util.Set<java.lang.String> filter)
                 throws java.io.IOException
Parses the specified prediction file.

Parameters:
file - the dataset file name.
factory - the curve factory instance.
filter - the set of attributes to ignore.
Throws:
java.io.IOException

read

public Information read(Dataset dataset,
                        CurveFactory factory,
                        java.util.Set<java.lang.String> filter)
                 throws java.io.IOException
Parses the specified prediction file.

Parameters:
dataset - the dataset instance.
factory - the curve factory instance.
filter - the set of attributes to ignore.
Throws:
java.io.IOException

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener

addListener

public void addListener(java.beans.PropertyChangeListener listener)
Adds a listener to this parser.

Parameters:
listener - the listener to be added.

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2013. All Rights Reserved.