當前位置: 首頁>>代碼示例>>Java>>正文


Java TTestSignificanceTestResult類代碼示例

本文整理匯總了Java中com.rapidminer.operator.validation.significance.TTestSignificanceTestOperator.TTestSignificanceTestResult的典型用法代碼示例。如果您正苦於以下問題:Java TTestSignificanceTestResult類的具體用法?Java TTestSignificanceTestResult怎麽用?Java TTestSignificanceTestResult使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TTestSignificanceTestResult類屬於com.rapidminer.operator.validation.significance.TTestSignificanceTestOperator包,在下文中一共展示了TTestSignificanceTestResult類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getVisualizationComponent

import com.rapidminer.operator.validation.significance.TTestSignificanceTestOperator.TTestSignificanceTestResult; //導入依賴的package包/類
@Override
public Component getVisualizationComponent(Object renderable, IOContainer ioContainer) {
	TTestSignificanceTestResult result = (TTestSignificanceTestResult) renderable;

	PerformanceVector[] allVectors = result.getAllVectors();
	StringBuffer buffer = new StringBuffer();
	Color bgColor = SwingTools.LIGHTEST_YELLOW;
	String bgColorString = Integer.toHexString(bgColor.getRed()) + Integer.toHexString(bgColor.getGreen()) + Integer.toHexString(bgColor.getBlue());

	buffer.append("<table bgcolor=\""+bgColorString+"\" border=\"1\">");
	buffer.append("<tr><td></td>");
	for (int i = 0; i < result.getAllVectors().length; i++) {
		buffer.append("<td>" + Tools.formatNumber(allVectors[i].getMainCriterion().getAverage()) + " +/- " + Tools.formatNumber(Math.sqrt(allVectors[i].getMainCriterion().getVariance())) + "</td>");
	}
	buffer.append("</tr>");
	for (int i = 0; i < allVectors.length; i++) {
		buffer.append("<tr><td>" + Tools.formatNumber(allVectors[i].getMainCriterion().getAverage()) + " +/- " + Tools.formatNumber(Math.sqrt(allVectors[i].getMainCriterion().getVariance())) + "</td>");
		for (int j = 0; j < allVectors.length; j++) {
			buffer.append("<td>");
			if (!Double.isNaN(result.getProbMatrix()[i][j])) {
				double prob = result.getProbMatrix()[i][j];
				if (prob < result.getAlpha()) {
					buffer.append("<b>");
				}
				buffer.append(Tools.formatNumber(prob));
				if (prob < result.getAlpha()) {
					buffer.append("</b>");
				}
			}
			buffer.append("</td>");
		}
		buffer.append("</tr>");
	}
	buffer.append("</table>");
	buffer.append("<br>Probabilities for random values with the same result.<br>Bold values are smaller than alpha=" + Tools.formatNumber(result.getAlpha()) + " which indicates a probably significant difference between the actual mean values!");

	JEditorPane textPane = new ExtendedHTMLJEditorPane("text/html", "<html><h1>" + getName() + "</h1>" + buffer.toString() + "</html>");
	textPane.setBackground((new JLabel()).getBackground());
	textPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(11, 11, 11, 11));
	textPane.setEditable(false);
	return new ExtendedJScrollPane(textPane);
}
 
開發者ID:rapidminer,項目名稱:rapidminer-5,代碼行數:43,代碼來源:TTestSignificanceTestRenderer.java


注:本文中的com.rapidminer.operator.validation.significance.TTestSignificanceTestOperator.TTestSignificanceTestResult類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。