Codota Logo
EM.estimate_priors
Code IndexAdd Codota to your IDE (free)

How to use
estimate_priors
method
in
weka.clusterers.EM

Best Java code snippets using weka.clusterers.EM.estimate_priors (Showing top 4 results out of 315)

  • Common ways to obtain EM
private void myMethod () {
EM e =
  • Codota Iconnew EM()
  • Smart code suggestions by Codota
}
origin: nz.ac.waikato.cms.weka/weka-stable

estimate_priors(inst);
origin: Waikato/weka-trunk

estimate_priors(inst);
origin: Waikato/weka-trunk

/**
 * The M step of the EM algorithm.
 * 
 * @param inst the training instances
 * @throws Exception if something goes wrong
 */
private void M(Instances inst) throws Exception {
 int i, j, l;
 new_estimators();
 estimate_priors(inst);
 // sum
 for (l = 0; l < inst.numInstances(); l++) {
  Instance in = inst.instance(l);
  for (i = 0; i < m_num_clusters; i++) {
   for (j = 0; j < m_num_attribs; j++) {
    if (inst.attribute(j).isNominal()) {
     m_model[i][j]
      .addValue(in.value(j), in.weight() * m_weights[l][i]);
    } else {
     m_modelNormal[i][j][0] += (in.value(j) * in.weight() * m_weights[l][i]);
     m_modelNormal[i][j][2] += in.weight() * m_weights[l][i];
     m_modelNormal[i][j][1] += (in.value(j) * in.value(j)
      * in.weight() * m_weights[l][i]);
    }
   }
  }
 }
 // re-estimate Gaussian parameters
 M_reEstimate(inst);
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * The M step of the EM algorithm.
 * 
 * @param inst the training instances
 * @throws Exception if something goes wrong
 */
private void M(Instances inst) throws Exception {
 int i, j, l;
 new_estimators();
 estimate_priors(inst);
 // sum
 for (l = 0; l < inst.numInstances(); l++) {
  Instance in = inst.instance(l);
  for (i = 0; i < m_num_clusters; i++) {
   for (j = 0; j < m_num_attribs; j++) {
    if (inst.attribute(j).isNominal()) {
     m_model[i][j]
      .addValue(in.value(j), in.weight() * m_weights[l][i]);
    } else {
     m_modelNormal[i][j][0] += (in.value(j) * in.weight() * m_weights[l][i]);
     m_modelNormal[i][j][2] += in.weight() * m_weights[l][i];
     m_modelNormal[i][j][1] += (in.value(j) * in.value(j)
      * in.weight() * m_weights[l][i]);
    }
   }
  }
 }
 // re-estimate Gaussian parameters
 M_reEstimate(inst);
}
weka.clusterersEMestimate_priors

Javadoc

calculate prior probabilites for the clusters

Popular methods of EM

  • <init>
    Constructor.
  • setNumClusters
    Set the number of clusters (-1 to select by CV).
  • CVClusters
    estimate the number of clusters by cross validation on the training data.
  • E
    The E step of the EM algorithm. Estimate cluster membership probabilities.
  • EM_Init
    Initialize the global aggregated estimators and storage.
  • EM_Report
    verbose output for debugging
  • M
    The M step of the EM algorithm.
  • M_reEstimate
  • buildClusterer
    Generates a clusterer. Has to initialize all fields of the clusterer that are not being set via opti
  • distributionForInstance
  • doEM
    Perform the EM algorithm
  • getCapabilities
    Returns default capabilities of the clusterer (i.e., the ones of SimpleKMeans).
  • doEM,
  • getCapabilities,
  • getMaximumNumberOfClusters,
  • getMinLogLikelihoodImprovementCV,
  • getMinLogLikelihoodImprovementIterating,
  • getMinStdDev,
  • getNumClusters,
  • getNumExecutionSlots,
  • getNumFolds

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Collectors (java.util.stream)
  • JFrame (javax.swing)
  • Join (org.hibernate.mapping)
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