chi-square test cleanups

metadata
Wenzel Jakob 2011-06-25 00:33:30 +02:00
parent 071b7379c1
commit d40de22c32
4 changed files with 22 additions and 15 deletions

View File

@ -80,6 +80,15 @@
<float name="alphaB" value="0.1"/>
</bsdf>
<!-- Test the rough glass model with the
Beckmann microfacet distribution -->
<bsdf type="roughglass">
<string name="distribution" value="beckmann"/>
<float name="alpha" value=".3"/>
<float name="intIOR" value="1.5"/>
<float name="extIOR" value="1.0"/>
</bsdf>
<!-- Test the rough glass model with the
GGX microfacet distribution -->
<bsdf type="roughglass">
@ -98,14 +107,5 @@
<float name="extIOR" value="1.0"/>
</bsdf>
<!-- Test the rough glass model with the
Beckmann microfacet distribution -->
<bsdf type="roughglass">
<string name="distribution" value="beckmann"/>
<float name="alpha" value=".3"/>
<float name="intIOR" value="1.5"/>
<float name="extIOR" value="1.0"/>
</bsdf>
<camera type="perspective"/>
</scene>

View File

@ -20,10 +20,7 @@
#define __CHI_SQUARE_TEST_H
#include <mitsuba/core/fresolver.h>
#include <mitsuba/core/quad.h>
#include <mitsuba/core/timer.h>
#include <boost/bind.hpp>
#include <boost/math/distributions/chi_squared.hpp>
#include <boost/function.hpp>
MTS_NAMESPACE_BEGIN

View File

@ -17,6 +17,10 @@
*/
#include <mitsuba/core/chisquare.h>
#include <mitsuba/core/quad.h>
#include <mitsuba/core/timer.h>
#include <boost/math/distributions/chi_squared.hpp>
#include <boost/bind.hpp>
MTS_NAMESPACE_BEGIN

View File

@ -20,6 +20,12 @@
#include <mitsuba/core/statistics.h>
#include <mitsuba/core/chisquare.h>
#include <mitsuba/render/testcase.h>
#include <boost/bind.hpp>
/* Statistical significance level of the test. Set to
1/2 percent by default -- we want there to be notable
evidence before failing a test case */
#define SIGNIFICANCE_LEVEL 0.005f
MTS_NAMESPACE_BEGIN
@ -149,7 +155,7 @@ public:
);
// (the following assumes that the distribution has 1 parameter, e.g. exponent value)
ChiSquare::ETestResult result = chiSqr->runTest(1);
ChiSquare::ETestResult result = chiSqr->runTest(1, SIGNIFICANCE_LEVEL);
if (result == ChiSquare::EReject) {
std::string filename = formatString("failure_%i.m", failureCount++);
chiSqr->dumpTables(filename);
@ -190,7 +196,7 @@ public:
);
// (the following assumes that the distribution has 1 parameter, e.g. exponent value)
ChiSquare::ETestResult result = chiSqr->runTest(1);
ChiSquare::ETestResult result = chiSqr->runTest(1, SIGNIFICANCE_LEVEL);
if (result == ChiSquare::EReject) {
std::string filename = formatString("failure_%i.m", failureCount++);
chiSqr->dumpTables(filename);