src/syndp/utils/preprocessing.py
def reverse_scaling(data : pd.DataFrame, columns : list, scaler : MinMaxScaler):
    '''
    reverse the scaled data to original form
    data : scaled data
    columns : continuous columns - should be the same as the original scaling process
    scaler : Minmax scaler from do_scaling function
    '''
    excluded_cols = [col for col in data.columns if col not in columns]
    
    data1 = data[excluded_cols].copy()
    inversed = scaler.inverse_transform(data[columns])
    inversed = pd.DataFrame(inversed, columns=columns)
    
    reversed_data = pd.concat([data1, inversed], axis=1)
    return reversed_data

    reverse the scaled data to original form
    data : scaled data
    columns : continuous columns - should be the same as the original scaling process
    scaler : Minmax scaler from do_scaling function
    
reverse the scaled data to original form
data : scaled data
columns : continuous columns - should be the same as the original scaling process
scaler : Minmax scaler from do_scaling function
reverse the scaled data to original form data : scaled data columns : continuous columns - should be the same as the original scaling process scaler : Minmax scaler from do_scaling function
def reverse_scaling(data : pd.DataFrame, columns : list, scaler : MinMaxScaler):
    excluded_cols = [col for col in data.columns if col not in columns]
    data1 = data[excluded_cols].copy()
    inversed = scaler.inverse_transform(data[columns])
    inversed = pd.DataFrame(inversed, columns=columns)
    reversed_data = pd.concat([data1, inversed], axis=1)
    return reversed_data
def reverse_scaling ( data : pd . DataFrame , columns : list , scaler : MinMaxScaler ) : excluded_cols = [ col for col in data . columns if col not in columns ] data1 = data [ excluded_cols ] . copy ( ) inversed = scaler . inverse_transform ( data [ columns ] ) inversed = pd . DataFrame ( inversed , columns = columns ) reversed_data = pd . concat ( [ data1 , inversed ] , axis = 1 ) return reversed_data
reverse the scaled data to original form
data : scaled data
columns : continuous columns - should be the same as the original scaling process
scaler : Minmax scaler from do_scaling function
reverse the scaled data to original form data : scaled data columns : continuous columns - should be the same as the original scaling process scaler : Minmax scaler from do_scaling function
'''
    reverse the scaled data to original form
    data : scaled data
    columns : continuous columns - should be the same as the original scaling process
    scaler : Minmax scaler from do_scaling function
    '''
data
pd.DataFrame
columns
list
scaler
MinMaxScaler