Package cc.mallet.util

Examples of cc.mallet.util.Timing.elapsedTime()


      for (int fi = 0; fi < baseFg.factors().size(); fi++) {
        fg.multiplyBy (baseFg.getFactor (fi));
      }
      assertEquals (val, fg.logValue (assn), 1e-5);
    }
    long time1 = timing.elapsedTime ();
    timing.tick ("No-expansion time");

    for (int rep = 0; rep < numReps; rep++) {
      FactorGraph fg = new FactorGraph ();
      for (int fi = 0; fi < baseFg.factors().size(); fi++) {
View Full Code Here


      for (int fi = 0; fi < baseFg.factors().size(); fi++) {
        fg.multiplyBy (baseFg.getFactor (fi));
      }
      assertEquals (val, fg.logValue (assn), 1e-5);
    }
    long time2 = timing.elapsedTime ();
    timing.tick ("With-expansion time");

    assertTrue (time1 < time2);
  }
View Full Code Here

        }
      }

      int observedVal = observations.get (target);

      timePerCvgaCall += timing.elapsedTime ();

      return vals[observedVal] - logZ;
    }

    private double computeLogFactorValue (Assignment cliqueAssn, ACRF.Template tmpl, FeatureVector fv)
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.