code/log_norm.py
def Min_Max(normalization_parameter, file_dataframe):
    """
    This function is used to data standardization.

    Parameters
    ----------
    normalization_parameter : list
    The attribute we want to normalize.
    file_dataframe : DataFrame
    The DataFrame consists of key attributes.

    Returen
    -------
    file_dataframe : DataFrame
    The DataFrame finished normalized.
    """
    normalization_parameter_result = []
    for i in normalization_parameter:
        par = file_dataframe[i].tolist()
        Max_par = max(par)
        Min_par = min(par)
        div = Max_par - Min_par
        if div == 0:
            if Max_par == 0:
                norm = par
            else:
                norm = [j / Max_par for j in par]
        else:
            norm = [round((j - Min_par) / div, 6) for j in par]
        normalization_parameter_result.append(norm)
    for j in range(len(normalization_parameter)):
        norm_name = normalization_parameter[j] + '_norm'
        file_dataframe[norm_name] = normalization_parameter_result[j]
    # file_dataframe_norm = file_dataframe.drop(normalization_parameter, axis=1)
    return file_dataframe

    This function is used to data standardization.

    Parameters
    ----------
    normalization_parameter : list
    The attribute we want to normalize.
    file_dataframe : DataFrame
    The DataFrame consists of key attributes.

    Returen
    -------
    file_dataframe : DataFrame
    The DataFrame finished normalized.
    
This function is used to data standardization.
Parameters

normalization_parameter : list
The attribute we want to normalize.

Returen


This function is used to data standardization . Parameters normalization_parameter : list The attribute we want to normalize . Returen
def Min_Max(normalization_parameter, file_dataframe):
    normalization_parameter_result = []
    for i in normalization_parameter:
        par = file_dataframe[i].tolist()
        Max_par = max(par)
        Min_par = min(par)
        div = Max_par - Min_par
        if div == 0:
            if Max_par == 0:
                norm = par
            else:
                norm = [j / Max_par for j in par]
        else:
            norm = [round((j - Min_par) / div, 6) for j in par]
        normalization_parameter_result.append(norm)
    for j in range(len(normalization_parameter)):
        norm_name = normalization_parameter[j] + '_norm'
        file_dataframe[norm_name] = normalization_parameter_result[j]
    return file_dataframe
def Min_Max ( normalization_parameter , file_dataframe ) : normalization_parameter_result = [ ] for i in normalization_parameter : par = file_dataframe [ i ] . tolist ( ) Max_par = max ( par ) Min_par = min ( par ) div = Max_par - Min_par if div == 0 : if Max_par == 0 : norm = par else : norm = [ j / Max_par for j in par ] else : norm = [ round ( ( j - Min_par ) / div , 6 ) for j in par ] normalization_parameter_result . append ( norm ) for j in range ( len ( normalization_parameter ) ) : norm_name = normalization_parameter [ j ] + '_norm' file_dataframe [ norm_name ] = normalization_parameter_result [ j ] return file_dataframe
This function is used to data standardization.
This function is used to data standardization .
"""
    This function is used to data standardization.

    Parameters
    ----------
    normalization_parameter : list
    The attribute we want to normalize.
    file_dataframe : DataFrame
    The DataFrame consists of key attributes.

    Returen
    -------
    file_dataframe : DataFrame
    The DataFrame finished normalized.
    """ # file_dataframe_norm = file_dataframe.drop(normalization_parameter, axis=1)
normalization_parameter
file_dataframe