changed significance factor to 2

This commit is contained in:
rjawor 2016-10-22 18:02:04 +02:00
parent 8bc739ff20
commit 7e005bfca7
2 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ void ConcordiaSearchResult::_checkPossibleOverlays(
if (allTerminal) {
double score = Utils::getLogarithmicOverlay(currentOverlay,
patternSize,
1.0);
2.0);
if (score > _bestOverlayScore) {
_bestOverlay = currentOverlay;
_bestOverlayScore = score;

View File

@ -237,10 +237,10 @@ BOOST_AUTO_TEST_CASE( ConcordiaSearch1 )
concordia.refreshSAfromRAM();
boost::shared_ptr<ConcordiaSearchResult> searchResult1 = concordia.concordiaSearch("posiada rysia chyba");
// best overlay: [0,2], [2,3], score = 0.695
// best overlay: [0,2], [2,3], score = 0.829
BOOST_CHECK_EQUAL(searchResult1->getBestOverlay().size(), 2);
BOOST_CHECK_CLOSE(searchResult1->getBestOverlayScore(), 0.695, 0.1);
BOOST_CHECK_CLOSE(searchResult1->getBestOverlayScore(), 0.829, 0.1);
BOOST_CHECK_EQUAL(searchResult1->getBestOverlay().at(0).getStart(), 0);
BOOST_CHECK_EQUAL(searchResult1->getBestOverlay().at(0).getEnd(), 2);
BOOST_CHECK_EQUAL(searchResult1->getBestOverlay().at(1).getStart(), 2);
@ -327,7 +327,7 @@ BOOST_AUTO_TEST_CASE( ConcordiaSearch2 )
// best overlay:
BOOST_CHECK_EQUAL(searchResult1->getBestOverlay().size(), 2);
BOOST_CHECK_CLOSE(searchResult1->getBestOverlayScore(), 0.537, 0.1);
BOOST_CHECK_CLOSE(searchResult1->getBestOverlayScore(), 0.655, 0.1);
BOOST_CHECK_EQUAL(searchResult1->getBestOverlay().at(0).getStart(), 1);
BOOST_CHECK_EQUAL(searchResult1->getBestOverlay().at(0).getEnd(), 5);
BOOST_CHECK_EQUAL(searchResult1->getBestOverlay().at(1).getStart(), 5);