src/syndp/utils/preprocessing.py
def do_scaling(data : pd.DataFrame, columns : list):
    '''
    scaling function for continous variable. 
    This function returns the scaled data and the scaler itself for future use.
    data : the data you want to change
    columns : continuous columns
    '''
    scaler = MinMaxScaler(feature_range=(-1,1))
    not_scaling_columns = [cols for cols in data.columns if cols not in columns ]
    data1 = data[not_scaling_columns].copy()
    
    scaler.fit(data[columns].copy())
    scaled = scaler.transform(data[columns].copy())
    scaled= pd.DataFrame(scaled, columns=columns)
    
    scaled_data = pd.concat([scaled,data1], axis=1)
    return scaled_data, scaler

    scaling function for continous variable. 
    This function returns the scaled data and the scaler itself for future use.
    data : the data you want to change
    columns : continuous columns
    
scaling function for continous variable.
This function returns the scaled data and the scaler itself for future use.
data : the data you want to change
columns : continuous columns
scaling function for continous variable . This function returns the scaled data and the scaler itself for future use . data : the data you want to change columns : continuous columns
def do_scaling(data : pd.DataFrame, columns : list):
    scaler = MinMaxScaler(feature_range=(-1,1))
    not_scaling_columns = [cols for cols in data.columns if cols not in columns ]
    data1 = data[not_scaling_columns].copy()
    scaler.fit(data[columns].copy())
    scaled = scaler.transform(data[columns].copy())
    scaled= pd.DataFrame(scaled, columns=columns)
    scaled_data = pd.concat([scaled,data1], axis=1)
    return scaled_data, scaler
def do_scaling ( data : pd . DataFrame , columns : list ) : scaler = MinMaxScaler ( feature_range = ( - 1 , 1 ) ) not_scaling_columns = [ cols for cols in data . columns if cols not in columns ] data1 = data [ not_scaling_columns ] . copy ( ) scaler . fit ( data [ columns ] . copy ( ) ) scaled = scaler . transform ( data [ columns ] . copy ( ) ) scaled = pd . DataFrame ( scaled , columns = columns ) scaled_data = pd . concat ( [ scaled , data1 ] , axis = 1 ) return scaled_data , scaler
scaling function for continous variable.
scaling function for continous variable .
'''
    scaling function for continous variable. 
    This function returns the scaled data and the scaler itself for future use.
    data : the data you want to change
    columns : continuous columns
    '''
data
pd.DataFrame
columns
list