From 7db71cf90bdb09f90f1bb9f86bfc1fcb951a3020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Boull=C3=A9?= Date: Wed, 4 Oct 2023 11:34:28 +0200 Subject: [PATCH] =?UTF-8?q?Gestion=20de=20typycalite=20negative=20lors=20d?= =?UTF-8?q?es=20relecture=20de=20rapport=20de=20coclustering=20-=20provoqu?= =?UTF-8?q?e=20un=20bug=20dans=20LearningTest\TestCoclustering\Bugs\Negati?= =?UTF-8?q?veTypicalities=20-=20ajout=20d'une=20tolerance:=20les=20typical?= =?UTF-8?q?ite=20n=C3=A9gative=20des=20rapport=20sont=20remplac=C3=A9es=20?= =?UTF-8?q?par=200=20-=20impacts:=20=20-=20CCCoclusteringReport::ReadCompo?= =?UTF-8?q?sition=20=20-=20CCCoclusteringReport::ReadJSONTypicalities?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test complets effectues sur LearningTest\TestCoclustering - Standard, SmallInstabilities, Bugs, NewPriorV9 - y_CoclusteringIV_Standard --- .../CCCoclusteringBuilder.cpp | 25 +++++++++++++------ .../CCCoclusteringReport.cpp | 11 ++++++-- .../MODL_Coclustering/MODL_Coclustering.cpp | 1 + 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/src/Learning/MODL_Coclustering/CCCoclusteringBuilder.cpp b/src/Learning/MODL_Coclustering/CCCoclusteringBuilder.cpp index e29eedd0b..9531918d8 100644 --- a/src/Learning/MODL_Coclustering/CCCoclusteringBuilder.cpp +++ b/src/Learning/MODL_Coclustering/CCCoclusteringBuilder.cpp @@ -349,7 +349,7 @@ boolean CCCoclusteringBuilder::CheckVarPartSpecifications() const boolean CCCoclusteringBuilder::ComputeCoclustering() { boolean bOk = true; - boolean bProfileOptimisation = true; + boolean bProfileOptimisation = false; KWTupleTable tupleTable; KWTupleTable tupleFrequencyTable; CCCoclusteringOptimizer dataGridOptimizer; @@ -456,13 +456,24 @@ boolean CCCoclusteringBuilder::ComputeCoclustering() if (bProfileOptimisation) { // Nom du fichier de profiling, avec le nombre d'individus et de variables - sProfileFileName = "C:/temp/DataGridOptimizationProfiling"; + sProfileFileName = "C:/temp/DataGridOptimizationProfiling_"; sProfileFileName += GetDatabase()->GetClassName(); - sProfileFileName += '('; - sProfileFileName += IntToString(initialDataGrid->GetAttributeAt(0)->GetInitialValueNumber()); - sProfileFileName += ','; - sProfileFileName += IntToString(initialDataGrid->GetInnerAttributes()->GetInnerAttributeNumber()); - sProfileFileName += ").txt"; + if (initialDataGrid->IsVarPartDataGrid()) + { + sProfileFileName += "_I"; + sProfileFileName += IntToString(initialDataGrid->GetAttributeAt(0)->GetInitialValueNumber()); + sProfileFileName += "_V"; + sProfileFileName += + IntToString(initialDataGrid->GetInnerAttributes()->GetInnerAttributeNumber()); + } + else + { + sProfileFileName += "_F"; + sProfileFileName += IntToString(initialDataGrid->GetGridFrequency()); + sProfileFileName += "_D"; + sProfileFileName += IntToString(initialDataGrid->GetAttributeNumber()); + } + sProfileFileName += ".txt"; // Lancement du profiling KWDataGridOptimizer::GetProfiler()->SetTrace(true); diff --git a/src/Learning/MODL_Coclustering/CCCoclusteringReport.cpp b/src/Learning/MODL_Coclustering/CCCoclusteringReport.cpp index 791cc9ab5..7b686cafe 100644 --- a/src/Learning/MODL_Coclustering/CCCoclusteringReport.cpp +++ b/src/Learning/MODL_Coclustering/CCCoclusteringReport.cpp @@ -1692,9 +1692,13 @@ boolean CCCoclusteringReport::ReadComposition(CCHierarchicalDataGrid* coclusteri { // Tolerance pour les typicalite negatives if (dTypicality < 0) + { AddWarning(sTmp + "Value specification (" + sValueName + ") with typicality less than 0 for variable " + - dgAttribute->GetAttributeName()); + dgAttribute->GetAttributeName() + + " (replaced by 0)"); + dTypicality = 0; + } // Erreur pour les typicalite supereures a 1 else { @@ -3906,10 +3910,13 @@ boolean CCCoclusteringReport::ReadJSONTypicalities(KWDGAttribute* dgAttribute, i // Tolerance pour les typicalite negatives if (dValueTypicality < 0) + { AddWarning(sTmp + "Typicality (" + DoubleToString(dValueTypicality) + ") less than 0 for variable " + dgAttribute->GetAttributeName() + " in \"valueTypicalities\" line " + - IntToString(JSONTokenizer::GetCurrentLineIndex())); + IntToString(JSONTokenizer::GetCurrentLineIndex()) + " (replaced by 0)"); + dValueTypicality = 0; + } // Erreur pour les typicalite supereures a 1 else if (dValueTypicality > 1) { diff --git a/src/Learning/MODL_Coclustering/MODL_Coclustering.cpp b/src/Learning/MODL_Coclustering/MODL_Coclustering.cpp index f50a79823..40ff76623 100644 --- a/src/Learning/MODL_Coclustering/MODL_Coclustering.cpp +++ b/src/Learning/MODL_Coclustering/MODL_Coclustering.cpp @@ -36,6 +36,7 @@ int main(int argc, char** argv) // Choix du repertoire de lancement pour le debugage sous Windows (a commenter apres fin du debug) //SetWindowsDebugDir("y_CoclusteringIV_Standard", "IrisLight"); //SetWindowsDebugDir("y_CoclusteringIV_Standard", "Iris"); + SetWindowsDebugDir("Bugs", "NegativeTypicalities"); // Point d'arret sur l'allocation d'un bloc memoire // MemSetAllocIndexExit(77);