Codota Logo
MathUtils.log2
Code IndexAdd Codota to your IDE (free)

How to use
log2
method
in
org.canova.api.util.MathUtils

Best Java code snippets using org.canova.api.util.MathUtils.log2 (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: jpatanooga/Canova

/**
 * This returns the entropy for a given vector of probabilities.
 * @param probabilities the probabilities to getFromOrigin the entropy for
 * @return the entropy of the given probabilities.
 */
public static double information(double[] probabilities) {
  double total = 0.0;
  for (double d : probabilities) {
    total += (-1.0 * log2(d) * d);
  }
  return total;
}//end information
origin: org.nd4j/canova-api

/**
 * This returns the entropy for a given vector of probabilities.
 *
 * @param probabilities the probabilities to getFromOrigin the entropy for
 * @return the entropy of the given probabilities.
 */
public static double information(double[] probabilities) {
 double total = 0.0;
 for (double d : probabilities) {
  total += (-1.0 * log2(d) * d);
 }
 return total;
}//end information
org.canova.api.utilMathUtilslog2

Javadoc

The natural logarithm of 2.

Popular methods of MathUtils

  • clamp
    Clamps the value to a discrete value
  • column
    This returns the given column over an n arrays
  • combination
    This returns the combination of n choose r
  • coordSplit
    This returns the coordinate split in a list of coordinates such that the values for ret[0] are the x
  • correlation
    Returns the correlation coefficient of two double vectors.
  • factorial
    This will return the factorial of the given number n.
  • gr
    Tests if a is greater than b.
  • idf
    Inverse document frequency: the total docs divided by the number of times the word appeared in a doc
  • maxIndex
    Returns index of maximum element in a given array of doubles. First maximum is returned.
  • normalize
    Normalizes the doubles in the array using the given value.
  • randomNumberBetween
    Generates a random integer between the specified numbers
  • sm
    Tests if a is smaller than b.
  • randomNumberBetween,
  • sm,
  • ssError,
  • ssReg,
  • ssTotal,
  • sum,
  • sumOfMeanDifferences,
  • sumOfMeanDifferencesOnePoint,
  • sumOfProducts

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • Collectors (java.util.stream)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now