Rank: 820 based on 155 downloads (last 30 days) and 5 files submitted
photo

Tim Benham

E-mail
Company/University
University of Queensland

Personal Profile:
Professional Interests:
statistics

 

Watch this Author's files

 

Files Posted by Tim View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
04 Feb 2013 Screenshot Truncated multivariate normal Generates pseudo-random vectors drawn from the truncated multivariate normal distribution. Author: Tim Benham random, distribution, gaussian, normal, sample, multivariate 29 4
13 Feb 2012 Uniform distribution over a convex polytope Samples uniformly the interior of a convex polytope. Author: Tim Benham polytope, random, uniform, uniform distribution, hit and run, achr 24 1
08 Feb 2012 Chebyshev Center and Radius Computes the Chebyshev center and Chebyshev radius of a polytope. Author: Tim Benham polytope, polyhedron, chebyshev center 15 0
21 Nov 2011 Analytic Center Computes the analytic center of a set of linear equations. Author: Tim Benham polytope, linear equations, analytic center, polyhedron 17 0
04 May 2011 Fast K-means Fast K-means implementation with optional weights and K-means++ style seeding. Author: Tim Benham clustering, kmeans, weighted kmeans 70 4
  • 4.5
4.5 | 2 ratings
Comments and Ratings by Tim View all
Updated File Comments Rating
03 Feb 2013 Truncated multivariate normal Generates pseudo-random vectors drawn from the truncated multivariate normal distribution. Author: Tim Benham

m = [2 0];
S = [1 0.9; 0.9 1];
X = rmvnrnd(m,S,100,[-eye(2);eye(2)], [0; 0; 1; 1]);
clf; plot(X(:,1),X(:,2),'.')

06 Apr 2011 Random number with specified probability Random number from a discrete distribution Author: Mo Chen

It means someone has already posted a function that uses the same method.

06 Apr 2011 kmeans clustering Fully vectorized kmeans algorithm. Fast yet simple (10 lines) Author: Mo Chen

Good, fast implementation but it should be possible to pass in the cluster centers. Also arguments are not checked (try k=1) and standard help is not provided.

06 Apr 2011 Efficient K-Means Clustering using JIT A simple but fast tool for K-means clustering Author: Yi Cao

The function fails to terminate on some inputs. For example see http://snipt.org/wpkI

Comments and Ratings on Tim's Files View all
Updated File Comment by Comments Rating
09 May 2014 Uniform distribution over a convex polytope Samples uniformly the interior of a convex polytope. Author: Tim Benham Alec

Thank you for uploading this. Is there a way to specify equality constraints Ax=b ? I tried adding both Ax<=b and -Ax<=-b, but this crashes at ` y = y + (tmin+(tmax-tmin)*rand)*u;`.

I also tried padding b with epsilons. This crashes less often, but still frequently at the same line.

27 Jan 2014 Fast K-means Fast K-means implementation with optional weights and K-means++ style seeding. Author: Tim Benham mirko-stifler

I have code:
nfo = imfinfo('im.png');
X = im2double(imread('im','png'));
X = imadjust(X);
k = 4;

and kmeanspp??
I want to output the resulting image

for example:
X=kmeanspp(X,k);

how can I do?

thanks
I am an Italian student

13 Jul 2013 Fast K-means Fast K-means implementation with optional weights and K-means++ style seeding. Author: Tim Benham Jonathan

The matlab (2011b) kmeans worked faster for me... I ran the kmeans on data from an RGB image. (640x480x3)

02 Jun 2013 Fast K-means Fast K-means implementation with optional weights and K-means++ style seeding. Author: Tim Benham White, Lee

This is quite fast, more more so than the native kmeans. Though it doesn't utilize a final optimization step. I had low average distance to centroids without the 'careful' flag.

06 Feb 2013 Truncated multivariate normal Generates pseudo-random vectors drawn from the truncated multivariate normal distribution. Author: Tim Benham jenka

Also, I think it would significantly improve this code if we had an option to change the size N for each variable p. Let's say for x_1 I would want N=100, for x_2 I would want N=55.

Contact us