Effacer les filtres
Effacer les filtres

Getting the value of a matrix argument post maximizing a function.

3 vues (au cours des 30 derniers jours)
Deepankar Vishwakarma
Deepankar Vishwakarma le 25 Avr 2021
Réponse apportée : Nipun le 16 Mai 2024
Hello there,
I was stuck on a problem of maximinzing a posterior probability and wanted the value of 'w' at which it is maximized.
The posterior function is -
posterior = ((2*pi)^(-M/2)) * (det(SIGMA)^(-1/2)) * exp((-1/2) * (w-mu)' * isigma * (w-mu));
where mu, M, SIGMA, isigma are constant. Also, w, SIGMA, isigma, mu are matrices of suitable dimentions.
I could not find a particular solution to the problem. Any help is appreciated.
Thanks
  1 commentaire
Thiago Henrique Gomes Lobato
This posteriori is a multivariate Gaussian, the maximum is when w=mu, so if you have mu you already have the maximum.

Connectez-vous pour commenter.

Réponses (1)

Nipun
Nipun le 16 Mai 2024
Hi Deepankar,
I understand that you are trying to find the value of (w) that maximizes the posterior probability described by a multivariate Gaussian distribution. The maximum of this distribution occurs at its mean (\mu), which means the value of (w) you are looking for is equal to (\mu).
Here is a concise MATLAB code snippet that assigns the value of (\mu) to (w), assuming you have already defined (\mu) and other necessary variables:
% Assuming mu is defined and represents the mean vector of your distribution
w = mu; % This assigns the maximizing value to w
Given the nature of the problem, there is no need for further optimization routines or calculations. The result is derived from the mathematical properties of the multivariate Gaussian distribution, where the density function is maximized at the mean (\mu).
Hope this helps.
Regards,
Nipun

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by