Codota Logo
PearsonCorrelation
Code IndexAdd Codota to your IDE (free)

How to use
PearsonCorrelation
in
de.tudarmstadt.ukp.dkpro.statistics.correlation

Best Java code snippets using de.tudarmstadt.ukp.dkpro.statistics.correlation.PearsonCorrelation (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: de.tudarmstadt.ukp.dkpro.statistics/dkpro-statistics-correlation

/**
 * Computes the correlation between two datasets.
 * @param list1 The first dataset as a list.
 * @param list2 The second dataset as a list.
 * @return The correlation between the two datasets.
 */
public static double computeCorrelation(final List<Double> list1, final List<Double> list2)
{
  final double[] doubleArray1 = new double[list1.size()];
  final double[] doubleArray2 = new double[list2.size()];
  int off1 = 0;
  for (final double item : list1) {
    doubleArray1[off1] = item;
    off1++;
  }
  int off2 = 0;
  for (final double item : list2) {
    doubleArray2[off2] = item;
    off2++;
  }
  final double correlation = computeCorrelation(doubleArray1, doubleArray2);
  return correlation;
}
origin: de.tudarmstadt.ukp.dkpro.statistics/de.tudarmstadt.ukp.dkpro.statistics

/**
 * Computes the correlation between two datasets.
 * @param list1 The first dataset as a list.
 * @param list2 The second dataset as a list.
 * @return The correlation between the two datasets.
 */
public static double computeCorrelation(List<Double> list1, List<Double> list2) {
  double[] doubleArray1 = new double[list1.size()];
  double[] doubleArray2 = new double[list2.size()];
  int off1 = 0;
  for (double item : list1) {
    doubleArray1[off1] = item;
    off1++;
  }
  int off2 = 0;
  for (double item : list2) {
    doubleArray2[off2] = item;
    off2++;
  }
  double correlation = computeCorrelation(doubleArray1, doubleArray2);
  return correlation;
}
origin: org.dkpro.tc/dkpro-tc-evaluation

  public static Map<String, Double> calculate(Id2Outcome id2Outcome) 
  {
    Map<String, Double> results = new HashMap<String, Double>();
    
    double[] goldstandard = id2Outcome.getGoldValues();
    double[] prediction = id2Outcome.getPredictions();
    results.put(
        PearsonCorrelation.class.getSimpleName(),
        de.tudarmstadt.ukp.dkpro.statistics.correlation.PearsonCorrelation.computeCorrelation(goldstandard, prediction)
    );
    return results; 	
  }    
}
de.tudarmstadt.ukp.dkpro.statistics.correlationPearsonCorrelation

Javadoc

Computes the correlation of two datasets.

Most used methods

  • computeCorrelation
    Computes the correlation between two datasets.

Popular in Java

  • Reactive rest calls using spring rest template
  • getResourceAsStream (ClassLoader)
  • startActivity (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
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