Codota Logo
Center.getInputFormat
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
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);
}
origin: nz.ac.waikato.cms.weka/weka-stable

  if (instance.attribute(j).isNumeric() &&
      (!Utils.isMissingValue(vals[j])) &&
      (getInputFormat().classIndex() != j)) {
} else {
 double[] vals = instance.toDoubleArray();
 for (int j = 0; j < getInputFormat().numAttributes(); j++) {
  if (instance.attribute(j).isNumeric() &&
      (!Utils.isMissingValue(vals[j])) &&
      (getInputFormat().classIndex() != j)) {
   vals[j] = (vals[j] - m_Means[j]);
origin: Waikato/weka-trunk

  if (instance.attribute(j).isNumeric() &&
      (!Utils.isMissingValue(vals[j])) &&
      (getInputFormat().classIndex() != j)) {
} else {
 double[] vals = instance.toDoubleArray();
 for (int j = 0; j < getInputFormat().numAttributes(); j++) {
  if (instance.attribute(j).isNumeric() &&
      (!Utils.isMissingValue(vals[j])) &&
      (getInputFormat().classIndex() != j)) {
   vals[j] = (vals[j] - m_Means[j]);
weka.filters.unsupervised.attributeCentergetInputFormat

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
  • convertInstance
    Convert a single instance over. The converted instance is added to the end of the output queue.
  • flushInput
  • 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

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • addToBackStack (FragmentTransaction)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now