---
name: "mlpack_gmm_EigenvalueRatioConstraint"
section: "3"
platform: "linux"
package: "mlpack-doc"
version: "1.0.10-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlpack_gmm_EigenvalueRatioConstraint"
---

# mlpack\_gmm\_EigenvalueRatioConstraint(3)

Given a vector of eigenvalue ratios, ensure that the covariance matrix always has those eigenvalue ratios.

## NAME

mlpack::gmm::EigenvalueRatioConstraint -

Given a vector of eigenvalue ratios, ensure that the covariance matrix always has those eigenvalue ratios.

## SYNOPSIS

### Public Member Functions

**EigenvalueRatioConstraint** (const arma::vec &**ratios**)\
 *Create the* **EigenvalueRatioConstraint** *object with the given vector of eigenvalue ratios.*  void **ApplyConstraint** (arma::mat &covariance) const \
 *Apply the eigenvalue ratio constraint to the given covariance matrix.*

### Private Attributes

const arma::vec & **ratios**\
 *Ratios for eigenvalues.*

## Detailed Description

Given a vector of eigenvalue ratios, ensure that the covariance matrix always has those eigenvalue ratios.

When you create this object, make sure that the vector of ratios that you pass does not go out of scope, because this object holds a reference to that vector instead of copying it.

Definition at line 36 of file eigenvalue\_ratio\_constraint.hpp.

## Constructor & Destructor Documentation

### mlpack::gmm::EigenvalueRatioConstraint::EigenvalueRatioConstraint (const arma::vec &ratios)` [inline]`

Create the **EigenvalueRatioConstraint** object with the given vector of eigenvalue ratios. These ratios are with respect to the first eigenvalue, which is the largest eigenvalue, so the first element of the vector should be 1. In addition, all other elements should be less than or equal to 1.

Definition at line 45 of file eigenvalue\_ratio\_constraint.hpp.

References mlpack::Log::Fatal, and mlpack::Log::Warn.

## Member Function Documentation

### void mlpack::gmm::EigenvalueRatioConstraint::ApplyConstraint (arma::mat &covariance) const` [inline]`

Apply the eigenvalue ratio constraint to the given covariance matrix.

Definition at line 70 of file eigenvalue\_ratio\_constraint.hpp.

References ratios.

## Member Data Documentation

### const arma::vec& mlpack::gmm::EigenvalueRatioConstraint::ratios` [private]`

Ratios for eigenvalues.

Definition at line 89 of file eigenvalue\_ratio\_constraint.hpp.

Referenced by ApplyConstraint().

## Author

Generated automatically by Doxygen for MLPACK from the source code.
