congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Center.convertInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
convertInstance
method
in
weka.filters.unsupervised.attribute.Center

Best Java code snippets using weka.filters.unsupervised.attribute.Center.convertInstance (Showing top 4 results out of 315)

origin: Waikato/weka-trunk

/**
 * Input an instance for filtering. Filter requires all
 * training instances be read before producing output.
 *
 * @param instance             the input instance
 * @return true             if the filtered instance may now be 
 *                     collected with output().
 * @throws IllegalStateException     if no input format has been set.
 */
public boolean input(Instance instance) {
 if (getInputFormat() == null)
  throw new IllegalStateException("No input instance format defined");
 if (m_NewBatch) {
  resetQueue();
  m_NewBatch = false;
 }
 
 if (m_Means == null) {
  bufferInput(instance);
  return false;
 } 
 else {
  convertInstance(instance);
  return true;
 }
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Input an instance for filtering. Filter requires all
 * training instances be read before producing output.
 *
 * @param instance             the input instance
 * @return true             if the filtered instance may now be 
 *                     collected with output().
 * @throws IllegalStateException     if no input format has been set.
 */
public boolean input(Instance instance) {
 if (getInputFormat() == null)
  throw new IllegalStateException("No input instance format defined");
 if (m_NewBatch) {
  resetQueue();
  m_NewBatch = false;
 }
 
 if (m_Means == null) {
  bufferInput(instance);
  return false;
 } 
 else {
  convertInstance(instance);
  return true;
 }
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Signify that this batch of input to the filter is finished. 
 * If the filter requires all instances prior to filtering,
 * output() may now be called to retrieve the filtered instances.
 *
 * @return true             if there are instances pending output
 * @throws IllegalStateException     if no input structure has been defined
 */
public boolean batchFinished() {
 if (getInputFormat() == null)
  throw new IllegalStateException("No input instance format defined");
 if (m_Means == null) {
  Instances input = getInputFormat();
  m_Means = new double[input.numAttributes()];
  for (int i = 0; i < input.numAttributes(); i++) {
   if (input.attribute(i).isNumeric() &&
       (input.classIndex() != i)) {
    m_Means[i] = input.meanOrMode(i);
   }
  }
  // Convert pending input instances
  for (int i = 0; i < input.numInstances(); i++)
   convertInstance(input.instance(i));
 }
 // Free memory
 flushInput();
 m_NewBatch = true;
 return (numPendingOutput() != 0);
}
origin: Waikato/weka-trunk

/**
 * Signify that this batch of input to the filter is finished. 
 * If the filter requires all instances prior to filtering,
 * output() may now be called to retrieve the filtered instances.
 *
 * @return true             if there are instances pending output
 * @throws IllegalStateException     if no input structure has been defined
 */
public boolean batchFinished() {
 if (getInputFormat() == null)
  throw new IllegalStateException("No input instance format defined");
 if (m_Means == null) {
  Instances input = getInputFormat();
  m_Means = new double[input.numAttributes()];
  for (int i = 0; i < input.numAttributes(); i++) {
   if (input.attribute(i).isNumeric() &&
       (input.classIndex() != i)) {
    m_Means[i] = input.meanOrMode(i);
   }
  }
  // Convert pending input instances
  for (int i = 0; i < input.numInstances(); i++)
   convertInstance(input.instance(i));
 }
 // Free memory
 flushInput();
 m_NewBatch = true;
 return (numPendingOutput() != 0);
}
weka.filters.unsupervised.attributeCenterconvertInstance

Javadoc

Convert a single instance over. The converted instance is added to the end of the output queue.

Popular methods of Center

  • <init>
  • batchFinished
    Signify that this batch of input to the filter is finished. If the filter requires all instances pri
  • bufferInput
  • flushInput
  • getInputFormat
  • input
    Input an instance for filtering. Filter requires all training instances be read before producing out
  • numPendingOutput
  • output
  • push
  • resetQueue
  • runFilter
  • setInputFormat
    Sets the format of the input instances.
  • runFilter,
  • setInputFormat,
  • setOutputFormat,
  • setIgnoreClass

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Reference (javax.naming)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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