Package cc.mallet.types

Examples of cc.mallet.types.FeatureVector.dotProduct()


            // which is the number of counts for the document if we use that as input
            double Ncounts = MatrixOps.sum(fv);

            // CPAL - get the additional term for the value of our - log probability
            //      - this computation amounts to the dot product of the feature vector and the probability vector
            cachedValue -= (instanceWeight * fv.dotProduct(lprobs[li]));

            // CPAL - get the model expectation over features for the given class
            for (int fi = 0; fi < numFeatures; fi++) {

              //if(parameters[numFeatures*li + fi] != 0) {
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.