Examples of meanOrMode()


Examples of weka.core.Instances.meanOrMode()

    double[] distribution = new double[2];
    Instances exi = ex.relationalValue(1);
    double[] n = new double[m_Dimension];
    double[] xBar = new double[m_Dimension];
    for (int i = 0; i < exi.numAttributes() ; i++)
      xBar[i] = exi.meanOrMode(i);
   
    for (int w = 0, t = 0; w < m_Dimension; w++, t++){
      for (int u = 0; u < exi.numInstances(); u++)
  if (!exi.instance(u).isMissing(t))
    n[w] += exi.instance(u).weight();
View Full Code Here

Examples of weka.core.Instances.meanOrMode()

        Instances pxi =  px.getInstances();
        */

      Instances pxi =  pos.instance(v).relationalValue(1);
      for (int k=0; k<pxi.numAttributes(); k++) {
        m_MeanP[v][k] = pxi.meanOrMode(k);
        m_VarianceP[v][k] = pxi.variance(k);
      }

      for (int w=0,t=0; w < m_Dimension; w++,t++){   
        //if((t==m_ClassIndex) || (t==m_IdIndex))
View Full Code Here

Examples of weka.core.Instances.meanOrMode()

        m_VarianceN[v] = nx.variance();
        Instances nxi =  nx.getInstances();
        */
      Instances nxi =  neg.instance(v).relationalValue(1);
      for (int k=0; k<nxi.numAttributes(); k++) {
        m_MeanN[v][k] = nxi.meanOrMode(k);
        m_VarianceN[v][k] = nxi.variance(k);
      }

      for (int w=0,t=0; w < m_Dimension; w++,t++){   
        //if((t==m_ClassIndex) || (t==m_IdIndex))
View Full Code Here

Examples of weka.core.Instances.meanOrMode()

    Instances exi = ex.relationalValue(1);
    double[] n = new double[m_Dimension];
    double [] xBar = new double[m_Dimension];
    double [] sSq = new double[m_Dimension];
    for (int i=0; i<exi.numAttributes() ; i++){
      xBar[i] = exi.meanOrMode(i);
      sSq[i] = exi.variance(i);
    }

    for (int w=0, t=0; w < m_Dimension; w++, t++){
      //if((t==m_ClassIndex) || (t==m_IdIndex))
View Full Code Here

Examples of weka.core.Instances.meanOrMode()

      m_Means = new double[input.numAttributes()];
      m_StdDevs = new double[input.numAttributes()];
      for (int i = 0; i < input.numAttributes(); i++) {
  if (input.attribute(i).isNumeric() &&
      (input.classIndex() != i)) {
    m_Means[i] = input.meanOrMode(i);
    m_StdDevs[i] = Math.sqrt(input.variance(i));
  }
      }

      // Convert pending input instances
View Full Code Here

Examples of weka.core.Instances.meanOrMode()

      Instances input = getInputFormat();
      m_Means = new double[input.numAttributes()];
      for (int i = 0; i < input.numAttributes(); i++) {
  if (input.attribute(i).isNumeric() &&
      (input.classIndex() != i)) {
    m_Means[i] = input.meanOrMode(i);
  }
      }

      // Convert pending input instances
      for (int i = 0; i < input.numInstances(); i++)
View Full Code Here

Examples of weka.core.Instances.meanOrMode()

      m_Means = new double[input.numAttributes()];
      m_StdDevs = new double[input.numAttributes()];
      for (int i = 0; i < input.numAttributes(); i++) {
  if (input.attribute(i).isNumeric() &&
      (input.classIndex() != i)) {
    m_Means[i] = input.meanOrMode(i);
    m_StdDevs[i] = Math.sqrt(input.variance(i));
  }
      }

      // Convert pending input instances
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.