Commit dd24534b authored by pfreon's avatar pfreon
Browse files

Cosmetic changes and addition of examples

parent fa7ffd45
Years;Production;Effort;Environment
1969; 332.4; 146.5; 4.40
1970; 285.5; 127.6; 4.32
1971; 306.7; 130.34; 4.70
1972; 537.2; 208.06; 5.63
1973; 599.4; 243.66; 5.53
1974; 692.5; 386.44; 5.76
1975; 612.9; 320.22; 5.66
1976; 809.4; 413.17; 5.79
1977; 776.0; 430.39; 5.72
1978; 764.0; 509.67; 5.21
1979; 694.7; 461.9; 4.68
1980; 702.4; 398.41; 4.98
1981; 788.7; 535.44; 5.09
1982; 688.0; 551.61; 4.86
1983; 719.7; 720.42; 4.60
1984; 677.3; 631.72; 4.67
1985; 845.03; 807.1; 5.38
1986; 958.43; 760.06; 5.44
1987; 1203.9; 1100.92; 4.92
Years;Production;Effort;Environment
1988;3245699;5804.4733;13.7147
1989;3547077;6879.7996;13.7035
1990;3714757;8303.0254;13.6588
1991;3777618;9298.6115;13.6059
1992;3361674;9943.2354;13.5635
1993;3369598;10899.044;13.5424
1994;4274793;12700.0953;13.6094
1995;4955186;14815.9562;13.6571
1996;4378844;16382.2622;13.71
1997;3597117;18294.5124;13.7788
1998;2025758;17358.9015;13.8376
1999;1423447;14945.2575;13.7296
2000;1540318;12746.5072;13.4941
2001;2527725;12722.6257;13.2694
2002;1750077;12303.0783;13.0625
2003;1797229;12668.1929;12.9803
2004;1934411;13118.9277;13.0046
2005;1754673;12811.3911;13.0665
2006;2020136;12916.3636;13.1106
2007;1996975;14499.7796;12.9665
2008;1472631;16334.2866;12.9424
2009;1283473;18127.8221;12.9076
2010;726573;18444.5405;12.8059
2011;634800;20409.3904;12.7388
2012;454746;16905.2951;12.5965
2013;353120;13832.8296;12.606
2014;410703;12137.6266;12.6158
2015;394332;11030.9689;12.8094
2016;389067;9346.6037;13.1089
2017;404845;7917.3352;13.3426
2018;526323;7150.4671;13.5004
2019;631545;6202.779;13.4947
2020;649915;5287.2457;13.3718
Years;Catches;Effort;Environment
1981;1944670;4572;13.83
1982;2371611;5217;13.92
1983;1870262;3117;13.98
1984;2686902;4933;13.47
1985;2370934;4702;13.74
1986;2072848;5056;13.63
1987;2679764;5348;14.02
1988;3245699;7234;13.47
1989;3547077;8681;13.72
1990;3714757;10474;13.46
1991;3777618;10345;13.5
1992;3361674;10350;13.54
1993;3369598;12284;13.59
1994;4274793;15830;13.9
1995;4955186;18204;13.71
1996;4378844;18102;13.76
1997;3597117;20691;13.98
1998;2025758;14215;13.92
1999;1423447;10167;12.95
2000;1540318;9680;12.76
2001;2527725;14499;12.93
2002;1750077;12592;12.76
2003;1797229;13326;13.19
2004;1934411;13405;13.3
2005;1754673;11778;13.09
2006;2020136;13435;13.1
2007;1996975;17657;12.21
2008;1472631;19424;13.24
2009;1283473;20520;12.95
2010;726573;17513;12.34
2011;634800;23604;12.72
2012;454746;9232;13.12
2013;353120;8841;12.93
2014;410703;10857;12.83
2015;394332;10689;13.53
2016;389067;7592;13.89
2017;404609;5154;13.56
2018;526323;6326;13.51
2019;631546;5280;13.19
2020;649915;4262;12.84
......@@ -125,7 +125,6 @@ public class CadreMain_AboutBox extends JDialog implements ActionListener {
jPanImage.add(imageIconeClimprod, null);
jPanImage.add(imageIconeFAO, null);
jPanImage.add(imageIconeIRD, null);
jPanAbout.add(jPanImage, BorderLayout.NORTH);
jPanAbout.add(jPanImage, BorderLayout.WEST);
jPanImage.add(jTextAreaCopyRight, null);
this.getContentPane().add(panel1, null);
......
......@@ -548,11 +548,7 @@ private void displayList(String[] liste) {
jlblBegining.setEnabled(b);
jlblEnd.setEnabled(b);
}
private void Environmentset2Enabled(boolean b) {
jcboRecrutement.setEnabled(b);
jlblRecrutement.setEnabled(b);
}
void cmdFit_actionPerformed(ActionEvent e) {
try {
MsgDialogBox msg;
......
......@@ -160,7 +160,7 @@ public class Cadre_Prediction extends JDialog implements DocumentListener {
private void renseignerTable() {
int c = year.length;
String[] title$ = {"Years ", "Obs. Catches", "Effort (E)", "Environment (V)", "Computed E", "Computed V", "Obs. C.P.U.E", "Pred. C.P.U.E"};
String[] title$ = {"Year/season ", "Obs. Catches", "Effort (E)", "Environment (V)", "Computed E", "Computed V", "Obs. CPUE", "Pred. CPUE"};
Object[][] data$ = new String[c][8];
Locale loc = new Locale("en", "US");
NumberFormat nf;
......
......@@ -9,7 +9,6 @@
package fr.ird.climprod;
import static fr.ird.climprod.Data.getNbDataRetenue;
import static fr.ird.climprod.Data.getNbYears; // Addition 2020.
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.*;
......@@ -65,7 +64,7 @@ public class Modele {
pue = Data.getPue();
res = new double[nim];
fittedpue = new double[nim];
variance_pue = Stat1.var(pue, false) * nim;
variance_pue = Stat1.var(pue, true) * nim;
//calc_var();
calcul_val_init();
double PosInfinity = Double.POSITIVE_INFINITY;
......@@ -93,14 +92,14 @@ public class Modele {
}
variance_pue = variance_pue / (double) nim; // variance_pue * nim en ligne 64...
//System.out.println("variance_pue = " + variance_pue + "; nim = " + (double) nim);
// System.out.println("variance_pue = " + variance_pue + "; nim = " + (double) nim);
sompar = sompar / (double) nim; // Résidus moyens
if (sompar > variance_pue) { // Si résidus moyens > variance des CPUE on met r à zéro + message.
sompar = variance_pue;
}
//System.out.println("sompar = " + sompar);
r = (1. - sompar / variance_pue);
// System.out.println("r = " + r + " nim = " + nim + " nbre_par = " + nbre_par);
//System.out.println("r = " + r + " sompar = " + sompar + " variance_pue = " + variance_pue);
Global.corrected_R2 = 1. - (((double)nim - 1.) / ((double)nim - (double)nbre_par)) * (1. - r); // Addition 2020
//System.out.println("Global.corrected_R2 = " + Global.corrected_R2 + " r = " + r + " nim = " + nim + " nbre_par = " + nbre_par);
//System.out.println("sompar 3 = " + sompar+" r = " + r);
......@@ -432,7 +431,7 @@ public class Modele {
inverse_gauss();
par_alors[0] = Math.exp(par_alors[0]);
break;
case 14: // CPUE=a+b.V+c.(a+b.V)^2.E
case 14: // CPUE=a+b.V+c.(a+b.V)^2.E // Modèle #22 CAPTURABILITE
nbre_par = 2;
for (k = 0; k < nim; k++) {
ptmp[0] = 1;
......@@ -884,7 +883,7 @@ public class Modele {
}
}
private static double somme_residus(double[] par) {
private static double somme_residus(double[] par) { // Somme des résidus au carré
double cc = 0;
int i;
for (i = 0; i < nim; i++) {
......@@ -938,17 +937,17 @@ public class Modele {
}
private static void calc_var() {
/*private static void calc_var() {
int i;
double s1 = 0, s2 = 0;
for (i = 0; i < nim; i++) {
s1 += pue[i];
s2 += (pue[i] * pue[i]);
}
variance_pue = s2 - (s1 * s1) / (double) nim;
variance_pue = s2 - ((s1 * s1) / (double) nim);
//System.out.println(Stat1.var(pue,false));
}
//System.out.println("variance_pue = " + variance_pue + " Stat1.var(pue,false) = " + Stat1.var(pue,false) );
}*/
private static void calc_residus() {
for (int i = 0; i < nim; i++) {
......@@ -1027,7 +1026,7 @@ public class Modele {
for (int i = 0; i < 2; i++) {
Global.residualsPlot[i].setTitreGraphique(Global.titreG[i + 17]);
Global.residualsPlot[i].setTitreX(Global.titreSx[i + 15]);
Global.residualsPlot[i].setTitreY(Global.titreSy[i + 15]);
Global.residualsPlot[i].setTitreY(Global.titreSy[i + 15]);
//System.out.println("i = " + i + " Data.stat[7][i+2] = " + Data.stat[7][i+2] + " Data.stat[6][i+2] = " + Data.stat[6][i+2] + " max = " + max);
if (Data.stat[8][i+2] >100) Global.residualsPlot[i].setDecimalsurX(0); // stat[8][i+2] = Etendue E puis V. Avant setDecimalsurX(0) -> pas de décilmale sur axe des X. Avec setDecimalsurX(1) -> décimales SI NECESSAIRE. Modif 2020.
else Global.residualsPlot[i].setDecimalsurX(2); // En compélent de autre méthode dans Plot.java. Modif 2021.
......@@ -1036,7 +1035,7 @@ public class Modele {
// surX, sur X et met ou non le minimum à zéro sur Y et sur Y
if (Data.stat[8][1] > 50) Global.residualsPlot[i].setDecimalsurY(0); // stat[8][1] = Etendue CPUE (comme substitut de résidus CPUE; 50 au lieu de 100 car résidus et valeurs positives et négartives). Avant setDecimalsurX(0) -> pas de décilmale sur axe des X. Avec setDecimalsurX(1) -> décimales SI NECESSAIRE. Modif 2020.
else Global.residualsPlot[i].setDecimalsurY(2); // Modif 2021.
//System.out.println("Data.stat[7][1] = " + Data.stat[7][1]);
//System.out.println("Data.stat[7][1] = " + Data.stat[7][1]);
Global.residualsPlot[i].ajusteExtremas(false, false, false, false); // seconde valeur boolénne changée de true en false. Modification 2020
// Cette modification évite un écrasement des valeurs de Y autours de l'axe des X.
Global.residualsPlot[i].setXcutYat(0.0d);
......@@ -1286,7 +1285,7 @@ public class Modele {
data$[nbre_par + 9][0] = "BIC ";
if ((bic < 0.001 && bic > 0) || bic > 999.999 || (bic > -1.0E-3 && bic < 0)|| bic < -999.999) data$[nbre_par +9][1] = numFormat.format(bic);
else data$[nbre_par +9][1] = nf.format(bic);
data$[nbre_par + 10][0] = "Variance ";
data$[nbre_par + 10][0] = "CPUE Variance ";
if ((variance_pue < 0.001 && variance_pue > 0)|| variance_pue > 999.999) data$[nbre_par +10][1] = numFormat.format(variance_pue);
else data$[nbre_par +10][1] = nf.format(variance_pue);
data$[nbre_par + 11][0] = "Residual Variance ";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment