Tabnine Logo
PearsonCorrelation
Code IndexAdd Tabnine 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)

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

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top 12 Jupyter Notebook extensions
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