Tabnine Logo
RemovePercentage.getInputFormat
Code IndexAdd Tabnine to your IDE (free)

How to use
getInputFormat
method
in
weka.filters.unsupervised.instance.RemovePercentage

Best Java code snippets using weka.filters.unsupervised.instance.RemovePercentage.getInputFormat (Showing top 6 results out of 315)

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

/**
 * Input an instance for filtering. Ordinarily the instance is processed and
 * made available for output immediately. Some filters require all 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.
 */
@Override
public boolean input(Instance instance) {
 if (getInputFormat() == null) {
  throw new IllegalStateException("No input instance format defined");
 }
 if (m_NewBatch) {
  resetQueue();
  m_NewBatch = false;
 }
 if (isFirstBatchDone()) {
  push(instance);
  return true;
 } else {
  bufferInput(instance);
  return false;
 }
}
origin: Waikato/weka-trunk

if (getInputFormat() != null) {
 setInputFormat(getInputFormat());
origin: Waikato/weka-trunk

/**
 * Signify that this batch of input to the filter is finished. 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
 */
@Override
public boolean batchFinished() {
 if (getInputFormat() == null) {
  throw new IllegalStateException("No input instance format defined");
 }
 // Push instances for output into output queue
 Instances toFilter = getInputFormat();
 int cutOff = (int) Math.round(toFilter.numInstances() * m_Percentage / 100);
 if (m_Inverse) {
  for (int i = 0; i < cutOff; i++) {
   push(toFilter.instance(i), false); // No need to copy
  }
 } else {
  for (int i = cutOff; i < toFilter.numInstances(); i++) {
   push(toFilter.instance(i), false); // No need to copy
  }
 }
 flushInput();
 m_NewBatch = true;
 m_FirstBatchDone = true;
 return (numPendingOutput() != 0);
}
origin: nz.ac.waikato.cms.weka/weka-stable

if (getInputFormat() != null) {
 setInputFormat(getInputFormat());
origin: Waikato/weka-trunk

/**
 * Input an instance for filtering. Ordinarily the instance is processed and
 * made available for output immediately. Some filters require all 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.
 */
@Override
public boolean input(Instance instance) {
 if (getInputFormat() == null) {
  throw new IllegalStateException("No input instance format defined");
 }
 if (m_NewBatch) {
  resetQueue();
  m_NewBatch = false;
 }
 if (isFirstBatchDone()) {
  push(instance);
  return true;
 } else {
  bufferInput(instance);
  return false;
 }
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Signify that this batch of input to the filter is finished. 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
 */
@Override
public boolean batchFinished() {
 if (getInputFormat() == null) {
  throw new IllegalStateException("No input instance format defined");
 }
 // Push instances for output into output queue
 Instances toFilter = getInputFormat();
 int cutOff = (int) Math.round(toFilter.numInstances() * m_Percentage / 100);
 if (m_Inverse) {
  for (int i = 0; i < cutOff; i++) {
   push(toFilter.instance(i), false); // No need to copy
  }
 } else {
  for (int i = cutOff; i < toFilter.numInstances(); i++) {
   push(toFilter.instance(i), false); // No need to copy
  }
 }
 flushInput();
 m_NewBatch = true;
 m_FirstBatchDone = true;
 return (numPendingOutput() != 0);
}
weka.filters.unsupervised.instanceRemovePercentagegetInputFormat

Popular methods of RemovePercentage

  • <init>
  • setPercentage
    Sets the percentage of intances to select.
  • setInvertSelection
    Sets if selection is to be inverted.
  • setInputFormat
    Sets the format of the input instances.
  • bufferInput
  • flushInput
  • getInvertSelection
    Gets if selection is to be inverted.
  • getPercentage
    Gets the percentage of instances to select.
  • isFirstBatchDone
  • numPendingOutput
  • push
  • resetQueue
  • push,
  • resetQueue,
  • runFilter,
  • setOutputFormat

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • startActivity (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • From CI to AI: The AI layer in your organization
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