91 for(i=0; i<max_nVar_;++i)
fVarn_1.xmin[i] = 0;
96 for(i=0; i<max_nNodes_;++i)
fDel_1.coef[i] = 0;
97 for(i=0; i<max_nLayers_*max_nNodes_;++i)
fDel_1.del[i] = 0;
98 for(i=0; i<max_nLayers_*max_nNodes_*max_nNodes_;++i)
fDel_1.delta[i] = 0;
99 for(i=0; i<max_nLayers_*max_nNodes_*max_nNodes_;++i)
fDel_1.delw[i] = 0;
100 for(i=0; i<max_nLayers_*max_nNodes_;++i)
fDel_1.delww[i] = 0;
104 for(i=0; i<max_nLayers_;++i)
fDel_1.temp[i] = 0;
106 for(i=0; i<max_nNodes_;++i)
fNeur_1.cut[i] = 0;
107 for(i=0; i<max_nLayers_*max_nNodes_;++i)
fNeur_1.deltaww[i] = 0;
108 for(i=0; i<max_nLayers_;++i)
fNeur_1.neuron[i] = 0;
109 for(i=0; i<max_nNodes_;++i)
fNeur_1.o[i] = 0;
110 for(i=0; i<max_nLayers_*max_nNodes_*max_nNodes_;++i)
fNeur_1.w[i] = 0;
111 for(i=0; i<max_nLayers_*max_nNodes_;++i)
fNeur_1.ww[i] = 0;
112 for(i=0; i<max_nLayers_*max_nNodes_;++i)
fNeur_1.x[i] = 0;
113 for(i=0; i<max_nLayers_*max_nNodes_;++i)
fNeur_1.y[i] = 0;
135 for(i=0; i<max_Events_;++i)
fVarn_1.mclass[i] = 0;
136 for(i=0; i<max_Events_;++i)
fVarn_1.nclass[i] = 0;
137 for(i=0; i<max_nVar_;++i)
fVarn_1.xmax[i] = 0;
158 if (*ntrain + *ntest > max_Events_) {
159 printf(
"*** CFMlpANN_f2c: Warning in Train_nn: number of training + testing" \
160 " events exceeds hardcoded maximum - reset to maximum allowed number");
161 *ntrain = *ntrain*(max_Events_/(*ntrain + *ntest));
162 *ntest = *ntest *(max_Events_/(*ntrain + *ntest));
164 if (*nvar2 > max_nVar_) {
165 printf(
"*** CFMlpANN_f2c: ERROR in Train_nn: number of variables" \
166 " exceeds hardcoded maximum ==> abort");
169 if (*nlayer > max_nLayers_) {
170 printf(
"*** CFMlpANN_f2c: Warning in Train_nn: number of layers" \
171 " exceeds hardcoded maximum - reset to maximum allowed number");
172 *nlayer = max_nLayers_;
174 if (*nodes > max_nNodes_) {
175 printf(
"*** CFMlpANN_f2c: Warning in Train_nn: number of nodes" \
176 " exceeds hardcoded maximum - reset to maximum allowed number");
177 *nodes = max_nNodes_;
181 fVarn2_1.Create( *ntrain + *ntest, *nvar2 );
182 fVarn3_1.Create( *ntrain + *ntest, *nvar2 );
187 Entree_new(nvar2, det, ntrain, ntest, nlayer, nodes, ncycle, (
Int_t)20);
188 if (fNeur_1.neuron[fParam_1.layerm - 1] == 1) {
194 fParam_1.lclass = fNeur_1.neuron[fParam_1.layerm - 1];
196 fParam_1.nvar = fNeur_1.neuron[0];
198 Innit(det, tout2, tin2, (
Int_t)20);
214 Int_t rewrite, i__, j, ncoef;
215 Int_t ntemp, num, retrain;
222 fCost_1.ancout = 1e30;
227 for (i__ = 1; i__ <= max_nNodes_; ++i__) {
228 fDel_1.coef[i__ - 1] = (
Float_t)0.;
230 for (i__ = 1; i__ <= max_nLayers_; ++i__) {
231 fDel_1.temp[i__ - 1] = (
Float_t)0.;
233 fParam_1.layerm = *numlayer;
234 if (fParam_1.layerm > max_nLayers_) {
235 printf(
"Error: number of layers exceeds maximum: %i, %i ==> abort",
236 fParam_1.layerm, max_nLayers_ );
237 Arret(
"modification of mlpl3_param_lim.inc is needed ");
239 fParam_1.nevl = *ntrain;
240 fParam_1.nevt = *ntest;
241 fParam_1.nblearn = *numcycle;
243 fParam_1.nunilec = 10;
244 fParam_1.epsmin = 1
e-10;
245 fParam_1.epsmax = 1
e-4;
247 fCost_1.tolcou = 1
e-6;
249 fParam_1.nunisor = 30;
250 fParam_1.nunishort = 48;
253 ULog() << kINFO <<
"Total number of events for training: " << fParam_1.nevl <<
Endl;
254 ULog() << kINFO <<
"Total number of training cycles : " << fParam_1.nblearn <<
Endl;
255 if (fParam_1.nevl > max_Events_) {
256 printf(
"Error: number of learning events exceeds maximum: %i, %i ==> abort",
257 fParam_1.nevl, max_Events_ );
258 Arret(
"modification of mlpl3_param_lim.inc is needed ");
260 if (fParam_1.nevt > max_Events_) {
261 printf(
"Error: number of testing events exceeds maximum: %i, %i ==> abort",
262 fParam_1.nevt, max_Events_ );
263 Arret(
"modification of mlpl3_param_lim.inc is needed ");
265 i__1 = fParam_1.layerm;
266 for (j = 1; j <= i__1; ++j) {
271 if (j == fParam_1.layerm && num != 2) {
274 fNeur_1.neuron[j - 1] = num;
276 i__1 = fParam_1.layerm;
277 for (j = 1; j <= i__1; ++j) {
278 ULog() << kINFO <<
"Number of layers for neuron(" << j <<
"): " << fNeur_1.neuron[j - 1] <<
Endl;
280 if (fNeur_1.neuron[fParam_1.layerm - 1] != 2) {
281 printf(
"Error: wrong number of classes at output layer: %i != 2 ==> abort\n",
282 fNeur_1.neuron[fParam_1.layerm - 1]);
285 i__1 = fNeur_1.neuron[fParam_1.layerm - 1];
286 for (j = 1; j <= i__1; ++j) {
287 fDel_1.coef[j - 1] = 1.;
289 i__1 = fParam_1.layerm;
290 for (j = 1; j <= i__1; ++j) {
291 fDel_1.temp[j - 1] = 1.;
293 fParam_1.ichoi = retrain;
294 fParam_1.ndivis = rewrite;
296 if (! (fParam_1.ichoi == 0 || fParam_1.ichoi == 1)) {
297 printf(
"Big troubles !!! \n" );
298 Arret(
"new training or continued one !");
300 if (fParam_1.ichoi == 0) {
301 ULog() << kINFO <<
"New training will be performed" <<
Endl;
304 printf(
"%s: New training will be continued from a weight file\n", fg_MethodName);
308 for (i__ = 1; i__ <= max_nNodes_; ++i__) {
309 if (fDel_1.coef[i__ - 1] != (
Float_t)0.) {
313 for (i__ = 1; i__ <= max_nLayers_; ++i__) {
314 if (fDel_1.temp[i__ - 1] != (
Float_t)0.) {
318 if (ncoef != fNeur_1.neuron[fParam_1.layerm - 1]) {
319 Arret(
" entree error code 1 : need to reported");
321 if (ntemp != fParam_1.layerm) {
322 Arret(
"entree error code 2 : need to reported");
326#define w_ref(a_1,a_2,a_3) fNeur_1.w[((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]
327#define ww_ref(a_1,a_2) fNeur_1.ww[(a_2)*max_nLayers_ + a_1 - 7]
334 Int_t i__1, i__2, i__3;
338 i__1 = fParam_1.layerm;
339 for (layer = 2; layer <= i__1; ++layer) {
340 i__2 = fNeur_1.neuron[layer - 2];
341 for (i__ = 1; i__ <= i__2; ++i__) {
342 i__3 = fNeur_1.neuron[layer - 1];
343 for (j = 1; j <= i__3; ++j) {
344 w_ref(layer, j, i__) = (Sen3a() * 2. - 1.) * .2;
345 ww_ref(layer, j) = (Sen3a() * 2. - 1.) * .2;
354#define xeev_ref(a_1,a_2) fVarn2_1(a_1,a_2)
355#define w_ref(a_1,a_2,a_3) fNeur_1.w[((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]
356#define x_ref(a_1,a_2) fNeur_1.x[(a_2)*max_nLayers_ + a_1 - 7]
357#define y_ref(a_1,a_2) fNeur_1.y[(a_2)*max_nLayers_ + a_1 - 7]
358#define ww_ref(a_1,a_2) fNeur_1.ww[(a_2)*max_nLayers_ + a_1 - 7]
365 Int_t i__1, i__2, i__3;
371 i__1 = fNeur_1.neuron[0];
372 for (i__ = 1; i__ <= i__1; ++i__) {
375 i__1 = fParam_1.layerm - 1;
376 for (layer = 1; layer <= i__1; ++layer) {
377 i__2 = fNeur_1.neuron[layer];
378 for (j = 1; j <= i__2; ++j) {
379 x_ref(layer + 1, j) = 0.;
380 i__3 = fNeur_1.neuron[layer - 1];
381 for (i__ = 1; i__ <= i__3; ++i__) {
383 *
w_ref(layer + 1, j, i__) );
387 Foncf(&i__3, &
x_ref(layer + 1, j), &
f);
399#define xeev_ref(a_1,a_2) fVarn2_1(a_1,a_2)
409 Int_t nocla[max_nNodes_], ikend;
413 i__1 = fParam_1.lclass;
414 for (k = 1; k <= i__1; ++k) {
417 i__1 = fParam_1.nvar;
418 for (i__ = 1; i__ <= i__1; ++i__) {
419 fVarn_1.xmin[i__ - 1] = 1e30;
420 fVarn_1.xmax[i__ - 1] = -fVarn_1.xmin[i__ - 1];
422 i__1 = fParam_1.nevl;
423 for (i__ = 1; i__ <= i__1; ++i__) {
424 DataInterface(tout2, tin2, &fg_100, &fg_0, &fParam_1.nevl, &fParam_1.nvar,
425 xpg, &fVarn_1.nclass[i__ - 1], &ikend);
430 CollectVar(&fParam_1.nvar, &fVarn_1.nclass[i__ - 1], xpg);
432 i__2 = fParam_1.nvar;
433 for (j = 1; j <= i__2; ++j) {
436 if (fVarn_1.iclass == 1) {
437 i__2 = fParam_1.lclass;
438 for (k = 1; k <= i__2; ++k) {
439 if (fVarn_1.nclass[i__ - 1] == k) {
444 i__2 = fParam_1.nvar;
445 for (k = 1; k <= i__2; ++k) {
446 if (
xeev_ref(i__, k) < fVarn_1.xmin[k - 1]) {
447 fVarn_1.xmin[k - 1] =
xeev_ref(i__, k);
449 if (
xeev_ref(i__, k) > fVarn_1.xmax[k - 1]) {
450 fVarn_1.xmax[k - 1] =
xeev_ref(i__, k);
455 if (fVarn_1.iclass == 1) {
456 i__2 = fParam_1.lclass;
457 for (k = 1; k <= i__2; ++k) {
458 i__1 = fParam_1.lclass;
459 for (
l = 1;
l <= i__1; ++
l) {
460 if (nocla[k - 1] != nocla[
l - 1]) {
466 i__1 = fParam_1.nevl;
467 for (i__ = 1; i__ <= i__1; ++i__) {
468 i__2 = fParam_1.nvar;
469 for (
l = 1;
l <= i__2; ++
l) {
470 if (fVarn_1.xmax[
l - 1] == (
Float_t)0. && fVarn_1.xmin[
l - 1] == (
476 fVarn_1.xmin[
l - 1]) / 2.;
478 fVarn_1.xmin[
l - 1]) / 2.);
486#define delw_ref(a_1,a_2,a_3) fDel_1.delw[((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]
487#define w_ref(a_1,a_2,a_3) fNeur_1.w[((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]
488#define x_ref(a_1,a_2) fNeur_1.x[(a_2)*max_nLayers_ + a_1 - 7]
489#define y_ref(a_1,a_2) fNeur_1.y[(a_2)*max_nLayers_ + a_1 - 7]
490#define delta_ref(a_1,a_2,a_3) fDel_1.delta[((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]
491#define delww_ref(a_1,a_2) fDel_1.delww[(a_2)*max_nLayers_ + a_1 - 7]
492#define ww_ref(a_1,a_2) fNeur_1.ww[(a_2)*max_nLayers_ + a_1 - 7]
493#define del_ref(a_1,a_2) fDel_1.del[(a_2)*max_nLayers_ + a_1 - 7]
494#define deltaww_ref(a_1,a_2) fNeur_1.deltaww[(a_2)*max_nLayers_ + a_1 - 7]
501 Int_t i__1, i__2, i__3;
507 i__1 = fNeur_1.neuron[fParam_1.layerm - 1];
508 for (i__ = 1; i__ <= i__1; ++i__) {
509 if (fVarn_1.nclass[*ievent - 1] == i__) {
510 fNeur_1.o[i__ - 1] = 1.;
513 fNeur_1.o[i__ - 1] = -1.;
517 i__1 = fNeur_1.neuron[
l - 1];
518 for (i__ = 1; i__ <= i__1; ++i__) {
520 df = (
f + 1.) * (1. -
f) / (fDel_1.temp[
l - 1] * 2.);
522 fDel_1.coef[i__ - 1];
524 i__2 = fNeur_1.neuron[
l - 2];
525 for (j = 1; j <= i__2; ++j) {
531 for (
l = fParam_1.layerm - 1;
l >= 2; --
l) {
532 i__2 = fNeur_1.neuron[
l - 1];
533 for (i__ = 1; i__ <= i__2; ++i__) {
535 i__1 = fNeur_1.neuron[
l];
536 for (k = 1; k <= i__1; ++k) {
540 df = (
f + 1.) * (1. -
f) / (fDel_1.temp[
l - 1] * 2.);
543 i__1 = fNeur_1.neuron[
l - 2];
544 for (j = 1; j <= i__1; ++j) {
550 i__1 = fParam_1.layerm;
551 for (
l = 2;
l <= i__1; ++
l) {
552 i__2 = fNeur_1.neuron[
l - 1];
553 for (i__ = 1; i__ <= i__2; ++i__) {
557 i__3 = fNeur_1.neuron[
l - 2];
558 for (j = 1; j <= i__3; ++j) {
577#define w_ref(a_1,a_2,a_3) fNeur_1.w[((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]
578#define ww_ref(a_1,a_2) fNeur_1.ww[(a_2)*max_nLayers_ + a_1 - 7]
586 if (*iii == *maxcycle) {
594#define delta_ref(a_1,a_2,a_3) fDel_1.delta[((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]
595#define deltaww_ref(a_1,a_2) fNeur_1.deltaww[(a_2)*max_nLayers_ + a_1 - 7]
602 Int_t i__1, i__2, i__3;
605 Int_t nevod, layer, ktest, i1, nrest;
610 Leclearn(&ktest, tout2, tin2);
611 Lecev2(&ktest, tout2, tin2);
613 printf(
" .... strange to be here (1) ... \n");
616 i__1 = fParam_1.layerm - 1;
617 for (layer = 1; layer <= i__1; ++layer) {
618 i__2 = fNeur_1.neuron[layer];
619 for (j = 1; j <= i__2; ++j) {
621 i__3 = fNeur_1.neuron[layer - 1];
622 for (i__ = 1; i__ <= i__3; ++i__) {
627 if (fParam_1.ichoi == 1) {
634 i__3 = fParam_1.nblearn;
635 Timer timer( i__3,
"CFMlpANN" );
636 Int_t num = i__3/100;
638 for (i1 = 1; i1 <= i__3; ++i1) {
640 if ( ( num>0 && (i1-1)%num == 0) || (i1 == i__3) ) timer.
DrawProgressBar( i1-1 );
642 i__2 = fParam_1.nevl;
643 for (i__ = 1; i__ <= i__2; ++i__) {
645 if (fCost_1.ieps == 2) {
646 fParam_1.eeps = Fdecroi(&kkk);
648 if (fCost_1.ieps == 1) {
649 fParam_1.eeps = fParam_1.epsmin;
652 if (fVarn_1.iclass == 2) {
659 if (fVarn_1.iclass == 1) {
660 nevod = fParam_1.nevl / fParam_1.lclass;
661 nrest = i__ % fParam_1.lclass;
662 fParam_1.ndiv = i__ / fParam_1.lclass;
664 ievent = fParam_1.ndiv + 1 + (fParam_1.lclass - nrest) *
668 ievent = fParam_1.ndiv;
676 if (i1 % fParam_1.ndivis == 0 || i1 == 1 || i1 == fParam_1.nblearn) {
679 GraphNN(&i1, &xxx, &yyy, det, (
Int_t)20);
680 Out(&i1, &fParam_1.nblearn);
682 if (xxx < fCost_1.tolcou) {
683 GraphNN(&fParam_1.nblearn, &xxx, &yyy, det, (
Int_t)20);
684 Out(&fParam_1.nblearn, &fParam_1.nblearn);
704 if (fParam_1.layerm > max_nLayers_) {
706 printf(
"Error: number of layers exceeds maximum: %i, %i ==> abort",
707 fParam_1.layerm, max_nLayers_ );
708 Arret(
"modification of mlpl3_param_lim.inc is needed ");
710 if (fParam_1.nevl > max_Events_) {
712 printf(
"Error: number of training events exceeds maximum: %i, %i ==> abort",
713 fParam_1.nevl, max_Events_ );
714 Arret(
"modification of mlpl3_param_lim.inc is needed ");
716 if (fParam_1.nevt > max_Events_) {
717 printf(
"Error: number of testing events exceeds maximum: %i, %i ==> abort",
718 fParam_1.nevt, max_Events_ );
719 Arret(
"modification of mlpl3_param_lim.inc is needed ");
721 if (fParam_1.lclass < fNeur_1.neuron[fParam_1.layerm - 1]) {
723 printf(
"Error: wrong number of classes at ouput layer: %i != %i ==> abort\n",
724 fNeur_1.neuron[fParam_1.layerm - 1], fParam_1.lclass);
725 Arret(
"problem needs to reported ");
727 if (fParam_1.nvar > max_nVar_) {
729 printf(
"Error: number of variables exceeds maximum: %i, %i ==> abort",
730 fParam_1.nvar, fg_max_nVar_ );
731 Arret(
"modification of mlpl3_param_lim.inc is needed");
733 i__1 = fParam_1.layerm;
734 for (i__ = 1; i__ <= i__1; ++i__) {
735 if (fNeur_1.neuron[i__ - 1] > max_nNodes_) {
737 printf(
"Error: number of neurons at layer exceeds maximum: %i, %i ==> abort",
738 i__, fg_max_nNodes_ );
742 printf(
" .... strange to be here (2) ... \n");
747#define y_ref(a_1,a_2) fNeur_1.y[(a_2)*max_nLayers_ + a_1 - 7]
761 i__1 = fParam_1.nevl;
762 for (i__ = 1; i__ <= i__1; ++i__) {
764 i__2 = fNeur_1.neuron[fParam_1.layerm - 1];
765 for (j = 1; j <= i__2; ++j) {
766 if (fVarn_1.nclass[i__ - 1] == j) {
767 fNeur_1.o[j - 1] = 1.;
770 fNeur_1.o[j - 1] = -1.;
773 d__1 =
y_ref(fParam_1.layerm, j) - fNeur_1.o[j - 1];
774 c__ += fDel_1.coef[j - 1] * (d__1 * d__1);
777 c__ /= (
Double_t) (fParam_1.nevl * fParam_1.lclass) * 2.;
779 fCost_1.ancout = c__;
784#define w_ref(a_1,a_2,a_3) fNeur_1.w[((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]
785#define ww_ref(a_1,a_2) fNeur_1.ww[(a_2)*max_nLayers_ + a_1 - 7]
794 Int_t jmax, k, layer, kk, nq, nr;
796 i__1 = fParam_1.nvar;
797 i__1 = fParam_1.layerm;
798 i__1 = fParam_1.layerm - 1;
799 for (layer = 1; layer <= i__1; ++layer) {
800 nq = fNeur_1.neuron[layer] / 10;
801 nr = fNeur_1.neuron[layer] - nq * 10;
809 for (k = 1; k <= i__2; ++k) {
812 if (fNeur_1.neuron[layer] < jmax) {
813 jmax = fNeur_1.neuron[layer];
832 aaa = (fParam_1.epsmin - fParam_1.epsmax) / (
Double_t) (fParam_1.nblearn *
834 bbb = fParam_1.epsmax - aaa;
835 ret_val = aaa * (
Double_t) (*i__) + bbb;
839#define y_ref(a_1,a_2) fNeur_1.y[(a_2)*max_nLayers_ + a_1 - 7]
856 Int_t nko[max_nNodes_], nok[max_nNodes_];
864 i__1 = fNeur_1.neuron[fParam_1.layerm - 1];
865 for (i__ = 1; i__ <= i__1; ++i__) {
871 i__1 = fParam_1.nevl;
872 for (i__ = 1; i__ <= i__1; ++i__) {
874 i__2 = fNeur_1.neuron[fParam_1.layerm - 1];
875 for (j = 1; j <= i__2; ++j) {
877 if (fVarn_1.nclass[i__ - 1] == j) {
879 xmok[j - 1] +=
y_ref(fParam_1.layerm, j);
883 xmko[j - 1] +=
y_ref(fParam_1.layerm, j);
892 i__1 = fNeur_1.neuron[fParam_1.layerm - 1];
893 for (j = 1; j <= i__1; ++j) {
894 xmok[j - 1] /= (
Double_t) nok[j - 1];
895 xmko[j - 1] /= (
Double_t) nko[j - 1];
896 fNeur_1.cut[j - 1] = (xmok[j - 1] + xmko[j - 1]) / 2.;
898 ix = fNeur_1.neuron[fParam_1.layerm - 1];
917 static Int_t fg_i1 = 3823;
918 static Int_t fg_i2 = 4006;
919 static Int_t fg_i3 = 2903;
922 Int_t k3, l3, k2, l2, k1, l1;
927 k2 = fg_i2 * j3 + fg_i3 * j2 + l3;
929 k1 = fg_i1 * j3 + fg_i2 * j2 + fg_i3 * j1 + l2;
931 fg_i1 = k1 - l1 * m12;
932 fg_i2 = k2 - l2 * m12;
933 fg_i3 = k3 - l3 * m12;
946 if (*u / fDel_1.temp[*i__ - 1] > 170.) {
947 *
f = .99999999989999999;
949 else if (*u / fDel_1.temp[*i__ - 1] < -170.) {
950 *
f = -.99999999989999999;
953 yy =
TMath::Exp(-(*u) / fDel_1.temp[*i__ - 1]);
954 *
f = (1. - yy) / (yy + 1.);
960#define y_ref(a_1,a_2) fNeur_1.y[(a_2)*max_nLayers_ + a_1 - 7]
974 i__1 = fParam_1.nevt;
975 for (i__ = 1; i__ <= i__1; ++i__) {
977 i__2 = fNeur_1.neuron[fParam_1.layerm - 1];
978 for (j = 1; j <= i__2; ++j) {
979 if (fVarn_1.mclass[i__ - 1] == j) {
980 fNeur_1.o[j - 1] = 1.;
983 fNeur_1.o[j - 1] = -1.;
986 d__1 =
y_ref(fParam_1.layerm, j) - fNeur_1.o[j - 1];
987 c__ += fDel_1.coef[j - 1] * (d__1 * d__1);
990 c__ /= (
Double_t) (fParam_1.nevt * fParam_1.lclass) * 2.;
996#define xx_ref(a_1,a_2) fVarn3_1(a_1,a_2)
1016 i__1 = fParam_1.lclass;
1020 i__1 = fParam_1.nevt;
1021 for (i__ = 1; i__ <= i__1; ++i__) {
1022 DataInterface(tout2, tin2, &fg_999, &fg_0, &fParam_1.nevt, &fParam_1.nvar,
1023 xpg, &fVarn_1.mclass[i__ - 1], &ikend);
1029 i__2 = fParam_1.nvar;
1030 for (j = 1; j <= i__2; ++j) {
1031 xx_ref(i__, j) = xpg[j - 1];
1035 i__1 = fParam_1.nevt;
1036 for (i__ = 1; i__ <= i__1; ++i__) {
1037 i__2 = fParam_1.nvar;
1038 for (
l = 1;
l <= i__2; ++
l) {
1039 if (fVarn_1.xmax[
l - 1] == (
Float_t)0. && fVarn_1.xmin[
l - 1] == (
1045 fVarn_1.xmin[
l - 1]) / 2.;
1047 fVarn_1.xmin[
l - 1]) / 2.);
1055#define w_ref(a_1,a_2,a_3) fNeur_1.w[((a_3)*max_nNodes_ + (a_2))*max_nLayers_ + a_1 - 187]
1056#define x_ref(a_1,a_2) fNeur_1.x[(a_2)*max_nLayers_ + a_1 - 7]
1057#define y_ref(a_1,a_2) fNeur_1.y[(a_2)*max_nLayers_ + a_1 - 7]
1058#define ww_ref(a_1,a_2) fNeur_1.ww[(a_2)*max_nLayers_ + a_1 - 7]
1059#define xx_ref(a_1,a_2) fVarn3_1(a_1,a_2)
1066 Int_t i__1, i__2, i__3;
1072 i__1 = fNeur_1.neuron[0];
1073 for (i__ = 1; i__ <= i__1; ++i__) {
1076 i__1 = fParam_1.layerm - 1;
1077 for (layer = 1; layer <= i__1; ++layer) {
1078 i__2 = fNeur_1.neuron[layer];
1079 for (j = 1; j <= i__2; ++j) {
1080 x_ref(layer + 1, j) = 0.;
1081 i__3 = fNeur_1.neuron[layer - 1];
1082 for (i__ = 1; i__ <= i__3; ++i__) {
1084 *
w_ref(layer + 1, j, i__);
1088 Foncf(&i__3, &
x_ref(layer + 1, j), &
f);
1106 printf(
"%s: %s",fg_MethodName, mot);
#define del_ref(a_1, a_2)
#define xeev_ref(a_1, a_2)
#define w_ref(a_1, a_2, a_3)
#define delww_ref(a_1, a_2)
#define delta_ref(a_1, a_2, a_3)
#define delw_ref(a_1, a_2, a_3)
#define deltaww_ref(a_1, a_2)
Implementation of Clermond-Ferrand artificial neural network.
void Foncf(Int_t *i__, Double_t *u, Double_t *f)
void Out(Int_t *iii, Int_t *maxcycle)
MethodCFMlpANN_Utils()
default constructor
void Innit(char *det, Double_t *tout2, Double_t *tin2, Int_t)
void Entree_new(Int_t *, char *, Int_t *ntrain, Int_t *ntest, Int_t *numlayer, Int_t *nodes, Int_t *numcycle, Int_t)
struct TMVA::MethodCFMlpANN_Utils::@156 fVarn_1
void CollectVar(Int_t *nvar, Int_t *class__, Double_t *xpg)
[smart comments to be added]
void Leclearn(Int_t *ktest, Double_t *tout2, Double_t *tin2)
[smart comments to be added]
void GraphNN(Int_t *ilearn, Double_t *, Double_t *, char *, Int_t)
[smart comments to be added]
static const Int_t fg_max_nVar_
void En_avant2(Int_t *ievent)
[smart comments to be added]
Double_t Fdecroi(Int_t *i__)
[smart comments to be added]
struct TMVA::MethodCFMlpANN_Utils::@158 fDel_1
void En_arriere(Int_t *ievent)
[smart comments to be added]
struct TMVA::MethodCFMlpANN_Utils::@155 fParam_1
void Cout(Int_t *, Double_t *xxx)
[smart comments to be added]
static const Int_t fg_max_nNodes_
Double_t Sen3a(void)
[smart comments to be added]
struct TMVA::MethodCFMlpANN_Utils::@159 fCost_1
void Train_nn(Double_t *tin2, Double_t *tout2, Int_t *ntrain, Int_t *ntest, Int_t *nvar2, Int_t *nlayer, Int_t *nodes, Int_t *ncycle)
void Wini()
[smart comments to be added]
void En_avant(Int_t *ievent)
[smart comments to be added]
void Cout2(Int_t *, Double_t *yyy)
[smart comments to be added]
void TestNN()
[smart comments to be added]
void Lecev2(Int_t *ktest, Double_t *tout2, Double_t *tin2)
[smart comments to be added]
virtual ~MethodCFMlpANN_Utils()
Destructor.
void Arret(const char *mot)
struct TMVA::MethodCFMlpANN_Utils::@157 fNeur_1
static const char *const fg_MethodName
void Inl()
[smart comments to be added]
Timing information for training and evaluation of MVA methods.
void DrawProgressBar(Int_t, const TString &comment="")
draws progress bar in color or B&W caution:
MsgLogger & Endl(MsgLogger &ml)