#include <plda.h>
Classes | |
struct | ClassInfo |
Public Member Functions | |
PldaStats () | |
void | AddSamples (double weight, const Matrix< double > &group) |
The dimension is set up the first time you add samples. More... | |
int32 | Dim () const |
void | Init (int32 dim) |
void | Sort () |
bool | IsSorted () const |
~PldaStats () | |
Protected Attributes | |
int32 | dim_ |
int64 | num_classes_ |
int64 | num_examples_ |
double | class_weight_ |
double | example_weight_ |
Vector< double > | sum_ |
SpMatrix< double > | offset_scatter_ |
std::vector< ClassInfo > | class_info_ |
Private Member Functions | |
KALDI_DISALLOW_COPY_AND_ASSIGN (PldaStats) | |
Friends | |
class | PldaEstimator |
void AddSamples | ( | double | weight, |
const Matrix< double > & | group | ||
) |
The dimension is set up the first time you add samples.
This function adds training samples corresponding to one class (e.g. a speaker). Each row is a separate sample from this group. The "weight" would normally be 1.0, but you can set it to other values if you want to weight your training samples.
Definition at line 286 of file plda.cc.
References VectorBase< Real >::AddRowSumMat(), KALDI_ASSERT, kaldi::kTrans, rnnlm::n, MatrixBase< Real >::NumCols(), and MatrixBase< Real >::NumRows().
Referenced by main(), and kaldi::UnitTestPldaEstimation().
void Init | ( | int32 | dim | ) |
Definition at line 325 of file plda.cc.
References KALDI_ASSERT.
bool IsSorted | ( | ) | const |
Definition at line 318 of file plda.cc.
References rnnlm::i.
Referenced by PldaEstimator::PldaEstimator().
|
private |
|
inline |
Definition at line 188 of file plda.h.
References kaldi::IsSorted().
Referenced by main(), and kaldi::UnitTestPldaEstimation().
|
friend |
|
protected |
Definition at line 220 of file plda.h.
Referenced by PldaEstimator::ComputeObjfPart2(), and PldaEstimator::GetStatsFromClassMeans().
|
protected |
Definition at line 198 of file plda.h.
Referenced by PldaEstimator::ComputeObjfPart1(), PldaEstimator::ComputeObjfPart2(), PldaEstimator::GetOutput(), PldaEstimator::GetStatsFromClassMeans(), and PldaEstimator::GetStatsFromIntraClass().
|
protected |
Definition at line 199 of file plda.h.
Referenced by PldaEstimator::ComputeObjf(), PldaEstimator::ComputeObjfPart1(), PldaEstimator::Estimate(), and PldaEstimator::GetStatsFromIntraClass().
|
protected |
Definition at line 204 of file plda.h.
Referenced by PldaEstimator::ComputeObjfPart1(), and PldaEstimator::GetStatsFromIntraClass().
|
protected |
Definition at line 201 of file plda.h.
Referenced by PldaEstimator::ComputeObjfPart2(), PldaEstimator::GetOutput(), and PldaEstimator::GetStatsFromClassMeans().