All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.experiment.InstanceQuery

java.lang.Object
   |
   +----weka.experiment.DatabaseUtils
           |
           +----weka.experiment.InstanceQuery

public class InstanceQuery
extends DatabaseUtils
Convert the results of a database query into instances. The jdbc driver and database to be used default to "jdbc.idbDriver" and "jdbc:idb=experiments.prp". These may be changed by creating a java properties file called .weka.experimentrc in user.home. eg:

 jdbcDriver=jdbc.idbDriver
 jdbcURL=jdbc:idb=experiments.prp
 

Command line use just outputs the instances to System.out.

Version:
$Revision: 1.3 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz)

Constructor Index

 o InstanceQuery()
Sets up the database drivers

Method Index

 o getInstances(String)
Makes a database query to convert a table into a set of instances
 o main(String[])
Test the class from the command line.

Constructors

 o InstanceQuery
 public InstanceQuery() throws Exception
Sets up the database drivers

Throws: Exception
if an error occurs

Methods

 o getInstances
 public Instances getInstances(String query) throws Exception
Makes a database query to convert a table into a set of instances

Parameters:
query - the query to convert to instances
Returns:
the instances contained in the result of the query
Throws: Exception
if an error occurs
 o main
 public static void main(String args[])
Test the class from the command line. The instance query should be specified with -Q sql_query

Parameters:
args - contains options for the instance query

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home