chi-square test cleanups
parent
071b7379c1
commit
d40de22c32
|
@ -80,6 +80,15 @@
|
||||||
<float name="alphaB" value="0.1"/>
|
<float name="alphaB" value="0.1"/>
|
||||||
</bsdf>
|
</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
|
<!-- Test the rough glass model with the
|
||||||
GGX microfacet distribution -->
|
GGX microfacet distribution -->
|
||||||
<bsdf type="roughglass">
|
<bsdf type="roughglass">
|
||||||
|
@ -98,14 +107,5 @@
|
||||||
<float name="extIOR" value="1.0"/>
|
<float name="extIOR" value="1.0"/>
|
||||||
</bsdf>
|
</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"/>
|
<camera type="perspective"/>
|
||||||
</scene>
|
</scene>
|
||||||
|
|
|
@ -20,10 +20,7 @@
|
||||||
#define __CHI_SQUARE_TEST_H
|
#define __CHI_SQUARE_TEST_H
|
||||||
|
|
||||||
#include <mitsuba/core/fresolver.h>
|
#include <mitsuba/core/fresolver.h>
|
||||||
#include <mitsuba/core/quad.h>
|
#include <boost/function.hpp>
|
||||||
#include <mitsuba/core/timer.h>
|
|
||||||
#include <boost/bind.hpp>
|
|
||||||
#include <boost/math/distributions/chi_squared.hpp>
|
|
||||||
|
|
||||||
MTS_NAMESPACE_BEGIN
|
MTS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <mitsuba/core/chisquare.h>
|
#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
|
MTS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,12 @@
|
||||||
#include <mitsuba/core/statistics.h>
|
#include <mitsuba/core/statistics.h>
|
||||||
#include <mitsuba/core/chisquare.h>
|
#include <mitsuba/core/chisquare.h>
|
||||||
#include <mitsuba/render/testcase.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
|
MTS_NAMESPACE_BEGIN
|
||||||
|
|
||||||
|
@ -149,7 +155,7 @@ public:
|
||||||
);
|
);
|
||||||
|
|
||||||
// (the following assumes that the distribution has 1 parameter, e.g. exponent value)
|
// (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) {
|
if (result == ChiSquare::EReject) {
|
||||||
std::string filename = formatString("failure_%i.m", failureCount++);
|
std::string filename = formatString("failure_%i.m", failureCount++);
|
||||||
chiSqr->dumpTables(filename);
|
chiSqr->dumpTables(filename);
|
||||||
|
@ -190,7 +196,7 @@ public:
|
||||||
);
|
);
|
||||||
|
|
||||||
// (the following assumes that the distribution has 1 parameter, e.g. exponent value)
|
// (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) {
|
if (result == ChiSquare::EReject) {
|
||||||
std::string filename = formatString("failure_%i.m", failureCount++);
|
std::string filename = formatString("failure_%i.m", failureCount++);
|
||||||
chiSqr->dumpTables(filename);
|
chiSqr->dumpTables(filename);
|
||||||
|
|
Loading…
Reference in New Issue