covariance matrix
https://software.intel.com/en-us/tags/20238/all
enIntel® Summary Statistics Library: how to detect outliers in datasets?
https://software.intel.com/en-us/blogs/2008/08/29/intel-summary-statistics-library-how-to-detect-outliers-in-datasets
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p><span>Earlier I computed various statistical estimates like mean or variance-covariance matrix using <a href="http://softwarecommunity.intel.com/articles/eng/3830.htm">Intel® Summary Statistics Library</a>. In those cases I knew for sure that my datasets did not contain “bad” observations (points which do not belong to the distribution which I observed) or outliers. However, in some cases we need to deal with datasets which are contaminated with outliers. Sometimes this happens because process of data collection is not very reliable as in case of microarray technologies for measurements of gene expression levels. In other cases presence of outliers in datasets is result of intentional actions like network intrusion. Anyway, outliers in datasets can result in biased estimates and wrong conclusions about the object. How to deal with such datasets? To use outlier detection tool from Intel® Summary Statistics Library.</span></p>
<p></p>
<p><span>To see how this tool works I generated data from multivariate Gaussian distribution using the corresponding generator available in <a href="http://www3.intel.com/cd/software/products/asmo-na/eng/307757.htm">Intel® Math Kernel Library</a>. Then I replaced some of the observations with the points from the multivariate Gaussian distribution which had significantly higher math expectation. Number of outliers was ~20%. Let us see how BACON algorithm for detection of outliers available in Intel® Summary Statistics Library identifies the outliers. </span></p>
<p></p>
<p><span>I feel that it does not make sense to remind about four stage model for the library usage as I showed them in more detail earlier. I’m going to consider the most important elements for the outlier detection method.<span> </span>Before using the algorithm I should initialize its parameters. First, I need to define initialization scheme of the algorithm. The library gives me two options: Median- and Mahalanobis distance based schemes. I also need to define rejection level alpha and stopping criteria level beta (details on the parameters are provided in Manual of the library). It can be done as shown in the code below:</span></p>
<p><br /></p>
<blockquote><br /><p><span>init_method = VSL_SS_BACON_MEDIAN_INIT_METHOD;</span></p>
<br /><p><span>alpha = 0.05;</span></p>
<br /><p><span>beta<span> </span>= 0.005;</span></p>
<br /><p><span>BaconN = 3;</span></p>
<br /><p><span>BaconParams[0] = init_method;</span></p>
<br /><p><span>BaconParams[1] = alpha;</span></p>
<br /><p><span>BaconParams[2] = beta;</span></p>
</blockquote>
<p></p>
<p><span>As usual I need to pass the parameters of my interest in the library using suitable editor of the library as shown below:</span></p>
<p><br /></p>
<blockquote><br /><p><span>errcode=vsldSSEditOutliersDetection(task, &BaconN, BaconParams, BaconWeights );</span></p>
</blockquote>
<p></p>
<p><span>You ask what is </span><span><em>BaconWeights</em></span><span> parameter? This is array of weights which will hold results of the algorithm and point at suspicious observations. Size of the array equals to number of points. Zero value in ith position of the array indicates that<em> i</em>-th observation requires special attention, and one is sign that the observation is “good”.</span></p>
<p></p>
<p><span>The next step is obvious – to call <em>Compute</em> function:</span></p>
<p><br /></p>
<blockquote><br /><p><span>errcode = vsldSSCompute( task, VSL_SS_OUTLIERS_DETECTION,</span><span> </span><span>VSL_SS_BACON_METHOD );</span></p>
</blockquote>
<p></p>
<p><span>Once the algorithm completes the array </span><span><em>BaconWeights</em></span><span> contains weights of the observations and needs to be analyzed. In my experiment I checked contents of the array and found 100% correctness of the results: all the outliers were correctly defined, and there were no false alarms. This array can be used in further analysis; it is enough to register it as array of observation weights and use in usual manner. Sure, after removal of the outliers statistical estimates of my interest were not biased.</span></p></div></div></div>
<li class="field-item even">
<a href="/en-us/search/site/field_tags/bioengineering-20434/language/en">bioengineering</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/field_tags/covariance_matrix-20238/language/en">covariance matrix</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/field_tags/estimation-20240/language/en">estimation</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/field_tags/life_sciences-20241/language/en">LIfe Sciences</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/field_tags/moments-20242/language/en">moments</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/field_tags/outliers_detection-20256/language/en">outliers detection</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/field_tags/statistics-20244/language/en">statistics</a> </li>
<li class="field-item odd">
<a href="/en-us/search/site/field_tags/summary_statistics-20246/language/en">summary statistics</a> </li>
<section class="field field-name-field-image field-type-image field-label-above"><h2 class="field-label">Icon Image: </h2><div class="field-items"><div class="field-item even"><img typeof="foaf:Image" src="https://software.intel.com/sites/default/files/33/a8/search_publish_icon.jpg" alt="" /></div></div></section>
<li class="field-item even">
<a href="/en-us/search/site/field_topic/parallel_computing-20867/language/en">Parallel Computing</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/field_software_products/whatif_software-20838/language/en">WhatIf Software</a> </li>
<li class="field-item even">
<a href="/en-us/search/site/field_audience/partners-17153/language/en">Partners</a> </li>
Fri, 29 Aug 2008 11:29:48 +0000Dmitry Kabaev (Intel)167879 at https://software.intel.com