Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

void Impala::Core::Feature::TestMakeRandomTree::testFindSplitWithSeed ( int  seed  )  [inline]

Definition at line 137 of file TestMakeRandomTree.h.

References Impala::Core::Feature::FindSplit(), Impala::Core::Feature::Gain(), mFakeData, mFilterAll, mNumberClasses, Impala::Util::SetRandomSeed(), Impala::Core::Feature::SplitSet(), and Impala::Core::Feature::TryRandomSplit().

Referenced by testFindSplit().

00138     {
00139         Util::SetRandomSeed(seed);
00140         // get the gain of the first random split
00141         int dim;
00142         double val;
00143         double gain;
00144         TryRandomSplit(dim, val, gain, mFakeData, mFilterAll, mNumberClasses);
00145         Util::SetRandomSeed(seed);
00146         FindSplit(dim, val, mFakeData, mFilterAll, mNumberClasses, 20);
00147         bool* left;
00148         bool* right;
00149         SplitSet(left, right, dim, val, mFakeData, mFilterAll);
00150         // Because we reset the random seed the gain of SplitSet must be greater
00151         // or equal to the previously computed gain.
00152         CPPUNIT_ASSERT(gain <= Gain(mFakeData, mNumberClasses, left, right));
00153     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:10:46 2010 for ImpalaSrc by  doxygen 1.5.1