Rank: 223 based on 420 downloads (last 30 days) and 8 files submitted
photo

Dahua Lin

E-mail
Company/University
MIT

Personal Profile:

 

Watch this Author's files

 

Files Posted by Dahua Lin 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 logarithm, determinant, logdet, gaussian, matrix 22 2
  • 5.0
5.0 | 4 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, simulation, sampling, discrete distribution 49 8
  • 4.66667
4.7 | 6 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 166 3
  • 5.0
5.0 | 1 rating
10 Oct 2008 UUID Generation For generating UUID in MATLAB Author: Dahua Lin uuid, unique identifier, universal, utilities, miscellaneous 10 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, minesweeper, game, mine, sweeper 32 3
Comments and Ratings by Dahua Lin 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 Lin's Files View all
Updated File Comment by Comments Rating
23 Oct 2014 String Toolkits A set of useful string manipulation functions that MATLAB does not offer Author: Dahua Lin Boian Alexandrov

08 Nov 2013 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin Justin

Very helpful! Thx!

07 Aug 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 Ruben van Bergen

Life saver!

10 Jul 2013 Sampling from a discrete distribution The function is to draw samples from an arbitrary discrete distribution. Author: Dahua Lin Christos

Very useful, saves a lot of time when it comes in large scale simulation problems.

05 Jul 2013 Statistical Learning Toolbox Functions for statistical learning, pattern recognition and computer vision, covering many topics. Author: Dahua Lin An Tran Lam

very nice work, I also start to learn about statistical learning

Contact us