Tabnine Logo
Clusterer.distributionForInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
distributionForInstance
method
in
weka.clusterers.Clusterer

Best Java code snippets using weka.clusterers.Clusterer.distributionForInstance (Showing top 6 results out of 315)

origin: nz.ac.waikato.cms.weka/distributedWekaBase

@Override
public double[] distributionForInstance(Instance inst) throws Exception {
 return m_model.distributionForInstance(inst);
}
origin: jdmp/java-data-mining-package

public Matrix predict(Matrix input, Matrix weight) throws Exception {
  double[] probabilities = null;
  Instance instance = new SampleToInstanceWrapper(input, weight, null, discrete, false);
  instance.setDataset(instances);
  probabilities = wekaClusterer.distributionForInstance(instance);
  double[][] v = new double[1][];
  v[0] = probabilities;
  DenseDoubleMatrix2D output = Matrix.Factory.linkToArray(v);
  return output;
}
origin: Waikato/weka-trunk

/**
 * Classifies a given instance after filtering.
 * 
 * @param instance the instance to be classified
 * @return the class distribution for the given instance
 * @throws Exception if instance could not be classified successfully
 */
@Override
public double[] distributionForInstance(Instance instance) throws Exception {
 if (m_Filter.numPendingOutput() > 0) {
  throw new Exception("Filter output queue not empty!");
 }
 if (!m_Filter.input(instance)) {
  throw new Exception(
   "Filter didn't make the test instance immediately available!");
 }
 m_Filter.batchFinished();
 Instance newInstance = m_Filter.output();
 return m_Clusterer.distributionForInstance(newInstance);
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Classifies a given instance after filtering.
 * 
 * @param instance the instance to be classified
 * @return the class distribution for the given instance
 * @throws Exception if instance could not be classified successfully
 */
@Override
public double[] distributionForInstance(Instance instance) throws Exception {
 if (m_Filter.numPendingOutput() > 0) {
  throw new Exception("Filter output queue not empty!");
 }
 if (!m_Filter.input(instance)) {
  throw new Exception(
   "Filter didn't make the test instance immediately available!");
 }
 m_Filter.batchFinished();
 Instance newInstance = m_Filter.output();
 return m_Clusterer.distributionForInstance(newInstance);
}
origin: Waikato/weka-trunk

 clusterer.distributionForInstance(testSet.instance(i));
for (int j = 0; j < clusterer.numberOfClusters(); j++) {
 newInstances.instance(i).setValue(testSet.numAttributes() + j,
origin: nz.ac.waikato.cms.weka/weka-stable

 clusterer.distributionForInstance(testSet.instance(i));
for (int j = 0; j < clusterer.numberOfClusters(); j++) {
 newInstances.instance(i).setValue(testSet.numAttributes() + j,
weka.clusterersClustererdistributionForInstance

Javadoc

Predicts the cluster memberships for a given instance. Either this or clusterInstance() needs to be implemented by subclasses.

Popular methods of Clusterer

  • buildClusterer
    Generates a clusterer. Has to initialize all fields of the clusterer that are not being set via opti
  • clusterInstance
    Classifies a given instance. Either this or distributionForInstance() needs to be implemented by sub
  • numberOfClusters
    Returns the number of clusters.
  • getCapabilities
    Returns the Capabilities of this clusterer. Derived classifiers have to override this method to enab

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • String (java.lang)
  • Path (java.nio.file)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • 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