limited rng seed choice by 5 values in dtree, boost, rtrees, ertrees tests; hope this make them more stable.
This commit is contained in:
parent
56745b5400
commit
78ccde56b2
@ -100,12 +100,17 @@ int CV_AMLTest::validate_test_results( int testCaseIdx )
|
||||
resultNode["mean"] >> mean;
|
||||
resultNode["sigma"] >> sigma;
|
||||
float curErr = get_error( testCaseIdx, CV_TEST_ERROR );
|
||||
if ( abs( curErr - mean) > 6*sigma )
|
||||
const int coeff = 3;
|
||||
ts->printf( CvTS::LOG, "Test case = %d; test error = %f; mean error = %f (diff=%f), %d*sigma = %f",
|
||||
testCaseIdx, curErr, mean, abs( curErr - mean), coeff, coeff*sigma );
|
||||
if ( abs( curErr - mean) > coeff*sigma )
|
||||
{
|
||||
ts->printf( CvTS::LOG, "in test case %d test error is out of range:\n"
|
||||
"abs(%f/*curEr*/ - %f/*mean*/ > %f/*6*sigma*/", testCaseIdx, curErr, mean, 6*sigma );
|
||||
ts->printf( CvTS::LOG, "abs(%f - %f) > %f - OUT OF RANGE!\n", curErr, mean, coeff*sigma, coeff );
|
||||
return CvTS::FAIL_BAD_ACCURACY;
|
||||
}
|
||||
else
|
||||
ts->printf( CvTS::LOG, ".\n" );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -45,10 +45,10 @@ CvTS test_system("ml");
|
||||
|
||||
const char* blacklist[] =
|
||||
{
|
||||
"adtree", //ticket 662
|
||||
/*"adtree", //ticket 662
|
||||
"artrees", //ticket 460
|
||||
"aboost", //ticket 474
|
||||
"aertrees",
|
||||
"aertrees",*/ //ticket 505
|
||||
0
|
||||
};
|
||||
|
||||
|
@ -432,6 +432,20 @@ int str_to_boost_type( string& str )
|
||||
CV_MLBaseTest::CV_MLBaseTest( const char* _modelName, const char* _testName, const char* _testFuncs ) :
|
||||
CvTest( _testName, _testFuncs )
|
||||
{
|
||||
int64 seeds[] = { 0x00009fff4f9c8d52,
|
||||
0x0000a17166072c7c,
|
||||
0x0201b32115cd1f9a,
|
||||
0x0513cb37abcd1234,
|
||||
0x0001a2b3c4d5f678
|
||||
};
|
||||
|
||||
int seedCount = sizeof(seeds)/sizeof(seeds[0]);
|
||||
RNG& rng = theRNG();
|
||||
|
||||
initSeed = rng.state;
|
||||
|
||||
rng.state = seeds[rng(seedCount)];
|
||||
|
||||
modelName = _modelName;
|
||||
nbayes = 0;
|
||||
knearest = 0;
|
||||
@ -495,6 +509,7 @@ CV_MLBaseTest::~CV_MLBaseTest()
|
||||
delete rtrees;
|
||||
if( ertrees )
|
||||
delete ertrees;
|
||||
theRNG().state = initSeed;
|
||||
}
|
||||
|
||||
int CV_MLBaseTest::read_params( CvFileStorage* _fs )
|
||||
|
Loading…
x
Reference in New Issue
Block a user