File size: 1,324 Bytes
d7cff33
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
def most_important_features_min_max():
    """Retourne les bornes pour les features les plus importantes.
    """
    return {
        "EXT_SOURCE_3": {"min": 0.0, "max": 1.0},
        "EXT_SOURCE_2": {"min": 0.0, "max": 1.0},
        "EXT_SOURCE_1": {"min": 0.0, "max": 1.0},
        "DAYS_EMPLOYED": {"min": -29200, "max": 0},
        "PAYMENT_RATE": {"min": 0.0, "max": 1.0},
        "INSTAL_DPD_MEAN": {"min": 0.0, "max": 29200.0},
        "PREV_CNT_PAYMENT_MEAN": {"min": 0.0, "max": 21900.0},
        "AMT_ANNUITY": {"min": 0.0, "max": 100000.0},
        "CODE_GENDER": {"femme": 0, "homme": 1},
        "PREV_NAME_PRODUCT_TYPE_walk-in_MEAN": {"min": 0.0, "max": 1.0}
    }


def most_important_features_types():
    """Retourne les types attendus pour les features les plus importantes.

    Returns:
        Dict avec le nom de la feature et le type attendu ('numeric' ou 'categorical').
    """
    return {
        "EXT_SOURCE_3": "numeric",
        "EXT_SOURCE_2": "numeric",
        "EXT_SOURCE_1": "numeric",
        "DAYS_EMPLOYED": "numeric",
        "PAYMENT_RATE": "numeric",
        "INSTAL_DPD_MEAN": "numeric",
        "PREV_CNT_PAYMENT_MEAN": "numeric",
        "AMT_ANNUITY": "numeric",
        "CODE_GENDER": "numeric",  # encodé en 0/1
        "PREV_NAME_PRODUCT_TYPE_walk-in_MEAN": "numeric"
    }