Ajustement données
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user