PldaEstimator Class Reference

#include <plda.h>

Collaboration diagram for PldaEstimator:

Public Member Functions

 PldaEstimator (const PldaStats &stats)
 
void Estimate (const PldaEstimationConfig &config, Plda *output)
 

Private Types

typedef PldaStats::ClassInfo ClassInfo
 

Private Member Functions

double ComputeObjfPart1 () const
 Returns the part of the objf relating to offsets from the class means. More...
 
double ComputeObjfPart2 () const
 Returns the part of the obj relating to the class means (total_not normalized) More...
 
double ComputeObjf () const
 Returns the objective-function per sample. More...
 
int32 Dim () const
 
void EstimateOneIter ()
 
void InitParameters ()
 
void ResetPerIterStats ()
 
void GetStatsFromIntraClass ()
 
void GetStatsFromClassMeans ()
 GetStatsFromClassMeans() is the more complicated part of PLDA estimation. More...
 
void EstimateFromStats ()
 
void GetOutput (Plda *plda)
 
 KALDI_DISALLOW_COPY_AND_ASSIGN (PldaEstimator)
 

Private Attributes

const PldaStatsstats_
 
SpMatrix< double > within_var_
 
SpMatrix< double > between_var_
 
SpMatrix< double > within_var_stats_
 
double within_var_count_
 
SpMatrix< double > between_var_stats_
 
double between_var_count_
 

Detailed Description

Definition at line 235 of file plda.h.

Member Typedef Documentation

◆ ClassInfo

Definition at line 242 of file plda.h.

Constructor & Destructor Documentation

◆ PldaEstimator()

PldaEstimator ( const PldaStats stats)

Definition at line 338 of file plda.cc.

References PldaEstimator::InitParameters(), PldaStats::IsSorted(), and KALDI_ASSERT.

338  :
339  stats_(stats) {
340  KALDI_ASSERT(stats.IsSorted());
341  InitParameters();
342 }
const PldaStats & stats_
Definition: plda.h:275
void InitParameters()
Definition: plda.cc:402
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185

Member Function Documentation

◆ ComputeObjf()

double ComputeObjf ( ) const
private

Returns the objective-function per sample.

Definition at line 390 of file plda.cc.

References PldaEstimator::ComputeObjfPart1(), PldaEstimator::ComputeObjfPart2(), PldaStats::example_weight_, KALDI_LOG, and PldaEstimator::stats_.

Referenced by PldaEstimator::EstimateOneIter().

390  {
391  double ans1 = ComputeObjfPart1(),
392  ans2 = ComputeObjfPart2(),
393  ans = ans1 + ans2,
394  example_weights = stats_.example_weight_,
395  normalized_ans = ans / example_weights;
396  KALDI_LOG << "Within-class objf per sample is " << (ans1 / example_weights)
397  << ", between-class is " << (ans2 / example_weights)
398  << ", total is " << normalized_ans;
399  return normalized_ans;
400 }
double example_weight_
Definition: plda.h:199
const PldaStats & stats_
Definition: plda.h:275
double ComputeObjfPart2() const
Returns the part of the obj relating to the class means (total_not normalized)
Definition: plda.cc:365
double ComputeObjfPart1() const
Returns the part of the objf relating to offsets from the class means.
Definition: plda.cc:345
#define KALDI_LOG
Definition: kaldi-error.h:153

◆ ComputeObjfPart1()

double ComputeObjfPart1 ( ) const
private

Returns the part of the objf relating to offsets from the class means.

(total, not normalized)

Definition at line 345 of file plda.cc.

References PldaStats::class_weight_, PldaEstimator::Dim(), PldaStats::example_weight_, SpMatrix< Real >::Invert(), KALDI_ASSERT, M_LOG_2PI, PldaStats::offset_scatter_, PldaEstimator::stats_, kaldi::TraceSpSp(), and PldaEstimator::within_var_.

Referenced by PldaEstimator::ComputeObjf().

345  {
346  // Returns the part of the objf relating to offsets from the class means.
347  // within_class_count equals the sum over the classes, of the weight of that
348  // class (normally 1) times (1 - #examples) of that class, which equals the
349  // rank of the covariance we're modeling. We imagine that we're modeling (1 -
350  // #examples) separate samples, each with the within-class covariance.. the
351  // argument is a little complicated and involves an orthogonal complement of a
352  // matrix whose first row computes the mean.
353 
354  double within_class_count = stats_.example_weight_ - stats_.class_weight_,
355  within_logdet, det_sign;
356  SpMatrix<double> inv_within_var(within_var_);
357  inv_within_var.Invert(&within_logdet, &det_sign);
358  KALDI_ASSERT(det_sign == 1 && "Within-class covariance is singular");
359 
360  double objf = -0.5 * (within_class_count * (within_logdet + M_LOG_2PI * Dim())
361  + TraceSpSp(inv_within_var, stats_.offset_scatter_));
362  return objf;
363 }
#define M_LOG_2PI
Definition: kaldi-math.h:60
double example_weight_
Definition: plda.h:199
SpMatrix< double > offset_scatter_
Definition: plda.h:204
const PldaStats & stats_
Definition: plda.h:275
double class_weight_
Definition: plda.h:198
double TraceSpSp(const SpMatrix< double > &A, const SpMatrix< double > &B)
Definition: sp-matrix.cc:326
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185
int32 Dim() const
Definition: plda.h:255
SpMatrix< double > within_var_
Definition: plda.h:277

◆ ComputeObjfPart2()

double ComputeObjfPart2 ( ) const
private

Returns the part of the obj relating to the class means (total_not normalized)

Definition at line 365 of file plda.cc.

References SpMatrix< Real >::AddSp(), VectorBase< Real >::AddVec(), PldaEstimator::between_var_, PldaStats::class_info_, PldaStats::class_weight_, SpMatrix< Real >::CopyFromSp(), PldaEstimator::Dim(), rnnlm::i, SpMatrix< Real >::Invert(), M_LOG_2PI, PldaStats::ClassInfo::mean, rnnlm::n, PldaStats::ClassInfo::num_examples, PldaEstimator::stats_, PldaStats::sum_, kaldi::VecSpVec(), PldaStats::ClassInfo::weight, and PldaEstimator::within_var_.

Referenced by PldaEstimator::ComputeObjf().

365  {
366  double tot_objf = 0.0;
367 
368  int32 n = -1; // the number of examples for the current class
369  SpMatrix<double> combined_inv_var(Dim());
370  // combined_inv_var = (between_var_ + within_var_ / n)^{-1}
371  double combined_var_logdet;
372 
373  for (size_t i = 0; i < stats_.class_info_.size(); i++) {
374  const ClassInfo &info = stats_.class_info_[i];
375  if (info.num_examples != n) {
376  n = info.num_examples;
377  // variance of mean of n examples is between-class + 1/n * within-class
378  combined_inv_var.CopyFromSp(between_var_);
379  combined_inv_var.AddSp(1.0 / n, within_var_);
380  combined_inv_var.Invert(&combined_var_logdet);
381  }
382  Vector<double> mean (*(info.mean));
383  mean.AddVec(-1.0 / stats_.class_weight_, stats_.sum_);
384  tot_objf += info.weight * -0.5 * (combined_var_logdet + M_LOG_2PI * Dim()
385  + VecSpVec(mean, combined_inv_var, mean));
386  }
387  return tot_objf;
388 }
SpMatrix< double > between_var_
Definition: plda.h:278
#define M_LOG_2PI
Definition: kaldi-math.h:60
kaldi::int32 int32
Vector< double > sum_
Definition: plda.h:201
const PldaStats & stats_
Definition: plda.h:275
PldaStats::ClassInfo ClassInfo
Definition: plda.h:242
double class_weight_
Definition: plda.h:198
struct rnnlm::@11::@12 n
Real VecSpVec(const VectorBase< Real > &v1, const SpMatrix< Real > &M, const VectorBase< Real > &v2)
Computes v1^T * M * v2.
Definition: sp-matrix.cc:964
int32 Dim() const
Definition: plda.h:255
SpMatrix< double > within_var_
Definition: plda.h:277
std::vector< ClassInfo > class_info_
Definition: plda.h:220

◆ Dim()

◆ Estimate()

void Estimate ( const PldaEstimationConfig config,
Plda output 
)

Definition at line 525 of file plda.cc.

References PldaEstimator::EstimateOneIter(), PldaStats::example_weight_, PldaEstimator::GetOutput(), rnnlm::i, KALDI_ASSERT, KALDI_LOG, PldaEstimationConfig::num_em_iters, and PldaEstimator::stats_.

Referenced by main(), and kaldi::UnitTestPldaEstimation().

526  {
527  KALDI_ASSERT(stats_.example_weight_ > 0 && "Cannot estimate with no stats");
528  for (int32 i = 0; i < config.num_em_iters; i++) {
529  KALDI_LOG << "Plda estimation iteration " << i
530  << " of " << config.num_em_iters;
531  EstimateOneIter();
532  }
533  GetOutput(plda);
534 }
double example_weight_
Definition: plda.h:199
kaldi::int32 int32
const PldaStats & stats_
Definition: plda.h:275
void EstimateOneIter()
Definition: plda.cc:516
void GetOutput(Plda *plda)
Definition: plda.cc:537
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185
#define KALDI_LOG
Definition: kaldi-error.h:153

◆ EstimateFromStats()

void EstimateFromStats ( )
private

Definition at line 505 of file plda.cc.

References PldaEstimator::between_var_, PldaEstimator::between_var_count_, PldaEstimator::between_var_stats_, SpMatrix< Real >::CopyFromSp(), KALDI_LOG, PackedMatrix< Real >::Scale(), SpMatrix< Real >::Trace(), PldaEstimator::within_var_, PldaEstimator::within_var_count_, and PldaEstimator::within_var_stats_.

Referenced by PldaEstimator::EstimateOneIter().

505  {
510 
511  KALDI_LOG << "Trace of within-class variance is " << within_var_.Trace();
512  KALDI_LOG << "Trace of between-class variance is " << between_var_.Trace();
513 }
SpMatrix< double > between_var_
Definition: plda.h:278
void Scale(Real c)
SpMatrix< double > within_var_stats_
Definition: plda.h:281
Real Trace() const
Definition: sp-matrix.cc:171
void CopyFromSp(const SpMatrix< Real > &other)
Definition: sp-matrix.h:85
double between_var_count_
Definition: plda.h:284
double within_var_count_
Definition: plda.h:282
SpMatrix< double > within_var_
Definition: plda.h:277
SpMatrix< double > between_var_stats_
Definition: plda.h:283
#define KALDI_LOG
Definition: kaldi-error.h:153

◆ EstimateOneIter()

void EstimateOneIter ( )
private

Definition at line 516 of file plda.cc.

References PldaEstimator::ComputeObjf(), PldaEstimator::EstimateFromStats(), PldaEstimator::GetStatsFromClassMeans(), PldaEstimator::GetStatsFromIntraClass(), KALDI_VLOG, and PldaEstimator::ResetPerIterStats().

Referenced by PldaEstimator::Estimate().

516  {
521  KALDI_VLOG(2) << "Objective function is " << ComputeObjf();
522 }
void EstimateFromStats()
Definition: plda.cc:505
void ResetPerIterStats()
Definition: plda.cc:409
void GetStatsFromClassMeans()
GetStatsFromClassMeans() is the more complicated part of PLDA estimation.
Definition: plda.cc:470
#define KALDI_VLOG(v)
Definition: kaldi-error.h:156
double ComputeObjf() const
Returns the objective-function per sample.
Definition: plda.cc:390
void GetStatsFromIntraClass()
Definition: plda.cc:416

◆ GetOutput()

void GetOutput ( Plda plda)
private

Definition at line 537 of file plda.cc.

References SpMatrix< Real >::AddMat2Sp(), MatrixBase< Real >::AddMatMat(), VectorBase< Real >::ApplyFloor(), kaldi::AssertEqual(), PldaEstimator::between_var_, PldaStats::class_weight_, Plda::ComputeDerivedVars(), kaldi::ComputeNormalizingTransform(), PldaEstimator::Dim(), SpMatrix< Real >::Eig(), kaldi::GetVerboseLevel(), SpMatrix< Real >::IsUnit(), KALDI_ASSERT, KALDI_LOG, KALDI_WARN, kaldi::kNoTrans, kaldi::kTrans, Plda::mean_, VectorBase< Real >::Min(), rnnlm::n, VectorBase< Real >::Norm(), Plda::psi_, Matrix< Real >::Resize(), VectorBase< Real >::Scale(), kaldi::SortSvd(), PldaEstimator::stats_, PldaStats::sum_, Plda::transform_, and PldaEstimator::within_var_.

Referenced by PldaEstimator::Estimate().

537  {
538  plda->mean_ = stats_.sum_;
539  plda->mean_.Scale(1.0 / stats_.class_weight_);
540  KALDI_LOG << "Norm of mean of iVector distribution is "
541  << plda->mean_.Norm(2.0);
542 
543  Matrix<double> transform1(Dim(), Dim());
545  // now transform is a matrix that if we project with it,
546  // within_var_ becomes unit.
547 
548  // between_var_proj is between_var after projecting with transform1.
549  SpMatrix<double> between_var_proj(Dim());
550  between_var_proj.AddMat2Sp(1.0, transform1, kNoTrans, between_var_, 0.0);
551 
552  Matrix<double> U(Dim(), Dim());
553  Vector<double> s(Dim());
554  // Do symmetric eigenvalue decomposition between_var_proj = U diag(s) U^T,
555  // where U is orthogonal.
556  between_var_proj.Eig(&s, &U);
557 
558  KALDI_ASSERT(s.Min() >= 0.0);
559  int32 n;
560  s.ApplyFloor(0.0, &n);
561  if (n > 0) {
562  KALDI_WARN << "Floored " << n << " eigenvalues of between-class "
563  << "variance to zero.";
564  }
565  // Sort from greatest to smallest eigenvalue.
566  SortSvd(&s, &U);
567 
568  // The transform U^T will make between_var_proj diagonal with value s
569  // (i.e. U^T U diag(s) U U^T = diag(s)). The final transform that
570  // makes within_var_ unit and between_var_ diagonal is U^T transform1,
571  // i.e. first transform1 and then U^T.
572 
573  plda->transform_.Resize(Dim(), Dim());
574  plda->transform_.AddMatMat(1.0, U, kTrans, transform1, kNoTrans, 0.0);
575  plda->psi_ = s;
576 
577  KALDI_LOG << "Diagonal of between-class variance in normalized space is " << s;
578 
579  if (GetVerboseLevel() >= 2) { // at higher verbose levels, do a self-test
580  // (just tests that this function does what it
581  // should).
582  SpMatrix<double> tmp_within(Dim());
583  tmp_within.AddMat2Sp(1.0, plda->transform_, kNoTrans, within_var_, 0.0);
584  KALDI_ASSERT(tmp_within.IsUnit(0.0001));
585  SpMatrix<double> tmp_between(Dim());
586  tmp_between.AddMat2Sp(1.0, plda->transform_, kNoTrans, between_var_, 0.0);
587  KALDI_ASSERT(tmp_between.IsDiagonal(0.0001));
588  Vector<double> psi(Dim());
589  psi.CopyDiagFromSp(tmp_between);
590  AssertEqual(psi, plda->psi_);
591  }
592  plda->ComputeDerivedVars();
593 }
SpMatrix< double > between_var_
Definition: plda.h:278
int32 GetVerboseLevel()
Get verbosity level, usually set via command line &#39;–verbose=&#39; switch.
Definition: kaldi-error.h:60
kaldi::int32 int32
Vector< double > sum_
Definition: plda.h:201
const PldaStats & stats_
Definition: plda.h:275
static void ComputeNormalizingTransform(const SpMatrix< Real > &covar, MatrixBase< Real > *proj)
This function computes a projection matrix that when applied makes the covariance unit (i...
Definition: plda.cc:46
double class_weight_
Definition: plda.h:198
struct rnnlm::@11::@12 n
#define KALDI_WARN
Definition: kaldi-error.h:150
void Scale(Real alpha)
Multiplies all elements by this constant.
#define KALDI_ASSERT(cond)
Definition: kaldi-error.h:185
int32 Dim() const
Definition: plda.h:255
SpMatrix< double > within_var_
Definition: plda.h:277
static void AssertEqual(float a, float b, float relative_tolerance=0.001)
assert abs(a - b) <= relative_tolerance * (abs(a)+abs(b))
Definition: kaldi-math.h:276
#define KALDI_LOG
Definition: kaldi-error.h:153
void SortSvd(VectorBase< Real > *s, MatrixBase< Real > *U, MatrixBase< Real > *Vt, bool sort_on_absolute_value)
Function to ensure that SVD is sorted.

◆ GetStatsFromClassMeans()

void GetStatsFromClassMeans ( )
private

GetStatsFromClassMeans() is the more complicated part of PLDA estimation.

Let's suppose the mean of a particular class is m, and suppose that that class had n examples. We suppose that m ~ N(0, between_var_ + 1/n within_var_) i.e. m is Gaussian-distributed with zero mean and variance equal to the between-class variance plus 1/n times the within-class variance. Now, m is observed (as stats_.class_info_[something].mean). We're doing an E-M procedure where we treat m as the sum of two variables: m = x + y where x ~ N(0, between_var_) y ~ N(0, 1/n * within_var_) The distribution of x will contribute to the stats of between_var_, and y to within_var_. Now, y = m - x, so we can focus on working out the distribution of x and then we can very simply get the distribution of y. The following expression also includes the likelihood of y as a function of x. Note: the C is different from line to line.

log p(x) = C - 0.5 ( x^T between_var^{-1} x + (m-x)^T (1/n within_var)^{-1) (m-x) ) = C - 0.5 x^T (between_var^{-1} + n within_var^{-1}) x + x^T z

where z = n within_var^{-1} m, and we can write this as:

log p(x) = C - 0.5 (x-w)^T (between_var^{-1} + n within_var^{-1}) (x-w)

where x^T (between_var^{-1} + n within_var^{-1}) w = x^T z, i.e. (between_var^{-1} + n within_var^{-1}) w = z = n within_var^{-1} m, so

w = (between_var^{-1} + n within_var^{-1})^{-1} * n within_var^{-1} m

We can see that the distribution over x is Gaussian, with mean w and variance (between_var^{-1} + n within_var^{-1})^{-1}. The distribution over y is Gaussian with the same variance, and mean m - w. So the update to the between-var stats will be: between-var-stats += w w^T + (between_var^{-1} + n within_var^{-1})^{-1}. and the update to the within-var stats will be: within-var-stats += n ( (m-w) (m-w)^T (between_var^{-1} + n within_var^{-1})^{-1} ).

The drawback of this formulation is that each time we encounter a different value of n (number of examples) we will have to do a different matrix inversion. We'll try to improve on this later using a suitable transform.

Definition at line 470 of file plda.cc.

References SpMatrix< Real >::AddSp(), VectorBase< Real >::AddSpVec(), VectorBase< Real >::AddVec(), SpMatrix< Real >::AddVec2(), PldaEstimator::between_var_, PldaEstimator::between_var_count_, PldaEstimator::between_var_stats_, PldaStats::class_info_, PldaStats::class_weight_, SpMatrix< Real >::CopyFromSp(), PldaEstimator::Dim(), rnnlm::i, SpMatrix< Real >::Invert(), PldaStats::ClassInfo::mean, rnnlm::n, PldaStats::ClassInfo::num_examples, PldaEstimator::stats_, PldaStats::sum_, PldaStats::ClassInfo::weight, PldaEstimator::within_var_, PldaEstimator::within_var_count_, and PldaEstimator::within_var_stats_.

Referenced by PldaEstimator::EstimateOneIter().

470  {
471  SpMatrix<double> between_var_inv(between_var_);
472  between_var_inv.Invert();
473  SpMatrix<double> within_var_inv(within_var_);
474  within_var_inv.Invert();
475  // mixed_var will equal (between_var^{-1} + n within_var^{-1})^{-1}.
476  SpMatrix<double> mixed_var(Dim());
477  int32 n = -1; // the current number of examples for the class.
478 
479  for (size_t i = 0; i < stats_.class_info_.size(); i++) {
480  const ClassInfo &info = stats_.class_info_[i];
481  double weight = info.weight;
482  if (info.num_examples != n) {
483  n = info.num_examples;
484  mixed_var.CopyFromSp(between_var_inv);
485  mixed_var.AddSp(n, within_var_inv);
486  mixed_var.Invert();
487  }
488  Vector<double> m = *(info.mean); // the mean for this class.
489  m.AddVec(-1.0 / stats_.class_weight_, stats_.sum_); // remove global mean
490  Vector<double> temp(Dim()); // n within_var^{-1} m
491  temp.AddSpVec(n, within_var_inv, m, 0.0);
492  Vector<double> w(Dim()); // w, as defined in the comment.
493  w.AddSpVec(1.0, mixed_var, temp, 0.0);
494  Vector<double> m_w(m); // m - w
495  m_w.AddVec(-1.0, w);
496  between_var_stats_.AddSp(weight, mixed_var);
497  between_var_stats_.AddVec2(weight, w);
498  between_var_count_ += weight;
499  within_var_stats_.AddSp(weight * n, mixed_var);
500  within_var_stats_.AddVec2(weight * n, m_w);
501  within_var_count_ += weight;
502  }
503 }
SpMatrix< double > between_var_
Definition: plda.h:278
SpMatrix< double > within_var_stats_
Definition: plda.h:281
kaldi::int32 int32
Vector< double > sum_
Definition: plda.h:201
const PldaStats & stats_
Definition: plda.h:275
PldaStats::ClassInfo ClassInfo
Definition: plda.h:242
void AddVec2(const Real alpha, const VectorBase< OtherReal > &v)
rank-one update, this <– this + alpha v v&#39;
Definition: sp-matrix.cc:946
void AddSp(const Real alpha, const SpMatrix< Real > &Ma)
Definition: sp-matrix.h:211
double class_weight_
Definition: plda.h:198
struct rnnlm::@11::@12 n
double between_var_count_
Definition: plda.h:284
int32 Dim() const
Definition: plda.h:255
double within_var_count_
Definition: plda.h:282
SpMatrix< double > within_var_
Definition: plda.h:277
std::vector< ClassInfo > class_info_
Definition: plda.h:220
SpMatrix< double > between_var_stats_
Definition: plda.h:283

◆ GetStatsFromIntraClass()

void GetStatsFromIntraClass ( )
private

Definition at line 416 of file plda.cc.

References SpMatrix< Real >::AddSp(), PldaStats::class_weight_, PldaStats::example_weight_, PldaStats::offset_scatter_, PldaEstimator::stats_, PldaEstimator::within_var_count_, and PldaEstimator::within_var_stats_.

Referenced by PldaEstimator::EstimateOneIter().

416  {
418  // Note: in the normal case, the expression below will be equal to the sum
419  // over the classes, of (1-n), where n is the #examples for that class. That
420  // is the rank of the scatter matrix that "offset_scatter_" has for that
421  // class. [if weights other than 1.0 are used, it will be different.]
423 }
SpMatrix< double > within_var_stats_
Definition: plda.h:281
double example_weight_
Definition: plda.h:199
SpMatrix< double > offset_scatter_
Definition: plda.h:204
const PldaStats & stats_
Definition: plda.h:275
void AddSp(const Real alpha, const SpMatrix< Real > &Ma)
Definition: sp-matrix.h:211
double class_weight_
Definition: plda.h:198
double within_var_count_
Definition: plda.h:282

◆ InitParameters()

void InitParameters ( )
private

Definition at line 402 of file plda.cc.

References PldaEstimator::between_var_, PldaEstimator::Dim(), SpMatrix< Real >::Resize(), PackedMatrix< Real >::SetUnit(), and PldaEstimator::within_var_.

Referenced by PldaEstimator::PldaEstimator().

402  {
407 }
SpMatrix< double > between_var_
Definition: plda.h:278
void SetUnit()
< Set to zero
int32 Dim() const
Definition: plda.h:255
SpMatrix< double > within_var_
Definition: plda.h:277
void Resize(MatrixIndexT nRows, MatrixResizeType resize_type=kSetZero)
Definition: sp-matrix.h:81

◆ KALDI_DISALLOW_COPY_AND_ASSIGN()

KALDI_DISALLOW_COPY_AND_ASSIGN ( PldaEstimator  )
private

◆ ResetPerIterStats()

void ResetPerIterStats ( )
private

Definition at line 409 of file plda.cc.

References PldaEstimator::between_var_count_, PldaEstimator::between_var_stats_, PldaEstimator::Dim(), SpMatrix< Real >::Resize(), PldaEstimator::within_var_count_, and PldaEstimator::within_var_stats_.

Referenced by PldaEstimator::EstimateOneIter().

409  {
411  within_var_count_ = 0.0;
413  between_var_count_ = 0.0;
414 }
SpMatrix< double > within_var_stats_
Definition: plda.h:281
double between_var_count_
Definition: plda.h:284
int32 Dim() const
Definition: plda.h:255
double within_var_count_
Definition: plda.h:282
void Resize(MatrixIndexT nRows, MatrixResizeType resize_type=kSetZero)
Definition: sp-matrix.h:81
SpMatrix< double > between_var_stats_
Definition: plda.h:283

Member Data Documentation

◆ between_var_

◆ between_var_count_

double between_var_count_
private

◆ between_var_stats_

SpMatrix<double> between_var_stats_
private

◆ stats_

◆ within_var_

◆ within_var_count_

◆ within_var_stats_


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