Skip to content

Commit

Permalink
Write min, max and mode frequency under continuous precision in json …
Browse files Browse the repository at this point in the history
…files

La classe JSONFile possede deux types de methodes pour l'ecriture des nombres reel:
- WriteContinuous, WriteKeyContinuous:
  - niveau de precision des donnees elles-memes, gerees via le type Continuous, avec 10 digits de precision
  - null si valeur manquante
  - pour les valeur provenant des donnees (min, max, mean...)
- WriteDouble, WriteKeyDouble
  - niveau de precision des double en sortie (7 digits), suffisant pour l'interpretation utilisateur
  - pour les valeurs provenant des modeles (Level, Importance, Interest, courbes de lift...)

La correction porte ici sur deux indicateurs provenant des donnees, qui passe de double a  Continuous
pour l'ecriture dans les fichiers json:
- CCCoclusteringReport::WriteDimensionSummary: ecriture du min et du max
- KWDescriptiveSymbolStats::WriteJSONFields: ecriture du modeFrequency
  • Loading branch information
marcboulle committed Dec 3, 2024
1 parent 871ffb2 commit bcb37d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Learning/KWDataPreparation/KWDescriptiveStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ void KWDescriptiveSymbolStats::WriteJSONFields(JSONFile* fJSON)
// Statistiques descriptives
fJSON->WriteKeyInt("values", GetValueNumber());
fJSON->WriteKeyString("mode", GetMode().GetValue());
fJSON->WriteKeyDouble("modeFrequency", GetModeFrequency());
fJSON->WriteKeyContinuous("modeFrequency", GetModeFrequency());
fJSON->WriteKeyInt("missingNumber", GetMissingValueNumber());
fJSON->WriteKeyInt("sparseMissingNumber", GetSparseMissingValueNumber());
}
Expand Down
4 changes: 2 additions & 2 deletions src/Learning/MODL_Coclustering/CCCoclusteringReport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2230,8 +2230,8 @@ void CCCoclusteringReport::WriteDimensionSummary(CCHDGAttribute* attribute, JSON
fJSON->WriteKeyBoolean("garbage", (attribute->GetGarbageModalityNumber() > 0));
if (attribute->GetAttributeType() == KWType::Continuous)
{
fJSON->WriteKeyDouble("min", attribute->GetMin());
fJSON->WriteKeyDouble("max", attribute->GetMax());
fJSON->WriteKeyContinuous("min", attribute->GetMin());
fJSON->WriteKeyContinuous("max", attribute->GetMax());
}
fJSON->EndObject();
}
Expand Down

0 comments on commit bcb37d6

Please sign in to comment.