Ajustement données

This commit is contained in:
2025-10-18 06:54:35 +02:00
parent 43ded8e883
commit 03c8429db4
4 changed files with 49 additions and 18 deletions

View File

@@ -69,9 +69,9 @@ function randomSex(age:number) {
let c = 0.55;
if (age < 30)
c = 0.51;
c = 0.52;
else if (age < 55)
c = 0.45;
c = 0.46;
return Math.random() < c ? "F" : "M";
}
@@ -112,8 +112,8 @@ function randomEducation(age:number) {
}
function randomWealth(education:number) {
// Ajoute un bruit gaussien (moyenne 0, écart-type 0.9)
const wealthCont = education + jStat.normal.sample(0, 0.9);
// Ajoute un bruit gaussien (moyenne 0, écart-type 0.7)
const wealthCont = education / 2 + jStat.normal.sample(0.2, 0.9);
// Classification en 4 niveaux selon la valeur continue
let wealth;