All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SplitExampleStats Struct Reference

This struct exists only for diagnostic purposes. More...

#include <nnet-example-functions.h>

Collaboration diagram for SplitExampleStats:

Public Member Functions

 SplitExampleStats ()
 
void Print ()
 

Public Attributes

int32 num_lattices
 
int32 longest_lattice
 
int32 num_segments
 
int32 num_kept_segments
 
int64 num_frames_orig
 
int64 num_frames_must_keep
 
int64 num_frames_kept_after_split
 
int32 longest_segment_after_split
 
int64 num_frames_kept_after_excise
 
int32 longest_segment_after_excise
 

Detailed Description

This struct exists only for diagnostic purposes.

Note: the stats assume that you call SplitDiscriminative and ExciseDiscriminativeExample in the same program, and the info printed out will be wrong if this is not the case... this isn't ideal but it was more convenient.

Definition at line 121 of file nnet-example-functions.h.

Constructor & Destructor Documentation

SplitExampleStats ( )
inline

Definition at line 133 of file nnet-example-functions.h.

133 { memset(this, 0, sizeof(*this)); }

Member Function Documentation

void Print ( )

Definition at line 573 of file nnet-example-functions.cc.

References KALDI_LOG, SplitExampleStats::longest_lattice, SplitExampleStats::longest_segment_after_excise, SplitExampleStats::longest_segment_after_split, SplitExampleStats::num_frames_kept_after_excise, SplitExampleStats::num_frames_kept_after_split, SplitExampleStats::num_frames_must_keep, SplitExampleStats::num_frames_orig, SplitExampleStats::num_kept_segments, SplitExampleStats::num_lattices, and SplitExampleStats::num_segments.

Referenced by main().

573  {
574  KALDI_LOG << "Split " << num_lattices << " lattices. Stats:";
575  double kept_segs_per_lat = num_kept_segments * 1.0 / num_lattices,
576  segs_per_lat = num_segments * 1.0 / num_lattices;
577 
578  KALDI_LOG << "Made on average " << segs_per_lat << " segments per lattice, "
579  << "of which " << kept_segs_per_lat << " were kept.";
580 
581  double percent_needed = num_frames_must_keep * 100.0 / num_frames_orig,
582  percent_after_split = num_frames_kept_after_split * 100.0 / num_frames_orig,
583  percent_after_excise = num_frames_kept_after_excise * 100.0 / num_frames_orig;
584 
585  KALDI_LOG << "Needed to keep " << percent_needed << "% of frames, after split "
586  << "kept " << percent_after_split << "%, after excising frames kept "
587  << percent_after_excise << "%.";
588 
589  KALDI_LOG << "Longest lattice had " << longest_lattice
590  << " frames, longest segment after splitting had "
592  << " frames, longest segment after excising had "
594 }
#define KALDI_LOG
Definition: kaldi-error.h:133

Member Data Documentation

int32 longest_lattice
int32 longest_segment_after_excise
int32 longest_segment_after_split
int64 num_frames_kept_after_excise
int64 num_frames_kept_after_split
int64 num_frames_must_keep
int64 num_frames_orig
int32 num_kept_segments
int32 num_lattices
int32 num_segments

The documentation for this struct was generated from the following files: