congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MathUtils.gr
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.nd4j/canova-api

/**
 * Returns the log-odds for a given probability.
 *
 * @param prob the probability
 * @return the log-odds after the probability has been mapped to
 * [Utils.SMALL, 1-Utils.SMALL]
 */
public static /*@pure@*/ double probToLogOdds(double prob) {
 if (gr(prob, 1) || (sm(prob, 0))) {
  throw new IllegalArgumentException("probToLogOdds: probability must " +
    "be in [0,1] " + prob);
 }
 double p = SMALL + (1.0 - 2 * SMALL) * prob;
 return Math.log(p / (1 - p));
}
origin: jpatanooga/Canova

/**
 * Returns the log-odds for a given probability.
 *
 * @param prob the probability
 *
 * @return the log-odds after the probability has been mapped to
 * [Utils.SMALL, 1-Utils.SMALL]
 */
public static /*@pure@*/ double probToLogOdds(double prob) {
  if (gr(prob, 1) || (sm(prob, 0))) {
    throw new IllegalArgumentException("probToLogOdds: probability must " +
        "be in [0,1] "+prob);
  }
  double p = SMALL + (1.0 - 2 * SMALL) * prob;
  return Math.log(p / (1 - p));
}
org.canova.api.utilMathUtilsgr

Javadoc

Tests if a is greater than b.

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.
  • idf
    Inverse document frequency: the total docs divided by the number of times the word appeared in a doc
  • log2
    Returns the logarithm of a for base 2.
  • 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

  • Making http requests using okhttp
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • getSharedPreferences (Context)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Reference (javax.naming)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now