@@ -58,12 +58,14 @@ namespace Timbl {
5858 stats.clear ();
5959 delete confusionInfo;
6060 confusionInfo = 0 ;
61- if ( Verbosity (ADVANCED_STATS) )
61+ if ( Verbosity (ADVANCED_STATS) ){
6262 confusionInfo = new ConfusionMatrix ( Targets->ValuesArray .size () );
63+ }
6364 if ( !is_copy ){
6465 InitWeights ();
65- if ( do_diversify )
66+ if ( do_diversify ){
6667 diverseWeights ();
68+ }
6769 srand ( random_seed );
6870 }
6971 MBL_init = true ;
@@ -120,8 +122,9 @@ namespace Timbl {
120122 TiCC::Timer learnT;
121123 learnT.start ();
122124 InitInstanceBase ();
123- if ( ExpInvalid () )
125+ if ( ExpInvalid () ){
124126 return false ;
127+ }
125128 if ( EffectiveFeatures () < 2 ){
126129 fileIndex fmIndex;
127130 result = build_file_index ( CurrentDataFile, fmIndex );
@@ -149,8 +152,9 @@ namespace Timbl {
149152 chopLine ( Buffer );
150153 // Progress update.
151154 //
152- if (( stats.dataLines () % Progress () ) == 0 )
155+ if ( ( stats.dataLines () % Progress () ) == 0 ){
153156 time_stamp ( " Learning: " , stats.dataLines () );
157+ }
154158 chopped_to_instance ( TrainWords );
155159 if ( !outInstanceBase ){
156160 outInstanceBase = new IG_InstanceBase ( EffectiveFeatures (),
@@ -159,7 +163,6 @@ namespace Timbl {
159163 false ,
160164 true );
161165 }
162- // cerr << "add instance " << &CurrInst << endl;
163166 outInstanceBase->AddInstance ( CurrInst );
164167 ++sit;
165168 }
@@ -227,8 +230,9 @@ namespace Timbl {
227230 chopLine ( Buffer );
228231 // Progress update.
229232 //
230- if (( stats.dataLines () % Progress () ) == 0 )
233+ if ( ( stats.dataLines () % Progress () ) == 0 ){
231234 time_stamp ( " Learning: " , stats.dataLines () );
235+ }
232236 chopped_to_instance ( TrainWords );
233237 if ( !PartInstanceBase ){
234238 PartInstanceBase = new IG_InstanceBase ( EffectiveFeatures (),
@@ -286,15 +290,17 @@ namespace Timbl {
286290 chopLine ( Buffer );
287291 // Progress update.
288292 //
289- if (( stats.dataLines () % Progress () ) == 0 )
293+ if ( ( stats.dataLines () % Progress () ) == 0 ){
290294 time_stamp ( " Learning: " , stats.dataLines () );
295+ }
291296 chopped_to_instance ( TrainWords );
292- if ( !outInstanceBase )
297+ if ( !outInstanceBase ){
293298 outInstanceBase = new IG_InstanceBase ( EffectiveFeatures (),
294299 ibCount,
295300 (RandomSeed ()>=0 ),
296301 false ,
297302 true );
303+ }
298304 // cerr << "add instance " << &CurrInst << endl;
299305 outInstanceBase->AddInstance ( CurrInst );
300306 ++sit;
@@ -415,9 +421,10 @@ namespace Timbl {
415421 }
416422
417423 void IG_Experiment::showTestingInfo ( ostream& os ){
418- if ( !Verbosity (SILENT)) {
419- if ( Verbosity (OPTIONS) )
424+ if ( !Verbosity (SILENT) ) {
425+ if ( Verbosity (OPTIONS) ){
420426 ShowSettings ( os );
427+ }
421428 os << endl << " Starting to test, Testfile: " << testStreamName << endl
422429 << " Writing output in: " << outStreamName << endl
423430 << " Algorithm : IGTree" << endl;
@@ -436,8 +443,9 @@ namespace Timbl {
436443 Warning ( " can't open outputfile: " + FileName );
437444 }
438445 else {
439- if ( !Verbosity (SILENT) )
446+ if ( !Verbosity (SILENT) ){
440447 Info ( " Writing Instance-Base in: " + FileName );
448+ }
441449 if ( PutInstanceBase ( outfile ) ){
442450 string tmp = FileName;
443451 tmp += " .wgt" ;
0 commit comments