Fiche Data Prep

Action Principale : mitigateBias

Code de préparation

Script en attente de validation
Copié !
1 
2DATA casuser.applicant_data;
3call streaminit(123);
4DO i = 1 to 2000;
5IF rand('UNIFORM') > 0.6 THEN Gender = 'Male';
6ELSE Gender = 'Female';
7IF rand('UNIFORM') > 0.3 THEN HomeOwner = 'Yes';
8ELSE HomeOwner = 'No';
9Income = round(30000 + rand('UNIFORM') * 90000, 1);
10CreditScore = 500 + floor(rand('UNIFORM') * 350);
11Loan_Default = 0;
12IF (Gender = 'Male' and CreditScore < 680 and rand('UNIFORM') > 0.5) or (Gender = 'Female' and CreditScore < 640 and rand('UNIFORM') > 0.6) THEN Loan_Default = 1;
13IF CreditScore < 600 and rand('UNIFORM') > 0.4 THEN Loan_Default = 1;
14OUTPUT;
15END;
16drop i;
17 
18RUN;
19 
Actions utilisant ce script
  • fairAITools mitigateBias En cours
  • Aucune autre action n'utilise ce script exact.