http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/04/04fe86fa960174ca87e9fcced19d0ca27256c59d.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/04/04fe86fa960174ca87e9fcced19d0ca27256c59d.svn-base b/site-content/.svn/pristine/04/04fe86fa960174ca87e9fcced19d0ca27256c59d.svn-base deleted file mode 100644 index 0aa7111..0000000 --- a/site-content/.svn/pristine/04/04fe86fa960174ca87e9fcced19d0ca27256c59d.svn-base +++ /dev/null @@ -1,500 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!-- NewPage --> -<html lang="en"> -<head> -<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> -<title>GLSMultipleLinearRegressionTest (Apache Commons Math 3.5 Test API)</title> -<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> -</head> -<body> -<script type="text/javascript"><!-- - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="GLSMultipleLinearRegressionTest (Apache Commons Math 3.5 Test API)"; - } -//--> -</script> -<noscript> -<div>JavaScript is disabled on your browser.</div> -</noscript> -<!-- ========= START OF TOP NAVBAR ======= --> -<div class="topNav"><a name="navbar_top"> -<!-- --> -</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../../overview-summary.html">Overview</a></li> -<li><a href="package-summary.html">Package</a></li> -<li class="navBarCell1Rev">Class</li> -<li><a href="class-use/GLSMultipleLinearRegressionTest.html">Use</a></li> -<li><a href="package-tree.html">Tree</a></li> -<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../../help-doc.html">Help</a></li> -</ul> -<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> -</div> -<div class="subNav"> -<ul class="navList"> -<li>PREV CLASS</li> -<li><a href="../../../../../../org/apache/commons/math3/stat/regression/MillerUpdatingRegressionTest.html" title="class in org.apache.commons.math3.stat.regression"><span class="strong">NEXT CLASS</span></a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../../index.html?org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html" target="_top">FRAMES</a></li> -<li><a href="GLSMultipleLinearRegressionTest.html" target="_top">NO FRAMES</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_top"> -<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_top"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<div> -<ul class="subNavList"> -<li>SUMMARY: </li> -<li>NESTED | </li> -<li><a href="#fields_inherited_from_class_org.apache.commons.math3.stat.regression.MultipleLinearRegressionAbstractTest">FIELD</a> | </li> -<li><a href="#constructor_summary">CONSTR</a> | </li> -<li><a href="#method_summary">METHOD</a></li> -</ul> -<ul class="subNavList"> -<li>DETAIL: </li> -<li>FIELD | </li> -<li><a href="#constructor_detail">CONSTR</a> | </li> -<li><a href="#method_detail">METHOD</a></li> -</ul> -</div> -<a name="skip-navbar_top"> -<!-- --> -</a></div> -<!-- ========= END OF TOP NAVBAR ========= --> -<!-- ======== START OF CLASS DATA ======== --> -<div class="header"> -<p class="subTitle">org.apache.commons.math3.stat.regression</p> -<h2 title="Class GLSMultipleLinearRegressionTest" class="title">Class GLSMultipleLinearRegressionTest</h2> -</div> -<div class="contentContainer"> -<ul class="inheritance"> -<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> -<li> -<ul class="inheritance"> -<li><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html" title="class in org.apache.commons.math3.stat.regression">org.apache.commons.math3.stat.regression.MultipleLinearRegressionAbstractTest</a></li> -<li> -<ul class="inheritance"> -<li>org.apache.commons.math3.stat.regression.GLSMultipleLinearRegressionTest</li> -</ul> -</li> -</ul> -</li> -</ul> -<div class="description"> -<ul class="blockList"> -<li class="blockList"> -<hr> -<br> -<pre>public class <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.33">GLSMultipleLinearRegressionTest</a> -extends <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html" title="class in org.apache.commons.math3.stat.regression">MultipleLinearRegressionAbstractTest</a></pre> -</li> -</ul> -</div> -<div class="summary"> -<ul class="blockList"> -<li class="blockList"> -<!-- =========== FIELD SUMMARY =========== --> -<ul class="blockList"> -<li class="blockList"><a name="field_summary"> -<!-- --> -</a> -<h3>Field Summary</h3> -<ul class="blockList"> -<li class="blockList"><a name="fields_inherited_from_class_org.apache.commons.math3.stat.regression.MultipleLinearRegressionAbstractTest"> -<!-- --> -</a> -<h3>Fields inherited from class org.apache.commons.math3.stat.regression.<a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html" title="class in org.apache.commons.math3.stat.regression">MultipleLinearRegressionAbstractTest</a></h3> -<code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#regression">regression</a></code></li> -</ul> -</li> -</ul> -<!-- ======== CONSTRUCTOR SUMMARY ======== --> -<ul class="blockList"> -<li class="blockList"><a name="constructor_summary"> -<!-- --> -</a> -<h3>Constructor Summary</h3> -<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> -<caption><span>Constructors</span><span class="tabEnd"> </span></caption> -<tr> -<th class="colOne" scope="col">Constructor and Description</th> -</tr> -<tr class="altColor"> -<td class="colOne"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#GLSMultipleLinearRegressionTest()">GLSMultipleLinearRegressionTest</a></strong>()</code> </td> -</tr> -</table> -</li> -</ul> -<!-- ========== METHOD SUMMARY =========== --> -<ul class="blockList"> -<li class="blockList"><a name="method_summary"> -<!-- --> -</a> -<h3>Method Summary</h3> -<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> -<caption><span>Methods</span><span class="tabEnd"> </span></caption> -<tr> -<th class="colFirst" scope="col">Modifier and Type</th> -<th class="colLast" scope="col">Method and Description</th> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#cannotAddCovarianceDataThatIsNotSquare()">cannotAddCovarianceDataThatIsNotSquare</a></strong>()</code> </td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#cannotAddCovarianceDataWithSampleSizeMismatch()">cannotAddCovarianceDataWithSampleSizeMismatch</a></strong>()</code> </td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#cannotAddNullCovarianceData()">cannotAddNullCovarianceData</a></strong>()</code> </td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#cannotAddNullYSampleData()">cannotAddNullYSampleData</a></strong>()</code> </td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#cannotAddSampleDataWithSizeMismatch()">cannotAddSampleDataWithSizeMismatch</a></strong>()</code> </td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#cannotAddXSampleData()">cannotAddXSampleData</a></strong>()</code> </td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>protected <a href="../../../../../../../apidocs/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegression.html?is-external=true" title="class or interface in org.apache.commons.math3.stat.regression">GLSMultipleLinearRegression</a></code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#createRegression()">createRegression</a></strong>()</code> </td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>protected int</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#getNumberOfRegressors()">getNumberOfRegressors</a></strong>()</code> </td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>protected int</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#getSampleSize()">getSampleSize</a></strong>()</code> </td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#notEnoughData()">notEnoughData</a></strong>()</code> </td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#setUp()">setUp</a></strong>()</code> </td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#testGLSEfficiency()">testGLSEfficiency</a></strong>()</code> -<div class="block">Generate an error covariance matrix and sample data representing models - with this error structure.</div> -</td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#testGLSOLSConsistency()">testGLSOLSConsistency</a></strong>()</code> -<div class="block">Verifies that GLS with identity covariance matrix gives the same results - as OLS.</div> -</td> -</tr> -<tr class="rowColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#testNewSample2()">testNewSample2</a></strong>()</code> -<div class="block">Verifies that setting X, Y and covariance separately has the same effect as newSample(X,Y,cov).</div> -</td> -</tr> -<tr class="altColor"> -<td class="colFirst"><code>void</code></td> -<td class="colLast"><code><strong><a href="../../../../../../org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#testYVariance()">testYVariance</a></strong>()</code> -<div class="block">test calculateYVariance</div> -</td> -</tr> -</table> -<ul class="blockList"> -<li class="blockList"><a name="methods_inherited_from_class_org.apache.commons.math3.stat.regression.MultipleLinearRegressionAbstractTest"> -<!-- --> -</a> -<h3>Methods inherited from class org.apache.commons.math3.stat.regression.<a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html" title="class in org.apache.commons.math3.stat.regression">MultipleLinearRegressionAbstractTest</a></h3> -<code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#canEstimateRegressandVariance()">canEstimateRegressandVariance</a>, <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#canEstimateRegressionParameters()">canEstimateRegressionParameters</a>, <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#canEstimateRegressionParametersVariance()">canEstimateRegressionParametersVariance</a>, <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#canEstimateResiduals()">canEstimateResiduals</a>, <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#testNewSample()">testNewSample</a>, <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#testNewSampleInsu fficientData()">testNewSampleInsufficientData</a>, <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#testNewSampleInvalidData()">testNewSampleInvalidData</a>, <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#testNewSampleNullData()">testNewSampleNullData</a>, <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#testXSampleDataNull()">testXSampleDataNull</a>, <a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#testYSampleDataNull()">testYSampleDataNull</a></code></li> -</ul> -<ul class="blockList"> -<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> -<!-- --> -</a> -<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> -<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang /Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> -</ul> -</li> -</ul> -</li> -</ul> -</div> -<div class="details"> -<ul class="blockList"> -<li class="blockList"> -<!-- ========= CONSTRUCTOR DETAIL ======== --> -<ul class="blockList"> -<li class="blockList"><a name="constructor_detail"> -<!-- --> -</a> -<h3>Constructor Detail</h3> -<a name="GLSMultipleLinearRegressionTest()"> -<!-- --> -</a> -<ul class="blockListLast"> -<li class="blockList"> -<h4>GLSMultipleLinearRegressionTest</h4> -<pre>public <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.33">GLSMultipleLinearRegressionTest</a>()</pre> -</li> -</ul> -</li> -</ul> -<!-- ============ METHOD DETAIL ========== --> -<ul class="blockList"> -<li class="blockList"><a name="method_detail"> -<!-- --> -</a> -<h3>Method Detail</h3> -<a name="setUp()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>setUp</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.59">setUp</a>()</pre> -<dl> -<dt><strong>Overrides:</strong></dt> -<dd><code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#setUp()">setUp</a></code> in class <code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html" title="class in org.apache.commons.math3.stat.regression">MultipleLinearRegressionAbstractTest</a></code></dd> -</dl> -</li> -</ul> -<a name="cannotAddXSampleData()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>cannotAddXSampleData</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.79">cannotAddXSampleData</a>()</pre> -</li> -</ul> -<a name="cannotAddNullYSampleData()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>cannotAddNullYSampleData</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.84">cannotAddNullYSampleData</a>()</pre> -</li> -</ul> -<a name="cannotAddSampleDataWithSizeMismatch()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>cannotAddSampleDataWithSizeMismatch</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.89">cannotAddSampleDataWithSizeMismatch</a>()</pre> -</li> -</ul> -<a name="cannotAddNullCovarianceData()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>cannotAddNullCovarianceData</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.97">cannotAddNullCovarianceData</a>()</pre> -</li> -</ul> -<a name="notEnoughData()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>notEnoughData</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.102">notEnoughData</a>()</pre> -</li> -</ul> -<a name="cannotAddCovarianceDataWithSampleSizeMismatch()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>cannotAddCovarianceDataWithSampleSizeMismatch</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.113">cannotAddCovarianceDataWithSampleSizeMismatch</a>()</pre> -</li> -</ul> -<a name="cannotAddCovarianceDataThatIsNotSquare()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>cannotAddCovarianceDataThatIsNotSquare</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.124">cannotAddCovarianceDataThatIsNotSquare</a>()</pre> -</li> -</ul> -<a name="createRegression()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>createRegression</h4> -<pre>protected <a href="../../../../../../../apidocs/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegression.html?is-external=true" title="class or interface in org.apache.commons.math3.stat.regression">GLSMultipleLinearRegression</a> <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.137">createRegression</a>()</pre> -<dl> -<dt><strong>Specified by:</strong></dt> -<dd><code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#createRegression()">createRegression</a></code> in class <code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html" title="class in org.apache.commons.math3.stat.regression">MultipleLinearRegressionAbstractTest</a></code></dd> -</dl> -</li> -</ul> -<a name="getNumberOfRegressors()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>getNumberOfRegressors</h4> -<pre>protected int <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.144">getNumberOfRegressors</a>()</pre> -<dl> -<dt><strong>Specified by:</strong></dt> -<dd><code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#getNumberOfRegressors()">getNumberOfRegressors</a></code> in class <code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html" title="class in org.apache.commons.math3.stat.regression">MultipleLinearRegressionAbstractTest</a></code></dd> -</dl> -</li> -</ul> -<a name="getSampleSize()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>getSampleSize</h4> -<pre>protected int <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.149">getSampleSize</a>()</pre> -<dl> -<dt><strong>Specified by:</strong></dt> -<dd><code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html#getSampleSize()">getSampleSize</a></code> in class <code><a href="../../../../../../org/apache/commons/math3/stat/regression/MultipleLinearRegressionAbstractTest.html" title="class in org.apache.commons.math3.stat.regression">MultipleLinearRegressionAbstractTest</a></code></dd> -</dl> -</li> -</ul> -<a name="testYVariance()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>testYVariance</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.157">testYVariance</a>()</pre> -<div class="block">test calculateYVariance</div> -</li> -</ul> -<a name="testNewSample2()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>testNewSample2</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.170">testNewSample2</a>()</pre> -<div class="block">Verifies that setting X, Y and covariance separately has the same effect as newSample(X,Y,cov).</div> -</li> -</ul> -<a name="testGLSOLSConsistency()"> -<!-- --> -</a> -<ul class="blockList"> -<li class="blockList"> -<h4>testGLSOLSConsistency</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.196">testGLSOLSConsistency</a>()</pre> -<div class="block">Verifies that GLS with identity covariance matrix gives the same results - as OLS.</div> -</li> -</ul> -<a name="testGLSEfficiency()"> -<!-- --> -</a> -<ul class="blockListLast"> -<li class="blockList"> -<h4>testGLSEfficiency</h4> -<pre>public void <a href="../../../../../../src-html/org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html#line.218">testGLSEfficiency</a>()</pre> -<div class="block">Generate an error covariance matrix and sample data representing models - with this error structure. Then verify that GLS estimated coefficients, - on average, perform better than OLS.</div> -</li> -</ul> -</li> -</ul> -</li> -</ul> -</div> -</div> -<!-- ========= END OF CLASS DATA ========= --> -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<div class="bottomNav"><a name="navbar_bottom"> -<!-- --> -</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../../overview-summary.html">Overview</a></li> -<li><a href="package-summary.html">Package</a></li> -<li class="navBarCell1Rev">Class</li> -<li><a href="class-use/GLSMultipleLinearRegressionTest.html">Use</a></li> -<li><a href="package-tree.html">Tree</a></li> -<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../../help-doc.html">Help</a></li> -</ul> -<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> -</div> -<div class="subNav"> -<ul class="navList"> -<li>PREV CLASS</li> -<li><a href="../../../../../../org/apache/commons/math3/stat/regression/MillerUpdatingRegressionTest.html" title="class in org.apache.commons.math3.stat.regression"><span class="strong">NEXT CLASS</span></a></li> -</ul> -<ul class="navList"> -<li><a href="../../../../../../index.html?org/apache/commons/math3/stat/regression/GLSMultipleLinearRegressionTest.html" target="_top">FRAMES</a></li> -<li><a href="GLSMultipleLinearRegressionTest.html" target="_top">NO FRAMES</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_bottom"> -<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_bottom"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<div> -<ul class="subNavList"> -<li>SUMMARY: </li> -<li>NESTED | </li> -<li><a href="#fields_inherited_from_class_org.apache.commons.math3.stat.regression.MultipleLinearRegressionAbstractTest">FIELD</a> | </li> -<li><a href="#constructor_summary">CONSTR</a> | </li> -<li><a href="#method_summary">METHOD</a></li> -</ul> -<ul class="subNavList"> -<li>DETAIL: </li> -<li>FIELD | </li> -<li><a href="#constructor_detail">CONSTR</a> | </li> -<li><a href="#method_detail">METHOD</a></li> -</ul> -</div> -<a name="skip-navbar_bottom"> -<!-- --> -</a></div> -<!-- ======== END OF BOTTOM NAVBAR ======= --> -<p class="legalCopy"><small>Copyright © 2003–2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> -</body> -</html>
http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/05/050855af4fd561462df47d9a7e26e0488d2656d6.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/05/050855af4fd561462df47d9a7e26e0488d2656d6.svn-base b/site-content/.svn/pristine/05/050855af4fd561462df47d9a7e26e0488d2656d6.svn-base deleted file mode 100644 index 410113a..0000000 --- a/site-content/.svn/pristine/05/050855af4fd561462df47d9a7e26e0488d2656d6.svn-base +++ /dev/null @@ -1,74 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xml:lang="en" lang="en"> - <head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title>Apache Commons Math 3.6.1 Reference Package org.apache.commons.math3.optim.linear</title> - <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" /> - </head> - <body> - <div class="overview"> - <ul> - <li> - <a href="../../../../../../overview-summary.html">Overview</a> - </li> - <li class="selected">Package</li> - </ul> - </div> - <div class="framenoframe"> - <ul> - <li> - <a href="../../../../../../index.html" target="_top">FRAMES</a> - </li> - <li> - <a href="package-summary.html" target="_top">NO FRAMES</a> - </li> - </ul> - </div> - - <h2>Package org.apache.commons.math3.optim.linear</h2> - - <table class="summary"> - <thead> - <tr> - <th>Class Summary</th> - </tr> - </thead> - <tbody> - <tr> - <td> - <a href="SimplexSolverTest.html" target="classFrame">SimplexSolverTest</a> - </td> - </tr> - <tr> - <td> - <a href="SimplexTableauTest.html" target="classFrame">SimplexTableauTest</a> - </td> - </tr> - </tbody> - </table> - - <div class="overview"> - <ul> - <li> - <a href="../../../../../../overview-summary.html">Overview</a> - </li> - <li class="selected">Package</li> - </ul> - </div> - <div class="framenoframe"> - <ul> - <li> - <a href="../../../../../../index.html" target="_top">FRAMES</a> - </li> - <li> - <a href="package-summary.html" target="_top">NO FRAMES</a> - </li> - </ul> - </div> - <hr /> - <div id="footer"> - Copyright © 2003–2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved. - </div> - </body> -</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/05/050909f812c03d4b5a777be040b382352edf34fb.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/05/050909f812c03d4b5a777be040b382352edf34fb.svn-base b/site-content/.svn/pristine/05/050909f812c03d4b5a777be040b382352edf34fb.svn-base deleted file mode 100644 index 46e7951..0000000 --- a/site-content/.svn/pristine/05/050909f812c03d4b5a777be040b382352edf34fb.svn-base +++ /dev/null @@ -1,628 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../.resources/report.css" type="text/css"/><link rel="shortcut icon" href="../.resources/report.gif" type="image/gif"/><title>Variance.java</title><link rel="stylesheet" href="../.resources/prettify.css" type="text/css"/><script type="text/javascript" src="../.resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../.sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Math</a> > <a href="index.source.html" class="el_package">org.apache.commons.math3.stat.descriptive.moment</a> > <span class="el_source">Variance.java</s pan></div><h1>Variance.java</h1><pre class="source lang-java linenums">/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.commons.math3.stat.descriptive.moment; - -import java.io.Serializable; - -import org.apache.commons.math3.exception.MathIllegalArgumentException; -import org.apache.commons.math3.exception.NullArgumentException; -import org.apache.commons.math3.exception.util.LocalizedFormats; -import org.apache.commons.math3.stat.descriptive.WeightedEvaluation; -import org.apache.commons.math3.stat.descriptive.AbstractStorelessUnivariateStatistic; -import org.apache.commons.math3.util.MathUtils; - -/** - * Computes the variance of the available values. By default, the unbiased - * "sample variance" definitional formula is used: - * <p> - * variance = sum((x_i - mean)^2) / (n - 1) </p> - * <p> - * where mean is the {@link Mean} and <code>n</code> is the number - * of sample observations.</p> - * <p> - * The definitional formula does not have good numerical properties, so - * this implementation does not compute the statistic using the definitional - * formula. <ul> - * <li> The <code>getResult</code> method computes the variance using - * updating formulas based on West's algorithm, as described in - * <a href="http://doi.acm.org/10.1145/359146.359152"> Chan, T. F. and - * J. G. Lewis 1979, <i>Communications of the ACM</i>, - * vol. 22 no. 9, pp. 526-531.</a></li> - * <li> The <code>evaluate</code> methods leverage the fact that they have the - * full array of values in memory to execute a two-pass algorithm. - * Specifically, these methods use the "corrected two-pass algorithm" from - * Chan, Golub, Levesque, <i>Algorithms for Computing the Sample Variance</i>, - * American Statistician, vol. 37, no. 3 (1983) pp. 242-247.</li></ul> - * Note that adding values using <code>increment</code> or - * <code>incrementAll</code> and then executing <code>getResult</code> will - * sometimes give a different, less accurate, result than executing - * <code>evaluate</code> with the full array of values. The former approach - * should only be used when the full array of values is not available.</p> - * <p> - * The "population variance" ( sum((x_i - mean)^2) / n ) can also - * be computed using this statistic. The <code>isBiasCorrected</code> - * property determines whether the "population" or "sample" value is - * returned by the <code>evaluate</code> and <code>getResult</code> methods. - * To compute population variances, set this property to <code>false.</code> - * </p> - * <p> - * <strong>Note that this implementation is not synchronized.</strong> If - * multiple threads access an instance of this class concurrently, and at least - * one of the threads invokes the <code>increment()</code> or - * <code>clear()</code> method, it must be synchronized externally.</p> - * - */ -public class Variance extends AbstractStorelessUnivariateStatistic implements Serializable, WeightedEvaluation { - - /** Serializable version identifier */ - private static final long serialVersionUID = -9111962718267217978L; - - /** SecondMoment is used in incremental calculation of Variance*/ -<span class="pc" id="L75"> protected SecondMoment moment = null;</span> - - /** - * Whether or not {@link #increment(double)} should increment - * the internal second moment. When a Variance is constructed with an - * external SecondMoment as a constructor parameter, this property is - * set to false and increments must be applied to the second moment - * directly. - */ -<span class="pc" id="L84"> protected boolean incMoment = true;</span> - - /** - * Whether or not bias correction is applied when computing the - * value of the statistic. True means that bias is corrected. See - * {@link Variance} for details on the formula. - */ -<span class="pc" id="L91"> private boolean isBiasCorrected = true;</span> - - /** - * Constructs a Variance with default (true) <code>isBiasCorrected</code> - * property. - */ -<span class="fc" id="L97"> public Variance() {</span> -<span class="fc" id="L98"> moment = new SecondMoment();</span> -<span class="fc" id="L99"> }</span> - - /** - * Constructs a Variance based on an external second moment. - * When this constructor is used, the statistic may only be - * incremented via the moment, i.e., {@link #increment(double)} - * does nothing; whereas {@code m2.increment(value)} increments - * both {@code m2} and the Variance instance constructed from it. - * - * @param m2 the SecondMoment (Third or Fourth moments work - * here as well.) - */ -<span class="fc" id="L111"> public Variance(final SecondMoment m2) {</span> -<span class="fc" id="L112"> incMoment = false;</span> -<span class="fc" id="L113"> this.moment = m2;</span> -<span class="fc" id="L114"> }</span> - - /** - * Constructs a Variance with the specified <code>isBiasCorrected</code> - * property - * - * @param isBiasCorrected setting for bias correction - true means - * bias will be corrected and is equivalent to using the argumentless - * constructor - */ -<span class="fc" id="L124"> public Variance(boolean isBiasCorrected) {</span> -<span class="fc" id="L125"> moment = new SecondMoment();</span> -<span class="fc" id="L126"> this.isBiasCorrected = isBiasCorrected;</span> -<span class="fc" id="L127"> }</span> - - /** - * Constructs a Variance with the specified <code>isBiasCorrected</code> - * property and the supplied external second moment. - * - * @param isBiasCorrected setting for bias correction - true means - * bias will be corrected - * @param m2 the SecondMoment (Third or Fourth moments work - * here as well.) - */ -<span class="fc" id="L138"> public Variance(boolean isBiasCorrected, SecondMoment m2) {</span> -<span class="fc" id="L139"> incMoment = false;</span> -<span class="fc" id="L140"> this.moment = m2;</span> -<span class="fc" id="L141"> this.isBiasCorrected = isBiasCorrected;</span> -<span class="fc" id="L142"> }</span> - - /** - * Copy constructor, creates a new {@code Variance} identical - * to the {@code original} - * - * @param original the {@code Variance} instance to copy - * @throws NullArgumentException if original is null - */ -<span class="nc" id="L151"> public Variance(Variance original) throws NullArgumentException {</span> -<span class="nc" id="L152"> copy(original, this);</span> -<span class="nc" id="L153"> }</span> - - /** - * {@inheritDoc} - * <p>If all values are available, it is more accurate to use - * {@link #evaluate(double[])} rather than adding values one at a time - * using this method and then executing {@link #getResult}, since - * <code>evaluate</code> leverages the fact that is has the full - * list of values together to execute a two-pass algorithm. - * See {@link Variance}.</p> - * - * <p>Note also that when {@link #Variance(SecondMoment)} is used to - * create a Variance, this method does nothing. In that case, the - * SecondMoment should be incremented directly.</p> - */ - @Override - public void increment(final double d) { -<span class="pc bpc" id="L170" title="1 of 2 branches missed."> if (incMoment) {</span> -<span class="fc" id="L171"> moment.increment(d);</span> - } -<span class="fc" id="L173"> }</span> - - /** - * {@inheritDoc} - */ - @Override - public double getResult() { -<span class="fc bfc" id="L180" title="All 2 branches covered."> if (moment.n == 0) {</span> -<span class="fc" id="L181"> return Double.NaN;</span> -<span class="fc bfc" id="L182" title="All 2 branches covered."> } else if (moment.n == 1) {</span> -<span class="fc" id="L183"> return 0d;</span> - } else { -<span class="fc bfc" id="L185" title="All 2 branches covered."> if (isBiasCorrected) {</span> -<span class="fc" id="L186"> return moment.m2 / (moment.n - 1d);</span> - } else { -<span class="fc" id="L188"> return moment.m2 / (moment.n);</span> - } - } - } - - /** - * {@inheritDoc} - */ - public long getN() { -<span class="fc" id="L197"> return moment.getN();</span> - } - - /** - * {@inheritDoc} - */ - @Override - public void clear() { -<span class="pc bpc" id="L205" title="1 of 2 branches missed."> if (incMoment) {</span> -<span class="fc" id="L206"> moment.clear();</span> - } -<span class="fc" id="L208"> }</span> - - /** - * Returns the variance of the entries in the input array, or - * <code>Double.NaN</code> if the array is empty. - * <p> - * See {@link Variance} for details on the computing algorithm.</p> - * <p> - * Returns 0 for a single-value (i.e. length = 1) sample.</p> - * <p> - * Throws <code>MathIllegalArgumentException</code> if the array is null.</p> - * <p> - * Does not change the internal state of the statistic.</p> - * - * @param values the input array - * @return the variance of the values or Double.NaN if length = 0 - * @throws MathIllegalArgumentException if the array is null - */ - @Override - public double evaluate(final double[] values) throws MathIllegalArgumentException { -<span class="pc bpc" id="L228" title="1 of 2 branches missed."> if (values == null) {</span> -<span class="nc" id="L229"> throw new NullArgumentException(LocalizedFormats.INPUT_ARRAY);</span> - } -<span class="fc" id="L231"> return evaluate(values, 0, values.length);</span> - } - - /** - * Returns the variance of the entries in the specified portion of - * the input array, or <code>Double.NaN</code> if the designated subarray - * is empty. Note that Double.NaN may also be returned if the input - * includes NaN and / or infinite values. - * <p> - * See {@link Variance} for details on the computing algorithm.</p> - * <p> - * Returns 0 for a single-value (i.e. length = 1) sample.</p> - * <p> - * Does not change the internal state of the statistic.</p> - * <p> - * Throws <code>MathIllegalArgumentException</code> if the array is null.</p> - * - * @param values the input array - * @param begin index of the first array element to include - * @param length the number of elements to include - * @return the variance of the values or Double.NaN if length = 0 - * @throws MathIllegalArgumentException if the array is null or the array index - * parameters are not valid - */ - @Override - public double evaluate(final double[] values, final int begin, final int length) - throws MathIllegalArgumentException { - -<span class="fc" id="L259"> double var = Double.NaN;</span> - -<span class="fc bfc" id="L261" title="All 2 branches covered."> if (test(values, begin, length)) {</span> -<span class="fc" id="L262"> clear();</span> -<span class="fc bfc" id="L263" title="All 2 branches covered."> if (length == 1) {</span> -<span class="fc" id="L264"> var = 0.0;</span> -<span class="pc bpc" id="L265" title="1 of 2 branches missed."> } else if (length > 1) {</span> -<span class="fc" id="L266"> Mean mean = new Mean();</span> -<span class="fc" id="L267"> double m = mean.evaluate(values, begin, length);</span> -<span class="fc" id="L268"> var = evaluate(values, m, begin, length);</span> - } - } -<span class="fc" id="L271"> return var;</span> - } - - /** - * <p>Returns the weighted variance of the entries in the specified portion of - * the input array, or <code>Double.NaN</code> if the designated subarray - * is empty.</p> - * <p> - * Uses the formula <pre> - * &Sigma;(weights[i]*(values[i] - weightedMean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1) - * </pre> - * where weightedMean is the weighted mean</p> - * <p> - * This formula will not return the same result as the unweighted variance when all - * weights are equal, unless all weights are equal to 1. The formula assumes that - * weights are to be treated as "expansion values," as will be the case if for example - * the weights represent frequency counts. To normalize weights so that the denominator - * in the variance computation equals the length of the input vector minus one, use <pre> - * <code>evaluate(values, MathArrays.normalizeArray(weights, values.length)); </code> - * </pre> - * <p> - * Returns 0 for a single-value (i.e. length = 1) sample.</p> - * <p> - * Throws <code>IllegalArgumentException</code> if any of the following are true: - * <ul><li>the values array is null</li> - * <li>the weights array is null</li> - * <li>the weights array does not have the same length as the values array</li> - * <li>the weights array contains one or more infinite values</li> - * <li>the weights array contains one or more NaN values</li> - * <li>the weights array contains negative values</li> - * <li>the start and length arguments do not determine a valid array</li> - * </ul></p> - * <p> - * Does not change the internal state of the statistic.</p> - * <p> - * Throws <code>MathIllegalArgumentException</code> if either array is null.</p> - * - * @param values the input array - * @param weights the weights array - * @param begin index of the first array element to include - * @param length the number of elements to include - * @return the weighted variance of the values or Double.NaN if length = 0 - * @throws MathIllegalArgumentException if the parameters are not valid - * @since 2.1 - */ - public double evaluate(final double[] values, final double[] weights, - final int begin, final int length) throws MathIllegalArgumentException { - -<span class="fc" id="L319"> double var = Double.NaN;</span> - -<span class="pc bpc" id="L321" title="1 of 2 branches missed."> if (test(values, weights,begin, length)) {</span> -<span class="fc" id="L322"> clear();</span> -<span class="pc bpc" id="L323" title="1 of 2 branches missed."> if (length == 1) {</span> -<span class="nc" id="L324"> var = 0.0;</span> -<span class="pc bpc" id="L325" title="1 of 2 branches missed."> } else if (length > 1) {</span> -<span class="fc" id="L326"> Mean mean = new Mean();</span> -<span class="fc" id="L327"> double m = mean.evaluate(values, weights, begin, length);</span> -<span class="fc" id="L328"> var = evaluate(values, weights, m, begin, length);</span> - } - } -<span class="fc" id="L331"> return var;</span> - } - - /** - * <p> - * Returns the weighted variance of the entries in the the input array.</p> - * <p> - * Uses the formula <pre> - * &Sigma;(weights[i]*(values[i] - weightedMean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1) - * </pre> - * where weightedMean is the weighted mean</p> - * <p> - * This formula will not return the same result as the unweighted variance when all - * weights are equal, unless all weights are equal to 1. The formula assumes that - * weights are to be treated as "expansion values," as will be the case if for example - * the weights represent frequency counts. To normalize weights so that the denominator - * in the variance computation equals the length of the input vector minus one, use <pre> - * <code>evaluate(values, MathArrays.normalizeArray(weights, values.length)); </code> - * </pre> - * <p> - * Returns 0 for a single-value (i.e. length = 1) sample.</p> - * <p> - * Throws <code>MathIllegalArgumentException</code> if any of the following are true: - * <ul><li>the values array is null</li> - * <li>the weights array is null</li> - * <li>the weights array does not have the same length as the values array</li> - * <li>the weights array contains one or more infinite values</li> - * <li>the weights array contains one or more NaN values</li> - * <li>the weights array contains negative values</li> - * </ul></p> - * <p> - * Does not change the internal state of the statistic.</p> - * <p> - * Throws <code>MathIllegalArgumentException</code> if either array is null.</p> - * - * @param values the input array - * @param weights the weights array - * @return the weighted variance of the values - * @throws MathIllegalArgumentException if the parameters are not valid - * @since 2.1 - */ - public double evaluate(final double[] values, final double[] weights) - throws MathIllegalArgumentException { -<span class="fc" id="L374"> return evaluate(values, weights, 0, values.length);</span> - } - - /** - * Returns the variance of the entries in the specified portion of - * the input array, using the precomputed mean value. Returns - * <code>Double.NaN</code> if the designated subarray is empty. - * <p> - * See {@link Variance} for details on the computing algorithm.</p> - * <p> - * The formula used assumes that the supplied mean value is the arithmetic - * mean of the sample data, not a known population parameter. This method - * is supplied only to save computation when the mean has already been - * computed.</p> - * <p> - * Returns 0 for a single-value (i.e. length = 1) sample.</p> - * <p> - * Throws <code>MathIllegalArgumentException</code> if the array is null.</p> - * <p> - * Does not change the internal state of the statistic.</p> - * - * @param values the input array - * @param mean the precomputed mean value - * @param begin index of the first array element to include - * @param length the number of elements to include - * @return the variance of the values or Double.NaN if length = 0 - * @throws MathIllegalArgumentException if the array is null or the array index - * parameters are not valid - */ - public double evaluate(final double[] values, final double mean, - final int begin, final int length) throws MathIllegalArgumentException { - -<span class="fc" id="L406"> double var = Double.NaN;</span> - -<span class="pc bpc" id="L408" title="1 of 2 branches missed."> if (test(values, begin, length)) {</span> -<span class="pc bpc" id="L409" title="1 of 2 branches missed."> if (length == 1) {</span> -<span class="nc" id="L410"> var = 0.0;</span> -<span class="pc bpc" id="L411" title="1 of 2 branches missed."> } else if (length > 1) {</span> -<span class="fc" id="L412"> double accum = 0.0;</span> -<span class="fc" id="L413"> double dev = 0.0;</span> -<span class="fc" id="L414"> double accum2 = 0.0;</span> -<span class="fc bfc" id="L415" title="All 2 branches covered."> for (int i = begin; i < begin + length; i++) {</span> -<span class="fc" id="L416"> dev = values[i] - mean;</span> -<span class="fc" id="L417"> accum += dev * dev;</span> -<span class="fc" id="L418"> accum2 += dev;</span> - } -<span class="fc" id="L420"> double len = length;</span> -<span class="fc bfc" id="L421" title="All 2 branches covered."> if (isBiasCorrected) {</span> -<span class="fc" id="L422"> var = (accum - (accum2 * accum2 / len)) / (len - 1.0);</span> - } else { -<span class="fc" id="L424"> var = (accum - (accum2 * accum2 / len)) / len;</span> - } - } - } -<span class="fc" id="L428"> return var;</span> - } - - /** - * Returns the variance of the entries in the input array, using the - * precomputed mean value. Returns <code>Double.NaN</code> if the array - * is empty. - * <p> - * See {@link Variance} for details on the computing algorithm.</p> - * <p> - * If <code>isBiasCorrected</code> is <code>true</code> the formula used - * assumes that the supplied mean value is the arithmetic mean of the - * sample data, not a known population parameter. If the mean is a known - * population parameter, or if the "population" version of the variance is - * desired, set <code>isBiasCorrected</code> to <code>false</code> before - * invoking this method.</p> - * <p> - * Returns 0 for a single-value (i.e. length = 1) sample.</p> - * <p> - * Throws <code>MathIllegalArgumentException</code> if the array is null.</p> - * <p> - * Does not change the internal state of the statistic.</p> - * - * @param values the input array - * @param mean the precomputed mean value - * @return the variance of the values or Double.NaN if the array is empty - * @throws MathIllegalArgumentException if the array is null - */ - public double evaluate(final double[] values, final double mean) throws MathIllegalArgumentException { -<span class="fc" id="L457"> return evaluate(values, mean, 0, values.length);</span> - } - - /** - * Returns the weighted variance of the entries in the specified portion of - * the input array, using the precomputed weighted mean value. Returns - * <code>Double.NaN</code> if the designated subarray is empty. - * <p> - * Uses the formula <pre> - * &Sigma;(weights[i]*(values[i] - mean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1) - * </pre></p> - * <p> - * The formula used assumes that the supplied mean value is the weighted arithmetic - * mean of the sample data, not a known population parameter. This method - * is supplied only to save computation when the mean has already been - * computed.</p> - * <p> - * This formula will not return the same result as the unweighted variance when all - * weights are equal, unless all weights are equal to 1. The formula assumes that - * weights are to be treated as "expansion values," as will be the case if for example - * the weights represent frequency counts. To normalize weights so that the denominator - * in the variance computation equals the length of the input vector minus one, use <pre> - * <code>evaluate(values, MathArrays.normalizeArray(weights, values.length), mean); </code> - * </pre> - * <p> - * Returns 0 for a single-value (i.e. length = 1) sample.</p> - * <p> - * Throws <code>MathIllegalArgumentException</code> if any of the following are true: - * <ul><li>the values array is null</li> - * <li>the weights array is null</li> - * <li>the weights array does not have the same length as the values array</li> - * <li>the weights array contains one or more infinite values</li> - * <li>the weights array contains one or more NaN values</li> - * <li>the weights array contains negative values</li> - * <li>the start and length arguments do not determine a valid array</li> - * </ul></p> - * <p> - * Does not change the internal state of the statistic.</p> - * - * @param values the input array - * @param weights the weights array - * @param mean the precomputed weighted mean value - * @param begin index of the first array element to include - * @param length the number of elements to include - * @return the variance of the values or Double.NaN if length = 0 - * @throws MathIllegalArgumentException if the parameters are not valid - * @since 2.1 - */ - public double evaluate(final double[] values, final double[] weights, - final double mean, final int begin, final int length) - throws MathIllegalArgumentException { - -<span class="fc" id="L509"> double var = Double.NaN;</span> - -<span class="pc bpc" id="L511" title="1 of 2 branches missed."> if (test(values, weights, begin, length)) {</span> -<span class="pc bpc" id="L512" title="1 of 2 branches missed."> if (length == 1) {</span> -<span class="nc" id="L513"> var = 0.0;</span> -<span class="pc bpc" id="L514" title="1 of 2 branches missed."> } else if (length > 1) {</span> -<span class="fc" id="L515"> double accum = 0.0;</span> -<span class="fc" id="L516"> double dev = 0.0;</span> -<span class="fc" id="L517"> double accum2 = 0.0;</span> -<span class="fc bfc" id="L518" title="All 2 branches covered."> for (int i = begin; i < begin + length; i++) {</span> -<span class="fc" id="L519"> dev = values[i] - mean;</span> -<span class="fc" id="L520"> accum += weights[i] * (dev * dev);</span> -<span class="fc" id="L521"> accum2 += weights[i] * dev;</span> - } - -<span class="fc" id="L524"> double sumWts = 0;</span> -<span class="fc bfc" id="L525" title="All 2 branches covered."> for (int i = begin; i < begin + length; i++) {</span> -<span class="fc" id="L526"> sumWts += weights[i];</span> - } - -<span class="pc bpc" id="L529" title="1 of 2 branches missed."> if (isBiasCorrected) {</span> -<span class="fc" id="L530"> var = (accum - (accum2 * accum2 / sumWts)) / (sumWts - 1.0);</span> - } else { -<span class="nc" id="L532"> var = (accum - (accum2 * accum2 / sumWts)) / sumWts;</span> - } - } - } -<span class="fc" id="L536"> return var;</span> - } - - /** - * <p>Returns the weighted variance of the values in the input array, using - * the precomputed weighted mean value.</p> - * <p> - * Uses the formula <pre> - * &Sigma;(weights[i]*(values[i] - mean)<sup>2</sup>)/(&Sigma;(weights[i]) - 1) - * </pre></p> - * <p> - * The formula used assumes that the supplied mean value is the weighted arithmetic - * mean of the sample data, not a known population parameter. This method - * is supplied only to save computation when the mean has already been - * computed.</p> - * <p> - * This formula will not return the same result as the unweighted variance when all - * weights are equal, unless all weights are equal to 1. The formula assumes that - * weights are to be treated as "expansion values," as will be the case if for example - * the weights represent frequency counts. To normalize weights so that the denominator - * in the variance computation equals the length of the input vector minus one, use <pre> - * <code>evaluate(values, MathArrays.normalizeArray(weights, values.length), mean); </code> - * </pre> - * <p> - * Returns 0 for a single-value (i.e. length = 1) sample.</p> - * <p> - * Throws <code>MathIllegalArgumentException</code> if any of the following are true: - * <ul><li>the values array is null</li> - * <li>the weights array is null</li> - * <li>the weights array does not have the same length as the values array</li> - * <li>the weights array contains one or more infinite values</li> - * <li>the weights array contains one or more NaN values</li> - * <li>the weights array contains negative values</li> - * </ul></p> - * <p> - * Does not change the internal state of the statistic.</p> - * - * @param values the input array - * @param weights the weights array - * @param mean the precomputed weighted mean value - * @return the variance of the values or Double.NaN if length = 0 - * @throws MathIllegalArgumentException if the parameters are not valid - * @since 2.1 - */ - public double evaluate(final double[] values, final double[] weights, final double mean) - throws MathIllegalArgumentException { -<span class="nc" id="L582"> return evaluate(values, weights, mean, 0, values.length);</span> - } - - /** - * @return Returns the isBiasCorrected. - */ - public boolean isBiasCorrected() { -<span class="nc" id="L589"> return isBiasCorrected;</span> - } - - /** - * @param biasCorrected The isBiasCorrected to set. - */ - public void setBiasCorrected(boolean biasCorrected) { -<span class="fc" id="L596"> this.isBiasCorrected = biasCorrected;</span> -<span class="fc" id="L597"> }</span> - - /** - * {@inheritDoc} - */ - @Override - public Variance copy() { -<span class="fc" id="L604"> Variance result = new Variance();</span> - // No try-catch or advertised exception because parameters are guaranteed non-null -<span class="fc" id="L606"> copy(this, result);</span> -<span class="fc" id="L607"> return result;</span> - } - - /** - * Copies source to dest. - * <p>Neither source nor dest can be null.</p> - * - * @param source Variance to copy - * @param dest Variance to copy to - * @throws NullArgumentException if either source or dest is null - */ - public static void copy(Variance source, Variance dest) - throws NullArgumentException { -<span class="fc" id="L620"> MathUtils.checkNotNull(source);</span> -<span class="fc" id="L621"> MathUtils.checkNotNull(dest);</span> -<span class="fc" id="L622"> dest.setData(source.getDataRef());</span> -<span class="fc" id="L623"> dest.moment = source.moment.copy();</span> -<span class="fc" id="L624"> dest.isBiasCorrected = source.isBiasCorrected;</span> -<span class="fc" id="L625"> dest.incMoment = source.incMoment;</span> -<span class="fc" id="L626"> }</span> -} -</pre><div class="footer"><span class="right">Created with <a href="http://www.eclemma.org/jacoco">JaCoCo</a> 0.7.5.201505241946</span></div></body></html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/commons-complex/blob/b3576eeb/site-content/.svn/pristine/05/050a03d311c74167d150b8d5086efddb09f88041.svn-base ---------------------------------------------------------------------- diff --git a/site-content/.svn/pristine/05/050a03d311c74167d150b8d5086efddb09f88041.svn-base b/site-content/.svn/pristine/05/050a03d311c74167d150b8d5086efddb09f88041.svn-base deleted file mode 100644 index 6bdda84..0000000 --- a/site-content/.svn/pristine/05/050a03d311c74167d150b8d5086efddb09f88041.svn-base +++ /dev/null @@ -1,117 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<!-- NewPage --> -<html lang="en"> -<head> -<meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> -<title>Uses of Class org.apache.commons.math3.linear.FieldLUSolverTest (Apache Commons Math 3.5 Test API)</title> -<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> -</head> -<body> -<script type="text/javascript"><!-- - if (location.href.indexOf('is-external=true') == -1) { - parent.document.title="Uses of Class org.apache.commons.math3.linear.FieldLUSolverTest (Apache Commons Math 3.5 Test API)"; - } -//--> -</script> -<noscript> -<div>JavaScript is disabled on your browser.</div> -</noscript> -<!-- ========= START OF TOP NAVBAR ======= --> -<div class="topNav"><a name="navbar_top"> -<!-- --> -</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../../overview-summary.html">Overview</a></li> -<li><a href="../package-summary.html">Package</a></li> -<li><a href="../../../../../../org/apache/commons/math3/linear/FieldLUSolverTest.html" title="class in org.apache.commons.math3.linear">Class</a></li> -<li class="navBarCell1Rev">Use</li> -<li><a href="../package-tree.html">Tree</a></li> -<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../../help-doc.html">Help</a></li> -</ul> -<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> -</div> -<div class="subNav"> -<ul class="navList"> -<li>PREV</li> -<li>NEXT</li> -</ul> -<ul class="navList"> -<li><a href="../../../../../../index.html?org/apache/commons/math3/linear//class-useFieldLUSolverTest.html" target="_top">FRAMES</a></li> -<li><a href="FieldLUSolverTest.html" target="_top">NO FRAMES</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_top"> -<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_top"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<a name="skip-navbar_top"> -<!-- --> -</a></div> -<!-- ========= END OF TOP NAVBAR ========= --> -<div class="header"> -<h2 title="Uses of Class org.apache.commons.math3.linear.FieldLUSolverTest" class="title">Uses of Class<br>org.apache.commons.math3.linear.FieldLUSolverTest</h2> -</div> -<div class="classUseContainer">No usage of org.apache.commons.math3.linear.FieldLUSolverTest</div> -<!-- ======= START OF BOTTOM NAVBAR ====== --> -<div class="bottomNav"><a name="navbar_bottom"> -<!-- --> -</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> -<!-- --> -</a> -<ul class="navList" title="Navigation"> -<li><a href="../../../../../../overview-summary.html">Overview</a></li> -<li><a href="../package-summary.html">Package</a></li> -<li><a href="../../../../../../org/apache/commons/math3/linear/FieldLUSolverTest.html" title="class in org.apache.commons.math3.linear">Class</a></li> -<li class="navBarCell1Rev">Use</li> -<li><a href="../package-tree.html">Tree</a></li> -<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> -<li><a href="../../../../../../index-all.html">Index</a></li> -<li><a href="../../../../../../help-doc.html">Help</a></li> -</ul> -<div class="aboutLanguage"><em><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script></em></div> -</div> -<div class="subNav"> -<ul class="navList"> -<li>PREV</li> -<li>NEXT</li> -</ul> -<ul class="navList"> -<li><a href="../../../../../../index.html?org/apache/commons/math3/linear//class-useFieldLUSolverTest.html" target="_top">FRAMES</a></li> -<li><a href="FieldLUSolverTest.html" target="_top">NO FRAMES</a></li> -</ul> -<ul class="navList" id="allclasses_navbar_bottom"> -<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> -</ul> -<div> -<script type="text/javascript"><!-- - allClassesLink = document.getElementById("allclasses_navbar_bottom"); - if(window==top) { - allClassesLink.style.display = "block"; - } - else { - allClassesLink.style.display = "none"; - } - //--> -</script> -</div> -<a name="skip-navbar_bottom"> -<!-- --> -</a></div> -<!-- ======== END OF BOTTOM NAVBAR ======= --> -<p class="legalCopy"><small>Copyright © 2003–2015 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> -</body> -</html>
