Rank: 219 based on 334 downloads (last 30 days) and 8 files submitted
photo

Dahua Lin

E-mail
Company/University
MIT

Personal Profile:
Professional Interests:
Statistical Learning, Computer Vision

 

Watch this Author's files

 

Files Posted by Dahua View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
08 Nov 2008 Safe computation of logarithm-determinat of large matrix Computes the logarithm of determinant of a matrix in a safe way that avoids overflow/underflow. Author: Dahua Lin gaussian, logdet, determinant, logarithm, matrix 16 1
  • 5.0
5.0 | 3 ratings
28 Oct 2008 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin monte carlo, sampling, simulation, discrete distribution 52 6
  • 4.5
4.5 | 4 ratings
10 Oct 2008 String Toolkits A set of useful string manipulation functions that MATLAB does not offer Author: Dahua Lin strings, split, join string, string processing, string manipulation, string 92 3
10 Oct 2008 UUID Generation For generating UUID in MATLAB Author: Dahua Lin uuid, unique identifier, universal, utilities, miscellaneous 6 3
26 Aug 2008 Screenshot Minesweeper Game A minesweeper game similar to the one in Windows, but implemented in pure MATLAB Author: Dahua Lin games, game, minesweeper, mine, sweeper 31 3
Comments and Ratings by Dahua View all
Updated File Comments Rating
29 Oct 2008 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin

Jos,

I have checked with randp. Though they seem offering similar functionalities, however, the efficiency is drastically different, especially in very large scale monte carlo simulation, say you need to draw thousands or millions of samples from a distribution over thousands or even millions of states, which is not unusual in real engineering applications.

With randp, it would be incur obvious latency when you want to draw thousands of samples from thousands of states, or even run out of memory (thus resulting an empty matrix), as the algorithm implemented by randp is of complexity O(k n), where k is the number of states in the sample space. However, even million-state-level sampling can be accomplished by this function within milliseconds, as its complexity is only O(n logk).

Hope my explanation can clarify the differences between these two files.

28 Oct 2008 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin

There's a bug in the initial submission, which has been fixed, and the new version has been uploaded, which may come out in a day.

Comments and Ratings on Dahua's Files View all
Updated File Comment by Comments Rating
27 Feb 2013 Statistical Learning Toolbox Functions for statistical learning, pattern recognition and computer vision, covering many topics. Author: Dahua Lin Al-Dhamari, Ibraheem

Hi Dahua,
I am trying to use the 2D PCA but I don't get what are the parameters. e.g. Left Projection matrix? It would be better if you make the user input only the images and the function computes the other parameters.
Regards,

14 Feb 2013 UUID Generation For generating UUID in MATLAB Author: Dahua Lin M

on linux, you can also use system('uuidgen'). On Windows, you can create a simple vbs script: http://superuser.com/questions/155740/how-can-i-generate-a-uuid-from-the-command-line-in-windows-xp

10 Jan 2013 Safe computation of logarithm-determinat of large matrix Computes the logarithm of determinant of a matrix in a safe way that avoids overflow/underflow. Author: Dahua Lin Choudary, Omar

22 Dec 2012 String Toolkits A set of useful string manipulation functions that MATLAB does not offer Author: Dahua Lin Cousineau, Eric

Here is an extension to strstartswith to handle cellstr arguments for 'pat':

nPat = length(pat);
if ~iscell(pat)
result = strncmp(s, pat, nPat);
else
result = false(1, nPat);
for i = 1:nPat
result(i) = strncmp(s, pat{i}, length(pat{i}));
end
end

21 Jun 2012 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin Kim, Woojae

Mo Chen, that is brilliant! That should be the fastest way to get the job done in MATLAB. Thanks!

Top Tags Applied by Dahua
classification, determinant, discrete distribution, distance, game
Files Tagged by Dahua View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
08 Nov 2008 Safe computation of logarithm-determinat of large matrix Computes the logarithm of determinant of a matrix in a safe way that avoids overflow/underflow. Author: Dahua Lin gaussian, logdet, determinant, logarithm, matrix 16 1
  • 5.0
5.0 | 3 ratings
28 Oct 2008 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin monte carlo, sampling, simulation, discrete distribution 52 6
  • 4.5
4.5 | 4 ratings
10 Oct 2008 String Toolkits A set of useful string manipulation functions that MATLAB does not offer Author: Dahua Lin strings, split, join string, string processing, string manipulation, string 92 3
10 Oct 2008 UUID Generation For generating UUID in MATLAB Author: Dahua Lin uuid, unique identifier, universal, utilities, miscellaneous 6 3
26 Aug 2008 Screenshot Minesweeper Game A minesweeper game similar to the one in Windows, but implemented in pure MATLAB Author: Dahua Lin games, game, minesweeper, mine, sweeper 31 3

Contact us