Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you have the <a href="http://www.mathworks.com/products/statistics/" rel="nofollow">statistical toolbox</a>, try something like this:</p> <pre><code>a = dlmread('~\downloads\-data-anonfiles-1383150325725.txt'); % read data p = mvnpdf(a,mean(a),cov(a)); % multivariate PDF of your data p_sample = numel(p)*p/sum(p); % normalize pdf to number of samples thresh = 0.5; % set an arbitrary threshold to filter idx_thresh = p_sample &gt; thresh; % logical indices of samples that meet the threshold a_filtered = a(idx_thresh,:); </code></pre> <p>then repeat this again with filtered data.</p> <pre><code> p = mvnpdf(a,mean(a_filtered),cov(a_filtered)); p_sample = numel(p)*p/sum(p); % normalize pdf to number of samples thresh = 0.1; % set an arbitrary threshold to filter idx_thresh = p_sample &gt; thresh; % logical indices of samples that meet the threshold a_filtered = a_filtered (idx_thresh,:); </code></pre> <p>I was able to pull out most of the dominant distribution in just 2 iterations. But I think you would want to repeat until the mean(a_filtered) and cov(a_filtered) reached steady state values. Plot them as a function of iteration, and when they approach a flat line then you've found the correct values.</p> <p>This is equivalent to filtering with an rotated ellipse, but IMO it is easier and more useful because now you actually have the 5 <a href="http://www.mathworks.com/help/stats/multivariate-normal-distribution.html" rel="nofollow">mvnpdf</a> parameters (mu_x, mu_y, sigma_xx, sigma_yy, sigma_xy) required to reproduce the distribution. If you model the iso-line (p(x,y) = thresh) as an rotated ellipse, you would have to manipulate the minor and major axes (a,b), the translation coordinates (h,k) and the rotation (theta) to get the mvnpdf parameters.</p> <p>Then after extracting the first distribution, you can repeat the process to find the secondary distribution.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload