Fabian projects done

This commit is contained in:
Fabian Sinz
2014-11-01 13:54:11 +01:00
parent f088ec9932
commit cc0d00a621
7 changed files with 95 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
function ll = invg_loglikelihood(x, p)
mu = p(1);
lambda = p(2);
ll = mean(.5*(log(lambda) - log(2*pi) - 3*log(x)) - lambda*(x-mu).^2./(2*mu^2*x));
ll = .5*(log(lambda) - log(2*pi) - 3*log(x)) - ...
lambda*(x-mu).^2./(2*mu^2*x);

View File

@@ -1,4 +1,4 @@
function [err, grad] = lserr(param, x, y)
function [err, grad] = lserr(x, y, param)
err = mean( (param(1)*x + param(2) - y).^2 );
if nargout == 2