00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #if !defined(ALIZE_SpkAdapt_cpp)
00056 #define ALIZE_SpkAdapt_cpp
00057
00058 #include <iostream>
00059 #include <fstream>
00060 #include <cstdio>
00061 #include <cassert>
00062 #include <cmath>
00063 #include <liatools.h>
00064 #include "SpkAdapt.h"
00065 #include "FileInfo.h"
00066 #include "UnsupervisedTools.h"
00067
00068 using namespace alize;
00069 using namespace std;
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 int TrainTargetAdapt(Config & config, Config & configTest)
00091 {
00092
00093 String outputLLRFileName = config.getParam("outputLLRFilename");
00094 ofstream outLLR(outputLLRFileName.c_str(), ios::out | ios::trunc);
00095 String fullFileName,fullFileNameTrain;
00096
00097
00098 bool NIST = true;
00099 if (config.existsParam("NISTprotocol"))
00100 NIST = config.getParam("NISTprotocol").toBool();
00101
00102 bool becomeCurrent = true,
00103 selected = true;
00104
00105
00106 String inputClientListFileName = config.getParam("targetIdList");
00107 String inputTestsListFileName = config.getParam("testsIdList");
00108 String inputWorldFilename = config.getParam("inputWorldFilename");
00109 String outputSERVERFilename = config.getParam("mixtureServer");
00110
00111 double LLRRatio = 0.0,
00112 LLRRatio2 = 0.0,
00113 LLRTrain = 0.0;
00114
00115
00116
00117 bool regress = false;
00118 if (configTest.existsParam("REGRESS"))
00119 regress = configTest.getParam("REGRESS").toBool();
00120
00121
00122 bool wmap = false;
00123 if (configTest.existsParam("WMAP"))
00124 wmap = configTest.getParam("WMAP").toBool();
00125
00126
00127 bool wmapGmm = false;
00128 if (configTest.existsParam("WMAPGMM"))
00129 wmapGmm = configTest.getParam("WMAPGMM").toBool();
00130
00131
00132 bool Fast = false;
00133 if (configTest.existsParam("FAST"))
00134 Fast = configTest.getParam("FAST").toBool();
00135 int countTests;
00136 bool saveEmptyModel = false;
00137 if (config.existsParam("saveEmptyModel"))
00138 saveEmptyModel = config.getParam("saveEmptyModel").toBool();
00139
00140
00141 bool tnorm = false;
00142 if (configTest.existsParam("TNORM"))
00143 tnorm = configTest.getParam("TNORM").toBool();
00144
00145
00146 bool znorm = false, ztnorm = false;
00147 if (configTest.existsParam("ZNORM"))
00148 znorm = configTest.getParam("ZNORM").toBool();
00149
00150
00151 bool oracle = false;
00152 if (configTest.existsParam("Oracle"))
00153 oracle = configTest.getParam("Oracle").toBool();
00154
00155
00156 bool cross = false;
00157 if (configTest.existsParam("CrossValid"))
00158 cross = configTest.getParam("CrossValid").toBool();
00159
00160
00161 String inputResFilename;
00162 bool fromResFile = false;
00163 if (configTest.existsParam("FromResFile")){
00164 fromResFile = configTest.getParam("FromResFile").toBool();
00165 inputResFilename = configTest.getParam("InputResFilename");
00166 }
00167
00168 bool saveAfterIt = false;
00169 if (configTest.existsParam("SaveAfterIt"))
00170 saveAfterIt = configTest.getParam("SaveAfterIt").toBool();
00171
00172
00173 bool ScoresByTarget = false;
00174 if (configTest.existsParam("ScoresByTarget"))
00175 ScoresByTarget = configTest.getParam("ScoresByTarget").toBool();
00176
00177
00178 bool assess = false;
00179 if (configTest.existsParam("Assess"))
00180 assess = configTest.getParam("Assess").toBool();
00181
00182
00183 bool fixedPriors = true;
00184 if (configTest.existsParam("fixedPriors"))
00185 fixedPriors = configTest.getParam("fixedPriors").toBool();
00186
00187
00188 bool map = false;
00189 if (configTest.existsParam("MAP"))
00190 map = configTest.getParam("MAP").toBool();
00191
00192 unsigned long resetNb = 0;
00193 if (configTest.existsParam("ResetNbAdapt"))
00194 resetNb = configTest.getParam("ResetNbAdapt").toLong();
00195
00196
00197 ObjectRefVector stockTnorm;
00198
00199
00200 ObjectRefVector stockZnorm;
00201
00202
00203 DoubleVector decision;
00204
00205 DoubleVector tmp;
00206 DoubleVector NbFramesSelected, NbFramesSelectedForTests;
00207 ObjectRefVector FeatServ;
00208 ObjectRefVector SegServ;
00209
00210 if (tnorm)
00211 {
00212 String testFile = (config.getParam("impScoreFile"));
00213 String TestNames = (config.getParam("testNames"));
00214 loadTnormParam(TestNames, testFile, stockTnorm, config);
00215 }
00216
00217 String impCohortFile ;
00218 if(znorm) {
00219 impCohortFile = (configTest.getParam("impCohortFile"));
00220 }
00221
00222
00223 bool fixedLabelSelectedFrame = true;
00224 String labelSelectedFrames;
00225
00226 if (config.existsParam("useIdForSelectedFrame"))
00227 fixedLabelSelectedFrame = (config.getParam("useIdForSelectedFrame") == "false");
00228
00229 if (fixedLabelSelectedFrame)
00230 labelSelectedFrames = config.getParam("labelSelectedFrames");
00231
00232 debug = config.getParam_debug();
00233 if (config.existsParam("verbose"))
00234 verbose = true;
00235 else
00236 verbose = false;
00237
00238
00239 XList inputClientList(inputClientListFileName, config);
00240 XLine *linep;
00241 inputClientList.getLine(0);
00242 XList inputTestsList(inputTestsListFileName, configTest);
00243 XLine *lineTests;
00244 inputTestsList.getLine(0);
00245 MixtureServer ms(config);
00246
00247
00248 Config configScores(config);
00249 configScores.setParam("vectSize", "1");
00250 configScores.setParam("mixtureDistribCount", configTest.getParam("mixtureDistribCountForGMMScores"));
00251 MixtureServer msScores(configScores);
00252 StatServer ss(config, ms);
00253 StatServer ssScores(configScores, msScores);
00254
00255 XLine testsToCompute;
00256
00257 if (verbose)
00258 cout << "TrainTarget - Load world model [" << inputWorldFilename << "]" << endl;
00259
00260 MixtureGD & world = ms.loadMixtureGD(inputWorldFilename);
00261
00262
00263 MixtureGD & non = msScores.createMixtureGD();
00264 MixtureGD & tar = msScores.createMixtureGD();
00265
00266 if(!ScoresByTarget){
00267 non = msScores.loadMixtureGD(configTest.getParam("NONScoresModel"));
00268 tar = msScores.loadMixtureGD(configTest.getParam("TARScoresModel"));
00269 }
00270
00271
00272
00273 double shift = 0.0;
00274 bool tnormAdapt = false;
00275 if (configTest.existsParam("TnormAdapt"))
00276 tnormAdapt = configTest.getParam("TnormAdapt").toBool();
00277 Matrix <double> tnormA;
00278 if(tnormAdapt && tnorm) {
00279
00280 tnormA.load(configTest.getParam("TnormAMatrix"),configTest);
00281 }
00282 unsigned long session_nb = 1;
00283
00284
00285 String idAux = (ms.createMixtureGD(world.getDistribCount())).getId();
00286 String idTmp = (ms.createMixtureGD(world.getDistribCount())).getId();
00287
00288
00289
00290 while ((linep = inputClientList.getLine()) != NULL)
00291 {
00292
00293 MixtureGD & world = ms.getMixtureGD(ms.getMixtureIndex(inputWorldFilename));
00294 MixtureGD & tmpMixture = ms.getMixtureGD(ms.getMixtureIndex(idAux));
00295 MixtureGD & auxMixture = ms.getMixtureGD(ms.getMixtureIndex(idTmp));
00296
00297 String *id = linep->getElement();
00298
00299 XLine featureFileListp = linep->getElements();
00300
00301 if (verbose)
00302 cout << "Train model [" << *id << "]" << endl;
00303
00304 if (!fixedLabelSelectedFrame)
00305 {
00306 labelSelectedFrames = *id;
00307 if (debug)
00308 cout << *id << " is used for label selected frames" << endl;
00309 }
00310
00311
00312 FeatureServer & fs = *new FeatureServer(config, featureFileListp);
00313
00314
00315 SegServer & segmentsServer = *new SegServer();
00316
00317
00318 LabelServer labelServer;
00319
00320
00321 initializeClusters(featureFileListp, segmentsServer, labelServer, config);
00322
00323
00324 verifyClusterFile(segmentsServer, fs, config);
00325
00326 MixtureGD & clientMixture = ms.duplicateMixture(world, DUPL_DISTRIB);
00327
00328 MixtureGD & clientMixtureEM = ms.duplicateMixture(world, DUPL_DISTRIB);
00329
00330
00331 long codeSelectedFrame = labelServer.getLabelIndexByString(labelSelectedFrames);
00332 if (codeSelectedFrame == -1)
00333 {
00334 cout << " WARNING - NO DATA FOR TRAINING [" << *id << "]";
00335 }
00336 else
00337 {
00338
00339 SegCluster & selectedSegments = segmentsServer.getCluster(codeSelectedFrame);
00340 countTests = 0;
00341 if (!Fast)
00342 {
00343
00344 FeatServ.addObject(fs);
00345 SegServ.addObject(selectedSegments);
00346 }
00347
00348 adaptModel(config, ss, ms, fs, selectedSegments, world, clientMixture);
00349 if(!map){
00350 adaptModelEM(config, ss, ms, fs, selectedSegments, world, clientMixtureEM);
00351 ms.setMixtureId(clientMixtureEM, *id);
00352 }
00353 else ms.setMixtureId(clientMixture, *id);
00354
00355 testsToCompute.addElement(*id);
00356
00357
00358 fullFileNameTrain = getFullFileName(*id, configTest);
00359
00360
00361
00362 LLRTrain = computeLLR(configTest,ss, fs, world, clientMixture, selectedSegments,fullFileNameTrain);
00363
00364
00365 decision.addValue(LLRTrain);
00366 countTests++;
00367
00368
00369 if(!map) NbFramesSelected.addValue(SegClusterFrame(selectedSegments));
00370
00371 MixtureGD & SAVclientMixture = ms.duplicateMixture(clientMixture, DUPL_DISTRIB);
00372
00373
00374
00375
00376 MixtureGD & clientMixture_2 = ms.duplicateMixture(clientMixture, DUPL_DISTRIB);
00377 MixtureGD & clientMixture_3 = ms.duplicateMixture(clientMixture, DUPL_DISTRIB);
00378
00379
00380
00381 if(ScoresByTarget){
00382 String TARListFilename = configTest.getParam("TARListFilename");
00383 non = msScores.loadMixtureGD(((*id)+".non"));
00384 if (verbose) cout << "load "<<(*id)+".non"<<" NON file"<<endl;
00385 String idTar = selectNearestTarModel(TARListFilename, fullFileNameTrain,configTest, ss, fs, world, selectedSegments,ms);
00386 if (verbose) cout <<"TAR SELECTED : "<< idTar<<endl;
00387 tar = msScores.loadMixtureGD(((idTar)+".tar"));
00388 }
00389
00390
00391 if(znorm)
00392 { if(tnorm && znorm) ztnorm = true;
00393 computeAndStoreZnormParam(ss, impCohortFile, (*id), clientMixture,stockZnorm, world, configTest, ztnorm, stockTnorm);
00394 }
00395
00396
00397
00398
00399
00400 shift = 0.0;
00401
00402 while ((lineTests = inputTestsList.getLine()) != NULL)
00403 {
00404
00405 String *idclient = lineTests->getElement();
00406 if (*idclient == *id)
00407 {
00408 MixtureGD & testMixtureEM = ms.duplicateMixture(world, DUPL_DISTRIB);
00409
00410
00411 String & idTest = lineTests->getElement(2, becomeCurrent);
00412
00413
00414 XLine featureFileListTests = lineTests->getElements();
00415
00416 if (verbose)
00417 cout << "Train model for test [" << idTest << "]" << endl;
00418
00419
00420 if (!fixedLabelSelectedFrame)
00421 {
00422 labelSelectedFrames = idTest;
00423 if (debug)
00424 cout << idTest << " is used for label selected frames" << endl;
00425 }
00426
00427
00428 FeatureServer & fsTests = *new FeatureServer(configTest, featureFileListTests);
00429
00430
00431 SegServer & segmentsServerTests = *new SegServer();
00432
00433
00434 LabelServer labelServerTests;
00435
00436
00437 initializeClusters(featureFileListTests, segmentsServerTests, labelServerTests, configTest);
00438
00439
00440 verifyClusterFile(segmentsServerTests, fsTests, configTest);
00441
00442
00443 long codeSelectedFrame = labelServerTests.getLabelIndexByString(labelSelectedFrames);
00444 if (codeSelectedFrame == -1)
00445 {
00446 cout << " WARNING - NO DATA FOR TRAINING [" << idTest << "]";
00447 }
00448 else
00449 {
00450 SegCluster & allFramesTest = segmentsServerTests.getCluster(codeSelectedFrame);
00451 SegCluster & selectedSegmentsTests = segmentsServerTests.createCluster(1,"","");
00452
00453 if(cross)
00454 {
00455
00456
00457
00458 crossValid(configTest, ss, ms, fsTests, allFramesTest,world,testMixtureEM,selectedSegmentsTests,idTest);
00459 ms.setMixtureId(testMixtureEM, idTest);
00460
00461
00462
00463
00464
00465 }
00466 else {
00467 copyCluster(allFramesTest,selectedSegmentsTests);
00468 segmentsServerTests.remove(allFramesTest);
00469 }
00470
00471
00472 if (Fast)
00473 {
00474
00475
00476 int index = ms.getMixtureIndex(idTest);
00477 if (index == -1)
00478 {
00479 String fullMixtureName = getFullMixtureName(idTest,config);
00480
00481
00482 if (FileExists(fullMixtureName) == false)
00483 {
00484
00485 if(!map)
00486 adaptModelEM(config, ss, ms, fsTests, selectedSegmentsTests, world, testMixtureEM);
00487
00488 else adaptModel(config, ss, ms, fsTests, selectedSegmentsTests, world, testMixtureEM);
00489
00490 ms.setMixtureId(testMixtureEM, idTest);
00491
00492
00493 testMixtureEM.save(idTest,config);
00494 }
00495 else testMixtureEM = ms.loadMixtureGD(idTest);
00496 }
00497 else
00498 testMixtureEM = ms.getMixtureGD(index);
00499 }
00500
00501 LLRRatio = 0.0;
00502 fullFileName = getFullFileName(idTest, configTest);
00503
00504
00505 if(!tnormAdapt){
00506
00507
00508 if (fromResFile)
00509 {
00510 LLRRatio = searchLLRFromResFile(*id, idTest, inputResFilename, configTest);
00511 }
00512 else
00513 {
00514
00515
00516
00517 if (FileExists(fullFileName) == false || Fast == false || cross)
00518 {
00519
00520 LLRRatio = computeLLR(configTest, ss, fsTests, world, SAVclientMixture, selectedSegmentsTests, fullFileName);
00521 }
00522
00523 else
00524 LLRRatio = computeFastLLR(ss, fsTests, world, SAVclientMixture, selectedSegmentsTests, fullFileName, configTest);
00525 }
00526
00527 if (tnorm) normalizeScore(idTest, LLRRatio, stockTnorm,shift);
00528 if (znorm) normalizeScore(*id, LLRRatio, stockZnorm,shift);
00529 }
00530
00531
00532
00533 LLRRatio2 = 0.0;
00534 if (FileExists(fullFileName) == false || Fast == false || cross)
00535 {
00536
00537 LLRRatio2 = computeLLR(configTest, ss, fsTests, world,clientMixture, selectedSegmentsTests,fullFileName);
00538 }
00539 else LLRRatio2 = computeFastLLR(ss, fsTests, world, clientMixture, selectedSegmentsTests, fullFileName, configTest);
00540
00541 if(tnormAdapt && tnorm)
00542 {
00543
00544 shift = findNearestLLRInMatrix(tnormA, session_nb, LLRRatio2);
00545 cout <<"SHIFT = " <<shift<<endl;
00546 LLRRatio2 -= shift;
00547 }
00548
00549
00550
00551 if (tnorm) normalizeScore(idTest, LLRRatio2, stockTnorm,shift);
00552 if (znorm) normalizeScore(*id, LLRRatio2, stockZnorm,shift);
00553
00554
00555
00556
00557 double L2 = computeFastLLR(ss, fsTests, world, clientMixture_2, selectedSegmentsTests, fullFileName, configTest);
00558 double L3 = computeFastLLR(ss, fsTests, world, clientMixture_3, selectedSegmentsTests, fullFileName, configTest);
00559
00560
00561
00562
00563 double Ltrain = computeFastLLR(ss, fs, world, clientMixture, selectedSegments, fullFileNameTrain, configTest);
00564 double Ltrain_2 = computeFastLLR(ss, fs, world, clientMixture_2, selectedSegments, fullFileNameTrain, configTest);
00565 double Ltrain_3 = computeFastLLR(ss, fs, world, clientMixture_3, selectedSegments, fullFileNameTrain, configTest);
00566
00567
00568
00569 cout <<" Model : "<< *id << " , train data : "
00570 <<" LLR test adapt -1 : " << Ltrain
00571 <<" LLR test adapt -2 : " << Ltrain_2
00572 <<" LLR test adapt -3 : " << Ltrain_3 <<endl;
00573
00574
00575
00576 if (tnorm) normalizeScore(idTest, L2, stockTnorm,shift);
00577 if (tnorm) normalizeScore(idTest, L3, stockTnorm,shift);
00578
00579
00580 cout <<" Model : "<< *id << " , current test : " << idTest
00581 <<" LLR test adapt -1 : " << LLRRatio2
00582 <<" LLR test adapt -2 : " << L2
00583 <<" LLR test adapt -3 : " << L3
00584 <<" LLR test train model : " << LLRRatio <<endl;
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610 outLLR << "M " << *id << " 0 " << idTest << " " << LLRRatio2 << endl;
00611
00612
00613
00614
00615
00616
00617 if(tnormAdapt)
00618 LLRRatio = LLRRatio2;
00619
00620
00621 if (oracle)
00622 Oracle(*id, idTest, LLRRatio, configTest, tar, non, ssScores);
00623
00624
00625 if(selected)
00626 {
00627
00628 decision.addValue(LLRRatio);
00629
00630
00631 if (!Fast)
00632 {
00633 FeatServ.addObject(fsTests);
00634 SegServ.addObject(selectedSegmentsTests);
00635 }
00636 countTests++;
00637
00638
00639 if(!map) NbFramesSelected.addValue(SegClusterFrame(selectedSegmentsTests));
00640 testsToCompute.addElement(idTest);
00641
00642 selected = true;
00643 }
00644
00645
00646
00647 tmp = decision;
00648
00649 if (regress)
00650 expandLLR(decision, configTest);
00651 else if (wmap)
00652 WMAP(decision, configTest);
00653 else if (wmapGmm){
00654 if(fixedPriors)
00655 WMAPGMMFixedPriors(decision, configTest, tar, non, ssScores);
00656 else
00657 WMAPGMM(decision, configTest, tar, non, ssScores);
00658 }
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670 cout <<"Set weight of train data to 1"<<endl;
00671 decision[0] = 1;
00672
00673
00674 if (Fast)
00675 {
00676 if(assess){
00677 assessAdaptation(ss,clientMixture ,selectedSegments, configTest, fs, world, tmp, fullFileNameTrain, countTests, LLRTrain);
00678 }
00679
00680
00681 if(resetNb && resetNb < (unsigned long)countTests)
00682 {
00683
00684
00685 testsToCompute.reset();
00686 NbFramesSelected.clear();
00687 decision.clear();
00688
00689
00690 if(!map) NbFramesSelected.addValue(SegClusterFrame(selectedSegments));
00691 testsToCompute.addElement(*id);
00692 decision.addValue(1);
00693 }
00694
00695
00696 clientMixture_3 = clientMixture_2;
00697 clientMixture_2 = clientMixture;
00698
00699
00700
00701
00702 if(!map)
00703 computeMAPmodelFromEMones(configTest, ss, ms, NbFramesSelected, world, clientMixture, auxMixture, tmpMixture, decision, testsToCompute);
00704 else fuseMAP(config, ss, ms, world, clientMixture, auxMixture,tmpMixture, decision, testsToCompute);
00705
00706 if(saveAfterIt){
00707
00708 cout << "Save client model [" << *id << "]" <<" after IT : "<< countTests-1 << endl;
00709 char toto[256];
00710 sprintf(toto,"%d",(countTests-1));
00711 clientMixture.save((*id)+"."+toto, config);
00712 }
00713
00714
00715 }
00716 else
00717 {
00718 clientMixture = world;
00719 adaptModel(config, ss, ms, FeatServ, SegServ, world, clientMixture, decision);
00720 }
00721
00722
00723 if(tnormAdapt)
00724 {
00725 double toto = 0.0;
00726 for (unsigned long e = 0; e < NbFramesSelected.size(); e++)
00727 toto += NbFramesSelected[e]*decision[e];
00728 cout <<"Total Frames used for learning the adapted model = " << toto<<endl;
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741
00742 if (9500.0 < toto && toto < 17000.0) session_nb = 2;
00743 else if ( 17000.0 < toto && toto < 25500.0) session_nb = 3;
00744 else if ( 25500.0 < toto && toto < 34000.0) session_nb = 4;
00745 else if ( 34000.0 < toto && toto < 42400.0) session_nb = 5;
00746 else if ( 42400.0 < toto && toto < 50000.0) session_nb = 6;
00747 else if ( 50000.0 < toto && toto < 59400.0) session_nb = 7;
00748 else if ( 59400.0 < toto && toto < 67900.0) session_nb = 8;
00749 else if ( 67900.0 < toto && toto < 76400.0) session_nb = 9;
00750 else if ( 76400.0 < toto && toto < 85000.0) session_nb = 10;
00751 else if (toto > 85000.0) session_nb = 10;
00752
00753
00754 }
00755
00756 decision = tmp;
00757 tmp.clear();
00758
00759 }
00760 if (Fast)
00761 {
00762 delete & segmentsServerTests;
00763 delete & fsTests;
00764 }
00765
00766 if (ms.getMixtureCount() > (unsigned long)configTest.getParam("MaxMixturesCount").toLong())
00767 {
00768
00769 if(verbose && verboseLevel>1)
00770 cout <<"Exceeding capacity of the mixtureServer ("<<(unsigned long)configTest.getParam("MaxMixturesCount").toLong()<<")"<<endl;
00771
00772 ms.deleteMixture(testMixtureEM);
00773 ms.deleteUnusedDistribs();
00774
00775 }
00776
00777 }
00778
00779 }
00780
00781 if (verbose)
00782 cout << "Save client model [" << *id << "]" << endl;
00783 clientMixture.save(*id, config);
00784 inputTestsList.rewind();
00785
00786
00787 ms.deleteMixture(clientMixture);
00788 ms.deleteMixture(clientMixtureEM);
00789 ms.deleteMixture(SAVclientMixture);
00790 ms.deleteUnusedDistribs();
00791
00792 NbFramesSelected.clear();
00793 decision.clear();
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803 if (!Fast)
00804 {
00805 FeatServ.deleteAllObjects();
00806 SegServ.deleteAllObjects();
00807 }
00808
00809 testsToCompute.reset();
00810
00811 if (Fast)
00812 {
00813 delete & fs;
00814 delete & segmentsServer;
00815 }
00816
00817
00818 if (ms.getMixtureCount() > (unsigned long)configTest.getParam("MaxMixturesCount").toLong())
00819 {
00820 if (verbose)
00821 cout << "Reset MixtureServer and reload of the used mixtures" << endl;
00822
00823 ms.reset();
00824 MixtureGD & world = ms.loadMixtureGD(inputWorldFilename);
00825
00826
00827 idAux = (ms.createMixtureGD(world.getDistribCount())).getId();
00828 idTmp = (ms.createMixtureGD(world.getDistribCount())).getId();
00829 }
00830 }
00831 }
00832
00833
00834 ms.deleteMixtures(0, ms.getMixtureCount());
00835 ms.deleteUnusedDistribs();
00836
00837 if (tnorm)
00838 stockTnorm.deleteAllObjects();
00839 if(znorm)
00840 stockZnorm.deleteAllObjects();
00841 outLLR.close();
00842
00843 return 0;
00844 }
00845
00846
00847
00848
00849
00850 #endif //!defined(ALIZE_TrainTarget_cpp)