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

How to use
M_reEstimate
method
in
weka.clusterers.EM

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

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

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

M_reEstimate(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.clusterersEMM_reEstimate

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.
  • 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
  • estimate_priors
    calculate prior probabilites for the clusters
  • getCapabilities
    Returns default capabilities of the clusterer (i.e., the ones of SimpleKMeans).
  • estimate_priors,
  • getCapabilities,
  • getMaximumNumberOfClusters,
  • getMinLogLikelihoodImprovementCV,
  • getMinLogLikelihoodImprovementIterating,
  • getMinStdDev,
  • getNumClusters,
  • getNumExecutionSlots,
  • getNumFolds

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • 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
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JComboBox (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top 12 Jupyter Notebook extensions
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