Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
sth4nth committed Dec 7, 2015
1 parent e5840ba commit c007a90
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 19 deletions.
10 changes: 10 additions & 0 deletions chapter11/dirichletRnd.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function x = dirichletRnd(a, m)
% Sampling from a Dirichlet distribution.
% a: k dimensional vector
% m: k dimensional mean vector
% Written by Mo Chen ([email protected]).
if nargin == 2
a = a*m;
end
x = gamrnd(a,1);
x = x/sum(x);
2 changes: 1 addition & 1 deletion chapter11/rndDiscrete.m → chapter11/discreteRnd.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function x = rndDiscrete(p, n)
function x = discreteRnd(p, n)
% Sampling from a discrete distribution (multinomial).
% Written by Mo Chen ([email protected]).
if nargin == 1
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion chapter11/rndKmeans.m → chapter11/kmeansRnd.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [X, z, center] = rndKmeans(d, k, n)
function [X, z, center] = kmeansRnd(d, k, n)
% Sampling from a Gaussian mixture distribution with common variances (kmeans model).
% Written by Michael Chen ([email protected]).
a = 1;
Expand Down
5 changes: 0 additions & 5 deletions chapter11/rndDirichlet.m

This file was deleted.

12 changes: 0 additions & 12 deletions helper/rndKCluster.m

This file was deleted.

0 comments on commit c007a90

Please sign in to comment.