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
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • 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