norsys.netica
Class Caseset

java.lang.Object
  |
  +--norsys.netica.Caseset

public class Caseset
extends java.lang.Object

A collection of cases. Currently this class is used only by the Learner class.

Since:
v2.26
Version:
3.06 - April 15, 2005

Constructor Summary
Caseset()

Creates and returns a new Caseset, initially containing no cases, in the default environment.

Caseset(Environ env)

Creates and returns a new Caseset, initially containing no cases.

 
Method Summary
 void addCases(Streamer inStream, double degree)

Indicates that all the cases within inStream should be added to this Caseset.

 void finalize()

Removes the Caseset and frees all its resources (e.g., memory).

 Environ getEnviron()

Returns the Environ that this object belongs to.

 void writeCases(Streamer outStream)

Writes all the cases within this Caseset to inStream.

 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

public Caseset ( ) throws NeticaException
Creates and returns a new Caseset, initially containing no cases, in the default environment.

Currently, Casesets are used in batch learning (see learnCPTs), but in future they will be used for much more.

Version:

Versions 2.26 and later have this method.
See Also:
Caseset(Environ)    Same, but for any environment
finalize    Release the resources (e.g., memory) used by the Caseset
addCases    Adds cases to it
learnCPTs    Use the Caseset for batch learning
getCases    Creates a Caseset from cases retrieved from a database


public Caseset (
 Environ  env 
) throws NeticaException
Creates and returns a new Caseset, initially containing no cases.

Currently, Casesets are used in batch learning (see learnCPTs), but in future they will be used for much more.

Parameters:
Environ    env    The Environ in which this new caseset will be placed.

Version:

Versions 2.26 and later have this method.
In the C Version of the API, this function is named NewCaseset_cs.
See Also:
Caseset()    Same, but for the default environment
finalize    Release the resources (e.g., memory) used by the Caseset
addCases    Adds cases to it
learnCPTs    Use the Caseset for batch learning
getCases    Creates a Caseset from cases retrieved from a database

Method Detail
public void addCases (
 Streamer  inStream
 double  degree 
) throws NeticaException
Indicates that all the cases within inStream should be added to this Caseset.

degree indicates how each case in the stream should be weighted. See reviseCPTsByFindings for more information about the relative weighting of cases.

Currently you can only add one file to a caseset.

Parameters:
Streamer    inStream    The stream to search for cases
double    degree    A frequency factor to apply to each case in the stream

Version:

Versions 2.26 and later have this method.
In the C Version of the API, this function is named AddFileToCaseset_cs.
See Also:
writeCases    Inverse method.
Caseset    Create a new Caseset.
finalize    Free the resources (e.g., memory) used by the Caseset.
learnCPTs    Use the Caseset for learning.


public void finalize ( ) throws NeticaException
Removes the Caseset and frees all its resources (e.g., memory).

Version:
Versions 2.26 and later have this method.
In the C Version of the API, this function is named DeleteCaseset_cs.
See Also:
Caseset    Create a new Caseset.

Overrides:
finalize in class java.lang.Object

public Environ getEnviron ( )
Returns the Environ that this object belongs to.

Version:
Versions 2.26 and later have this method.

public void writeCases (
 Streamer  outStream 
) throws NeticaException
Writes all the cases within this Caseset to inStream.

They are written in the standard Netica case file format.

Parameters:
Streamer    outStream    The stream to receive the cases

Version:

Versions 2.28 and later have this method.
In the C Version of the API, this function is named WriteCaseset_cs.
See Also:
addCases    Inverse method.
Caseset    Create a new Caseset.
finalize    Free the resources (e.g., memory) used by the Caseset.
learnCPTs    Use the Caseset for learning.