Filter löschen
Filter löschen

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

3 Ansichten (letzte 30 Tage)
Deepankar Vishwakarma
Deepankar Vishwakarma am 25 Apr. 2021
Beantwortet: Nipun am 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 Kommentar
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Nipun
Nipun am 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

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by