congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Center.setInputFormat
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: Waikato/weka-trunk

protected void fillCovariance() throws Exception {
 // just center the data or standardize it?
 if (m_center) {
  m_centerFilter = new Center();
  m_centerFilter.setInputFormat(m_TrainInstances);
  m_TrainInstances = Filter.useFilter(m_TrainInstances, m_centerFilter);
 } else {
  m_standardizeFilter = new Standardize();
  m_standardizeFilter.setInputFormat(m_TrainInstances);
  m_TrainInstances = Filter.useFilter(m_TrainInstances, m_standardizeFilter);
 }
 // now compute the covariance matrix
 m_Correlation = new UpperSymmDenseMatrix(m_NumAttribs);
 for (int i = 0; i < m_NumAttribs; i++) {
  for (int j = i; j < m_NumAttribs; j++) {
   double cov = 0;
   for (Instance inst: m_TrainInstances) {
    cov += inst.value(i) * inst.value(j);
   }
   cov /= m_TrainInstances.numInstances() - 1;
   m_Correlation.set(i, j, cov);
  }
 }
}
origin: nz.ac.waikato.cms.weka/weka-stable

protected void fillCovariance() throws Exception {
 // just center the data or standardize it?
 if (m_center) {
  m_centerFilter = new Center();
  m_centerFilter.setInputFormat(m_TrainInstances);
  m_TrainInstances = Filter.useFilter(m_TrainInstances, m_centerFilter);
 } else {
  m_standardizeFilter = new Standardize();
  m_standardizeFilter.setInputFormat(m_TrainInstances);
  m_TrainInstances = Filter.useFilter(m_TrainInstances, m_standardizeFilter);
 }
 // now compute the covariance matrix
 m_Correlation = new UpperSymmDenseMatrix(m_NumAttribs);
 for (int i = 0; i < m_NumAttribs; i++) {
  for (int j = i; j < m_NumAttribs; j++) {
   double cov = 0;
   for (Instance inst: m_TrainInstances) {
    cov += inst.value(i) * inst.value(j);
   }
   cov /= m_TrainInstances.numInstances() - 1;
   m_Correlation.set(i, j, cov);
  }
 }
}
origin: nz.ac.waikato.cms.weka/weka-stable

 m_centerFilter.setInputFormat(m_trainInstances);
 m_trainInstances = Filter.useFilter(m_trainInstances, m_centerFilter);
} else {
origin: Waikato/weka-trunk

 m_centerFilter.setInputFormat(m_trainInstances);
 m_trainInstances = Filter.useFilter(m_trainInstances, m_centerFilter);
} else {
weka.filters.unsupervised.attributeCentersetInputFormat

Javadoc

Sets the format of the input instances.

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
  • getInputFormat
  • input
    Input an instance for filtering. Filter requires all training instances be read before producing out
  • numPendingOutput
  • output
  • push
  • resetQueue
  • runFilter
  • resetQueue,
  • runFilter,
  • setOutputFormat,
  • setIgnoreClass

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Github Copilot alternatives
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