[Schmitzm-commits] r1014 - in trunk/src/schmitzm/jfree: . resource/locales

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Sep 17 16:03:10 CEST 2010


Author: alfonx
Date: 2010-09-17 16:03:09 +0200 (Fri, 17 Sep 2010)
New Revision: 1014

Modified:
   trunk/src/schmitzm/jfree/JFreeChartUtil.java
   trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties
   trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties
Log:
Die Interpretationen des PMKK-Korrelationskoeffizienten verbessert, so dass ein negatives r auch als negativer Zusammenhang interpretiert wird.

Modified: trunk/src/schmitzm/jfree/JFreeChartUtil.java
===================================================================
--- trunk/src/schmitzm/jfree/JFreeChartUtil.java	2010-09-17 12:51:51 UTC (rev 1013)
+++ trunk/src/schmitzm/jfree/JFreeChartUtil.java	2010-09-17 14:03:09 UTC (rev 1014)
@@ -1045,25 +1045,33 @@
 
 			double r = coefficients[2];
 			double rAbs = Math.abs(r);
-			seriesKey += ", r=" + DecimalFormat.getInstance().format(r);
+			String negative = r < 0 ? ".neg" : "";
+			String rFormatted = DecimalFormat.getInstance().format(r);
+			if (rFormatted.startsWith("0"))
+				rFormatted = rFormatted.substring(1);
+			
+			if (rFormatted.startsWith("-0"))
+				rFormatted = "-"+rFormatted.substring(2);
+			
+			seriesKey += ", r=" + rFormatted;
 
 			// Depending on the quality of the regression, we add a note
 			// (c) LAUX
 			if (rAbs < 0.01) {
 				seriesKey += " (" + RESOURCE.getString("regression.none") + ")";
 			} else if (rAbs < 0.5) {
-				seriesKey += " (" + RESOURCE.getString("regression.weak") + ")";
+				seriesKey += " (" + RESOURCE.getString("regression.weak"+negative) + ")";
 			} else if (rAbs < 0.7) {
-				seriesKey += " (" + RESOURCE.getString("regression.medium")
+				seriesKey += " (" + RESOURCE.getString("regression.medium"+negative)
 						+ ")";
 			} else if (rAbs < 0.86) {
-				seriesKey += " (" + RESOURCE.getString("regression.strong")
+				seriesKey += " (" + RESOURCE.getString("regression.strong"+negative)
 						+ ")";
 			} else if (rAbs < 1.) {
-				seriesKey += " (" + RESOURCE.getString("regression.verystrong")
+				seriesKey += " (" + RESOURCE.getString("regression.verystrong"+negative)
 						+ ")";
 			} else
-				seriesKey += " (" + RESOURCE.getString("regression.total") + ")";
+				seriesKey += " (" + RESOURCE.getString("regression.total"+negative) + ")";
 
 			Function2D curve = new LineFunction2D(coefficients[0],
 					coefficients[1]);

Modified: trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties
===================================================================
--- trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties	2010-09-17 12:51:51 UTC (rev 1013)
+++ trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties	2010-09-17 14:03:09 UTC (rev 1014)
@@ -86,6 +86,12 @@
 regression.verystrong=very strong relation
 regression.total=perfect relation
 
+regression.weak.neg=weak negative relation
+regression.medium.neg=medium negative relation
+regression.strong.neg=strong negative relation
+regression.verystrong.neg=very strong negative relation
+regression.total.neg=perfect negative relation
+
 regressionline.tooltip=<html><i>r</i> is the product-moment-correlation coefficient and gives information about how strong the variables are related.</html>
 
 Exception.noWeightAttributeDefinedforAWeightedAggregation=A weighted AggregationFunction is selected, but not artribute for weighting is selected.

Modified: trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties
===================================================================
--- trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties	2010-09-17 12:51:51 UTC (rev 1013)
+++ trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties	2010-09-17 14:03:09 UTC (rev 1014)
@@ -85,6 +85,12 @@
 regression.verystrong=sehr starker Zusammenhang
 regression.total=vollkommener Zusammenhang
 
+regression.weak.neg=schwacher negativer Zusammenhang
+regression.medium.neg=mittlerer negativer Zusammenhang
+regression.strong.neg=starker negativer Zusammenhang
+regression.verystrong.neg=sehr starker negativer Zusammenhang
+regression.total.neg=vollkommener negativer Zusammenhang
+
 regressionline.tooltip=<html><i>r</i> ist der Produktmomentkorrelationskoefizient und sagt aus, wie stark zwei Variablen voneinander abh\u00E4ngen. 
 Exception.noWeightAttributeDefinedforAWeightedAggregation=Eine gewichtete Aggregierungsfunktion ist ausgew\u00E4hlt, aber kein Attribut f\u00FCr die Gewichtung.
 



More information about the Schmitzm-commits mailing list