Package cc.mallet.types

Examples of cc.mallet.types.LabelVector


      }
    if (outputAlphabet != null) {
      labelings = new LabelVector[latticeLength];
      for (int ip = latticeLength - 2; ip >= 0; ip--) {
        assert (Math.abs(1.0 - MatrixOps.sum(outputCounts[ip])) < 0.000001);
        labelings[ip] = new LabelVector(outputAlphabet,
            outputCounts[ip]);
      }
    }
  }
View Full Code Here


      }
      MatrixOps.expNormalize(scores);
  
      entropy += Maths.getEntropy(scores);

      LabelVector lv = new LabelVector((LabelAlphabet)data.getTargetAlphabet(), scores);
      Instance instance = new Instance(data.get(ii).getData(),lv,null,null);
      dataLabeled.add(instance);
    }
   
    // train supervised
View Full Code Here

    double[] scores = new double[numClasses];
    //getClassificationScores (instance, scores);
    getClassificationScores(instance, scores);
    // Create and return a Classification object
    return new Classification (instance, this,
        new LabelVector (getLabelAlphabet(),
            scores));
  }
View Full Code Here

    double[] scores = new double[numClasses];
    //getClassificationScores (instance, scores);
    getClassificationScores(instance, scores);
    // Create and return a Classification object
    return new Classification (instance, this,
        new LabelVector (getLabelAlphabet(),
            scores));
  }
View Full Code Here

      }
    if (outputAlphabet != null) {
      labelings = new LabelVector[latticeLength];
      for (int ip = latticeLength-2; ip >= 0; ip--) {
        assert (Math.abs(1.0-MatrixOps.sum (outputCounts[ip])) < 0.000001);;
        labelings[ip] = new LabelVector (outputAlphabet, outputCounts[ip]);
      }
    }
   
    if (logger.isLoggable (Level.FINE)) {
      logger.fine("Lattice:");
View Full Code Here

      }
    if (outputAlphabet != null) {
      labelings = new LabelVector[latticeLength];
      for (int ip = latticeLength-2; ip >= 0; ip--) {
        assert (Math.abs(1.0-MatrixOps.sum (outputCounts[ip])) < 0.000001);;
        labelings[ip] = new LabelVector (outputAlphabet, outputCounts[ip]);
      }
    }

  }
View Full Code Here

      }
    if (outputAlphabet != null) {
      labelings = new LabelVector[latticeLength];
      for (int ip = latticeLength-2; ip >= 0; ip--) {
        assert (Math.abs(1.0-MatrixOps.sum (outputCounts[ip])) < 0.000001);;
        labelings[ip] = new LabelVector (outputAlphabet, outputCounts[ip]);
      }
    }
  }
View Full Code Here

    double[] scores = new double[numClasses];
    //getClassificationScores (instance, scores);
    getClassificationScoresWithTemperature (instance, DEFAULT_TEMPERATURE, scores);
    // Create and return a Classification object
    return new Classification (instance, this,
        new LabelVector (getLabelAlphabet(),
            scores));
  }
View Full Code Here

TOP

Related Classes of cc.mallet.types.LabelVector

Copyright © 2018 www.massapicom. 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.