Examples of FastVector


Examples of weka.core.FastVector

    FastVector m_posX;

    FastVector m_posY;

    alignAction(FastVector nodes) {
      m_nodes = new FastVector(nodes.size());
      m_posX = new FastVector(nodes.size());
      m_posY = new FastVector(nodes.size());
      for (int iNode = 0; iNode < nodes.size(); iNode++) {
        int nNode = (Integer) nodes.elementAt(iNode);
        m_nodes.addElement(nNode);
        m_posX.addElement(getPositionX(nNode));
        m_posY.addElement(getPositionY(nNode));
View Full Code Here

Examples of weka.core.FastVector

    FastVector m_nodes;
    int m_dX;
    int m_dY;

    SetGroupPositionAction(FastVector nodes, int dX, int dY) {
      m_nodes = new FastVector(nodes.size());
      for (int iNode = 0; iNode < nodes.size(); iNode++) {
        m_nodes.addElement(nodes.elementAt(iNode));
      }
      m_dX = dX;
      m_dY = dY;
View Full Code Here

Examples of weka.core.FastVector

    FastVector m_nPosY;
    FastVector m_nPosX2;
    FastVector m_nPosY2;

    LayoutGraphAction(FastVector nPosX, FastVector nPosY) {
      m_nPosX = new FastVector(nPosX.size());
      m_nPosY = new FastVector(nPosX.size());
      m_nPosX2 = new FastVector(nPosX.size());
      m_nPosY2 = new FastVector(nPosX.size());
      for (int iNode = 0; iNode < nPosX.size(); iNode++) {
        m_nPosX.addElement(m_nPositionX.elementAt(iNode));
        m_nPosY.addElement(m_nPositionY.elementAt(iNode));
        m_nPosX2.addElement(nPosX.elementAt(iNode));
        m_nPosY2.addElement(nPosY.elementAt(iNode));
View Full Code Here

Examples of weka.core.FastVector

   *
   * @return the header
   */
  private Instances makeHeader() {

    FastVector fv = new FastVector();
    fv.addElement(new Attribute(TRUE_POS_NAME));
    fv.addElement(new Attribute(FALSE_NEG_NAME));
    fv.addElement(new Attribute(FALSE_POS_NAME));
    fv.addElement(new Attribute(TRUE_NEG_NAME));
    fv.addElement(new Attribute(FP_RATE_NAME));
    fv.addElement(new Attribute(TP_RATE_NAME));
    fv.addElement(new Attribute(PRECISION_NAME));
    fv.addElement(new Attribute(RECALL_NAME));
    fv.addElement(new Attribute(FALLOUT_NAME));
    fv.addElement(new Attribute(FMEASURE_NAME));
    fv.addElement(new Attribute(SAMPLE_SIZE_NAME));
    fv.addElement(new Attribute(LIFT_NAME));
    fv.addElement(new Attribute(THRESHOLD_NAME));     
    return new Instances(RELATION_NAME, fv, 100);
  }
View Full Code Here

Examples of weka.core.FastVector

      } else {
        inst.setClassIndex(inst.numAttributes() - 1);
        ThresholdCurve tc = new ThresholdCurve();
        EvaluationUtils eu = new EvaluationUtils();
        Classifier classifier = new weka.classifiers.functions.Logistic();
        FastVector predictions = new FastVector();
        for (int i = 0; i < 2; i++) { // Do two runs.
          eu.setSeed(i);
          predictions.appendElements(eu.getCVPredictions(classifier, inst, 10));
          //System.out.println("\n\n\n");
        }
        Instances result = tc.getCurve(predictions);
        System.out.println(result);
      }
View Full Code Here

Examples of weka.core.FastVector

  protected FastVector m_nEvidence;

  /** standard constructor * */
  public EditableBayesNet() {
    super();
    m_nEvidence = new FastVector(0);
    m_fMarginP = new FastVector(0);
    m_nPositionX = new FastVector();
    m_nPositionY = new FastVector();
    clearUndoStack();
  } // c'tor
View Full Code Here

Examples of weka.core.FastVector

    for (int iNode = 0; iNode < nNodes; iNode++) {
      m_Distributions[iNode] = new Estimator[1];
      m_Distributions[iNode][0] = new DiscreteEstimatorBayes(getCardinality(iNode), 0.5);
    }

    m_nEvidence = new FastVector(nNodes);
    for (int i = 0; i < nNodes; i++) {
      m_nEvidence.addElement(-1);
    }
    m_fMarginP = new FastVector(nNodes);
    for (int i = 0; i < nNodes; i++) {
      double[] P = new double[getCardinality(i)];
      m_fMarginP.addElement(P);
    }

    m_nPositionX = new FastVector(nNodes);
    m_nPositionY = new FastVector(nNodes);
    for (int iNode = 0; iNode < nNodes; iNode++) {
      m_nPositionX.addElement(iNode%10 * 50);
      m_nPositionY.addElement(((int)(iNode/10)) * 50);
    }

 
View Full Code Here

Examples of weka.core.FastVector

    m_Instances = other.m_Instances;
    m_ParentSets = other.getParentSets();
    m_Distributions = other.getDistributions();

    int nNodes = getNrOfNodes();
    m_nPositionX = new FastVector(nNodes);
    m_nPositionY = new FastVector(nNodes);
    for (int i = 0; i < nNodes; i++) {
      m_nPositionX.addElement(other.m_nPositionX[i]);
      m_nPositionY.addElement(other.m_nPositionY[i]);
    }
    m_nEvidence = new FastVector(nNodes);
    for (int i = 0; i < nNodes; i++) {
      m_nEvidence.addElement(-1);
    }
    m_fMarginP = new FastVector(nNodes);
    for (int i = 0; i < nNodes; i++) {
      double[] P = new double[getCardinality(i)];
      m_fMarginP.addElement(P);
    }
    clearUndoStack();
View Full Code Here

Examples of weka.core.FastVector

   * @param bSetInstances
   *            flag indicating whether to initialize instances or not
   */
  public EditableBayesNet(boolean bSetInstances) {
    super();
    m_nEvidence = new FastVector(0);
    m_fMarginP = new FastVector(0);
    m_nPositionX = new FastVector();
    m_nPositionY = new FastVector();
    clearUndoStack();
    if (bSetInstances) {
      m_Instances = new Instances("New Network", new FastVector(0), 0);
    }
  } // c'tor
View Full Code Here

Examples of weka.core.FastVector

    if (getNode2(sName) >= 0) {
      addNode(sName + "x", nCardinality);
      return ;
    }
    // update instances
    FastVector values = new FastVector(nCardinality);
    for (int iValue = 0; iValue < nCardinality; iValue++) {
      values.addElement("Value" + (iValue + 1));
    }
    Attribute att = new Attribute(sName, values);
    m_Instances.insertAttributeAt(att, m_Instances.numAttributes());
    int nAtts = m_Instances.numAttributes();
    // update parentsets
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.