当前位置: 首页>>代码示例>>Java>>正文


Java Statistics.getCorrelation方法代码示例

本文整理汇总了Java中org.jfree.data.statistics.Statistics.getCorrelation方法的典型用法代码示例。如果您正苦于以下问题:Java Statistics.getCorrelation方法的具体用法?Java Statistics.getCorrelation怎么用?Java Statistics.getCorrelation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.data.statistics.Statistics的用法示例。


在下文中一共展示了Statistics.getCorrelation方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testCorrelation1

import org.jfree.data.statistics.Statistics; //导入方法依赖的package包/类
/**
 * A simple test for the correlation calculation.
 */
public void testCorrelation1() {
    final Number[] data1 = new Number[3];
    data1[0] = new Double(1);
    data1[1] = new Double(2);
    data1[2] = new Double(3);        
    final Number[] data2 = new Number[3];
    data2[0] = new Double(1);
    data2[1] = new Double(2);
    data2[2] = new Double(3);    
    final double r = Statistics.getCorrelation(data1, data2);
    assertTrue(NumberUtils.equal(r, 1.0));        
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:16,代码来源:StatisticsTests.java

示例2: testCorrelation1

import org.jfree.data.statistics.Statistics; //导入方法依赖的package包/类
/**
 * A simple test for the correlation calculation.
 */
public void testCorrelation1() {
    Number[] data1 = new Number[3];
    data1[0] = new Double(1);
    data1[1] = new Double(2);
    data1[2] = new Double(3);        
    Number[] data2 = new Number[3];
    data2[0] = new Double(1);
    data2[1] = new Double(2);
    data2[2] = new Double(3);    
    double r = Statistics.getCorrelation(data1, data2);
    assertEquals(1.0, r, 0.00000001);        
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:16,代码来源:StatisticsTests.java

示例3: testCorrelation1

import org.jfree.data.statistics.Statistics; //导入方法依赖的package包/类
/**
 * A simple test for the correlation calculation.
 */
public void testCorrelation1() {
    Number[] data1 = new Number[3];
    data1[0] = new Double(1);
    data1[1] = new Double(2);
    data1[2] = new Double(3);
    Number[] data2 = new Number[3];
    data2[0] = new Double(1);
    data2[1] = new Double(2);
    data2[2] = new Double(3);
    double r = Statistics.getCorrelation(data1, data2);
    assertEquals(1.0, r, 0.00000001);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:16,代码来源:StatisticsTests.java

示例4: testCorrelation2

import org.jfree.data.statistics.Statistics; //导入方法依赖的package包/类
/**
 * A simple test for the correlation calculation.
 * 
 * http://trochim.human.cornell.edu/kb/statcorr.htm
 */
public void testCorrelation2() {
    final Number[] data1 = new Number[20];
    data1[0] = new Double(68);
    data1[1] = new Double(71);
    data1[2] = new Double(62);        
    data1[3] = new Double(75);        
    data1[4] = new Double(58);        
    data1[5] = new Double(60);        
    data1[6] = new Double(67);        
    data1[7] = new Double(68);        
    data1[8] = new Double(71);        
    data1[9] = new Double(69);        
    data1[10] = new Double(68);        
    data1[11] = new Double(67);        
    data1[12] = new Double(63);        
    data1[13] = new Double(62);        
    data1[14] = new Double(60);        
    data1[15] = new Double(63);        
    data1[16] = new Double(65);        
    data1[17] = new Double(67);        
    data1[18] = new Double(63);        
    data1[19] = new Double(61);        
    final Number[] data2 = new Number[20];
    data2[0] = new Double(4.1);
    data2[1] = new Double(4.6);
    data2[2] = new Double(3.8);    
    data2[3] = new Double(4.4);    
    data2[4] = new Double(3.2);    
    data2[5] = new Double(3.1);    
    data2[6] = new Double(3.8);    
    data2[7] = new Double(4.1);    
    data2[8] = new Double(4.3);    
    data2[9] = new Double(3.7);    
    data2[10] = new Double(3.5);    
    data2[11] = new Double(3.2);    
    data2[12] = new Double(3.7);    
    data2[13] = new Double(3.3);    
    data2[14] = new Double(3.4);    
    data2[15] = new Double(4.0);    
    data2[16] = new Double(4.1);    
    data2[17] = new Double(3.8);    
    data2[18] = new Double(3.4);    
    data2[19] = new Double(3.6);    
    final double r = Statistics.getCorrelation(data1, data2);
    assertTrue(NumberUtils.equal(r, 0.7306356862792885));        
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:52,代码来源:StatisticsTests.java

示例5: testCorrelation2

import org.jfree.data.statistics.Statistics; //导入方法依赖的package包/类
/**
 * A simple test for the correlation calculation.
 * 
 * http://trochim.human.cornell.edu/kb/statcorr.htm
 */
public void testCorrelation2() {
    Number[] data1 = new Number[20];
    data1[0] = new Double(68);
    data1[1] = new Double(71);
    data1[2] = new Double(62);        
    data1[3] = new Double(75);        
    data1[4] = new Double(58);        
    data1[5] = new Double(60);        
    data1[6] = new Double(67);        
    data1[7] = new Double(68);        
    data1[8] = new Double(71);        
    data1[9] = new Double(69);        
    data1[10] = new Double(68);        
    data1[11] = new Double(67);        
    data1[12] = new Double(63);        
    data1[13] = new Double(62);        
    data1[14] = new Double(60);        
    data1[15] = new Double(63);        
    data1[16] = new Double(65);        
    data1[17] = new Double(67);        
    data1[18] = new Double(63);        
    data1[19] = new Double(61);        
    Number[] data2 = new Number[20];
    data2[0] = new Double(4.1);
    data2[1] = new Double(4.6);
    data2[2] = new Double(3.8);    
    data2[3] = new Double(4.4);    
    data2[4] = new Double(3.2);    
    data2[5] = new Double(3.1);    
    data2[6] = new Double(3.8);    
    data2[7] = new Double(4.1);    
    data2[8] = new Double(4.3);    
    data2[9] = new Double(3.7);    
    data2[10] = new Double(3.5);    
    data2[11] = new Double(3.2);    
    data2[12] = new Double(3.7);    
    data2[13] = new Double(3.3);    
    data2[14] = new Double(3.4);    
    data2[15] = new Double(4.0);    
    data2[16] = new Double(4.1);    
    data2[17] = new Double(3.8);    
    data2[18] = new Double(3.4);    
    data2[19] = new Double(3.6);    
    double r = Statistics.getCorrelation(data1, data2);
    assertEquals(0.7306356862792885, r, 0.000000000001);        
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:52,代码来源:StatisticsTests.java

示例6: testCorrelation2

import org.jfree.data.statistics.Statistics; //导入方法依赖的package包/类
/**
 * A simple test for the correlation calculation.
 *
 * http://trochim.human.cornell.edu/kb/statcorr.htm
 */
public void testCorrelation2() {
    Number[] data1 = new Number[20];
    data1[0] = new Double(68);
    data1[1] = new Double(71);
    data1[2] = new Double(62);
    data1[3] = new Double(75);
    data1[4] = new Double(58);
    data1[5] = new Double(60);
    data1[6] = new Double(67);
    data1[7] = new Double(68);
    data1[8] = new Double(71);
    data1[9] = new Double(69);
    data1[10] = new Double(68);
    data1[11] = new Double(67);
    data1[12] = new Double(63);
    data1[13] = new Double(62);
    data1[14] = new Double(60);
    data1[15] = new Double(63);
    data1[16] = new Double(65);
    data1[17] = new Double(67);
    data1[18] = new Double(63);
    data1[19] = new Double(61);
    Number[] data2 = new Number[20];
    data2[0] = new Double(4.1);
    data2[1] = new Double(4.6);
    data2[2] = new Double(3.8);
    data2[3] = new Double(4.4);
    data2[4] = new Double(3.2);
    data2[5] = new Double(3.1);
    data2[6] = new Double(3.8);
    data2[7] = new Double(4.1);
    data2[8] = new Double(4.3);
    data2[9] = new Double(3.7);
    data2[10] = new Double(3.5);
    data2[11] = new Double(3.2);
    data2[12] = new Double(3.7);
    data2[13] = new Double(3.3);
    data2[14] = new Double(3.4);
    data2[15] = new Double(4.0);
    data2[16] = new Double(4.1);
    data2[17] = new Double(3.8);
    data2[18] = new Double(3.4);
    data2[19] = new Double(3.6);
    double r = Statistics.getCorrelation(data1, data2);
    assertEquals(0.7306356862792885, r, 0.000000000001);
}
 
开发者ID:SpoonLabs,项目名称:astor,代码行数:52,代码来源:StatisticsTests.java


注:本文中的org.jfree.data.statistics.Statistics.getCorrelation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。