Rank: 299 based on 208 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 5 0
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 32 5
  • 5.0
5.0 | 3 ratings
10 Oct 2008 String Toolkits A set of useful string manipulation functions that MATLAB does not offer Author: Dahua Lin strings, string manipulation, string processing, join string, split, string 18 2
10 Oct 2008 UUID Generation For generating UUID in MATLAB Author: Dahua Lin uuid, unique identifier, universal, utilities, miscellaneous 5 2
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 11 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
13 Jan 2012 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin Clark, Thomas

Very useful, a good utility function which saves some though when implementing MC models.

28 Dec 2011 Statistical Learning Toolbox Functions for statistical learning, pattern recognition and computer vision, covering many topics. Author: Dahua Lin Chris

Big fan

05 Dec 2011 Statistical Learning Toolbox Functions for statistical learning, pattern recognition and computer vision, covering many topics. Author: Dahua Lin Yung

thanks for sharing.

25 Oct 2011 UUID Generation For generating UUID in MATLAB Author: Dahua Lin Emery, Brian

another option (for mac users at least):
[s,UUID] = system('uuidgen');

22 Feb 2011 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin Fathzadeh, Reza
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 5 0
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 32 5
  • 5.0
5.0 | 3 ratings
10 Oct 2008 String Toolkits A set of useful string manipulation functions that MATLAB does not offer Author: Dahua Lin strings, string manipulation, string processing, join string, split, string 18 2
10 Oct 2008 UUID Generation For generating UUID in MATLAB Author: Dahua Lin uuid, unique identifier, universal, utilities, miscellaneous 5 2
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 11 3

Contact us at files@mathworks.com