-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Fixed parameter estimation for MP GaussI and MP GammaI
self distances are not included in mean/var calculations anymore not fixed for MP Gauss yet"
- Loading branch information
Showing
1 changed file
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,8 +36,7 @@ | |
elseif (strcmp(type, 'gauss') == 1) | ||
mp_func = @mp_gauss; | ||
elseif (strcmp(type, 'gaussi') == 1) | ||
% (c) 2013, Dominik Schnitzer <[email protected]> | ||
% (c) 2016, Roman Feldbauer <[email protected]> mp_func = @mp_gaussi; | ||
mp_func = @mp_gaussi; | ||
elseif (strcmp(type, 'gammai') == 1) | ||
mp_func = @mp_gammai; | ||
else | ||
|
@@ -85,8 +84,10 @@ | |
|
||
function Dmp = mp_gaussi(D) | ||
|
||
mu = mean(D); | ||
sd = std(D); | ||
D(1:length(D)+1:numel(D)) = nan; | ||
mu = nanmean(D); | ||
sd = nanstd(D); | ||
D(1:length(D)+1:numel(D)) = 0; | ||
|
||
Dmp = zeros(size(D), class(D)); | ||
n = length(D); | ||
|
@@ -159,10 +160,12 @@ | |
|
||
function Dmp = mp_gammai(D) | ||
|
||
mu = mean(D); | ||
va = var(D); | ||
D(1:length(D)+1:numel(D)) = nan; | ||
mu = nanmean(D); | ||
va = nanvar(D); | ||
A = (mu.^2)./va; | ||
B = va ./ mu; | ||
D(1:length(D)+1:numel(D)) = 0; | ||
|
||
Dmp = zeros(size(D), class(D)); | ||
n = size(D, 1); | ||
|