Tabnine Logo
InstanceQuery.retrieveInstances
Code IndexAdd Tabnine to your IDE (free)

How to use
retrieveInstances
method
in
weka.experiment.InstanceQuery

Best Java code snippets using weka.experiment.InstanceQuery.retrieveInstances (Showing top 15 results out of 315)

origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Makes a database query using the query set through the -Q option to convert
 * a table into a set of instances
 * 
 * @return the instances contained in the result of the query
 * @throws Exception if an error occurs
 */
public Instances retrieveInstances() throws Exception {
 return retrieveInstances(m_Query);
}
origin: Waikato/weka-trunk

/**
 * Makes a database query using the query set through the -Q option to convert
 * a table into a set of instances
 * 
 * @return the instances contained in the result of the query
 * @throws Exception if an error occurs
 */
public Instances retrieveInstances() throws Exception {
 return retrieveInstances(m_Query);
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Queries a database to load results from the specified table name. The
 * database connection must have already made by m_InstanceQuery.
 * 
 * @param tableName the name of the table containing results to retrieve.
 */
protected void setInstancesFromDatabaseTable(String tableName) {
 try {
  m_FromLab.setText("Reading from database, please wait...");
  final Instances i =
   m_InstanceQuery.retrieveInstances("SELECT * FROM " + tableName);
  SwingUtilities.invokeAndWait(new Runnable() {
   @Override
   public void run() {
    setInstances(i);
   }
  });
  m_InstanceQuery.disconnectFromDatabase();
 } catch (Exception ex) {
  m_FromLab.setText(ex.getMessage());
 }
}
origin: Waikato/weka-trunk

/**
 * Queries a database to load results from the specified table name. The
 * database connection must have already made by m_InstanceQuery.
 * 
 * @param tableName the name of the table containing results to retrieve.
 */
protected void setInstancesFromDatabaseTable(String tableName) {
 try {
  m_FromLab.setText("Reading from database, please wait...");
  final Instances i =
   m_InstanceQuery.retrieveInstances("SELECT * FROM " + tableName);
  SwingUtilities.invokeAndWait(new Runnable() {
   @Override
   public void run() {
    setInstances(i);
   }
  });
  m_InstanceQuery.disconnectFromDatabase();
 } catch (Exception ex) {
  m_FromLab.setText(ex.getMessage());
 }
}
origin: nz.ac.waikato.cms.weka/weka-stable

 @Override
 public void run() {
  try {
   m_Log.statusMessage("Reading from database...");
   final Instances i = iq.retrieveInstances();
   SwingUtilities.invokeAndWait(new Runnable() {
    public void run() {
     setInstances(new Instances(i));
    }
   });
   iq.disconnectFromDatabase();
  } catch (Exception ex) {
   m_Log.statusMessage("Problem executing DB query " + m_SQLQ);
   JOptionPane.showMessageDialog(PreprocessPanel.this,
    "Couldn't read from database:\n" + ex.getMessage(),
    "Load Instances", JOptionPane.ERROR_MESSAGE);
  }
  m_IOThread = null;
 }
};
origin: Waikato/weka-trunk

 @Override
 public void run() {
  try {
   m_Log.statusMessage("Reading from database...");
   final Instances i = iq.retrieveInstances();
   SwingUtilities.invokeAndWait(new Runnable() {
    public void run() {
     setInstances(new Instances(i));
    }
   });
   iq.disconnectFromDatabase();
  } catch (Exception ex) {
   m_Log.statusMessage("Problem executing DB query " + m_SQLQ);
   JOptionPane.showMessageDialog(PreprocessPanel.this,
    "Couldn't read from database:\n" + ex.getMessage(),
    "Load Instances", JOptionPane.ERROR_MESSAGE);
  }
  m_IOThread = null;
 }
};
origin: nz.ac.waikato.cms.weka/weka-stable

Instances result = retrieveInstances(this, rs);
close(rs);
origin: Waikato/weka-trunk

Instances result = retrieveInstances(this, rs);
close(rs);
origin: nz.ac.waikato.cms.weka/weka-stable

Instances aha = iq.retrieveInstances();
iq.disconnectFromDatabase();
origin: Waikato/weka-trunk

Instances aha = iq.retrieveInstances();
iq.disconnectFromDatabase();
origin: stackoverflow.com

Instances data = null;
 try {
   DatabaseUtils utils = new DatabaseUtils();
   InstanceQuery query = new InstanceQuery();
   query.setUsername(username);
   query.setPassword(password);
   query.setQuery(pSql);
   data = query.retrieveInstances();
   data.setRelationName(pInstanceRelationName);
   if (data.classIndex() == -1)
   {
      data.setClassIndex(data.numAttributes() - 1);
   }
         // this line will print out your header + data. 
         // add your header information to your question.
   System.out.println(data)
 } 
   catch (Exception e) {
   throw new RuntimeException(e);
 }
origin: nz.ac.waikato.cms.weka/weka-stable

m_FromLab.setText("Getting experiment index");
Instances index =
 m_InstanceQuery.retrieveInstances("SELECT * FROM "
  + InstanceQuery.EXP_INDEX_TABLE);
if (index.numInstances() == 0) {
origin: Waikato/weka-trunk

m_FromLab.setText("Getting experiment index");
Instances index =
 m_InstanceQuery.retrieveInstances("SELECT * FROM "
  + InstanceQuery.EXP_INDEX_TABLE);
if (index.numInstances() == 0) {
origin: nz.ac.waikato.cms.weka/weka-stable

iq.setSparseData(m_CreateSparseData);
result = iq.retrieveInstances();
origin: Waikato/weka-trunk

iq.setSparseData(m_CreateSparseData);
result = iq.retrieveInstances();
weka.experimentInstanceQueryretrieveInstances

Javadoc

Makes a database query using the query set through the -Q option to convert a table into a set of instances

Popular methods of InstanceQuery

  • <init>
    Sets up the database drivers
  • setPassword
  • setQuery
    Set the query to execute against the database
  • setUsername
  • close
  • connectToDatabase
  • disconnectFromDatabase
  • execute
  • experimentIndexExists
  • getDatabaseURL
  • getDebug
  • getPassword
  • getDebug,
  • getPassword,
  • getQuery,
  • getResultSet,
  • getResultsTableName,
  • getSparseData,
  • getUsername,
  • initialize,
  • isConnected

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • onCreateOptionsMenu (Activity)
  • compareTo (BigDecimal)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • String (java.lang)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now