uni_multiStats.py
def execute_split(X,y, columns_org, continuous, columns_dummified, train, test):
    '''
    Impute and derive the class of all missing data from each split.
    
    Args:
        X: The dataset
        y: The target values
        columns_org: column names before dummification
        continuous: column names of continuous values
        columns_dummified: column names after dummification
        train: indices of the training set
        test: indices of the test set
    
    Returns:
        Imputed and fully processed data for each split
    '''
    X = X.copy()
    [X, MinMax] = pre.scale(pd.DataFrame(X, columns = columns_dummified), continuous)
    X = np.array(X)
    X_train, X_test = X[train], X[test] 

    X_train = pd.DataFrame(X_train, columns = columns_dummified)
    X_test = pd.DataFrame(X_test, columns = columns_dummified)

    imp_dum = KNNImputer(n_neighbors = 5)

    X_train.iloc[:] = imp_dum.fit_transform(X_train)
    X_test.iloc[:]  = imp_dum.transform(X_test)

    X_train = derive_class(X_train, columns_org.drop(continuous))
    X_test  = derive_class(X_test, columns_org.drop(continuous))

    X_train = np.array(pre.rescale(X_train, continuous, MinMax))
    X_test = np.array(pre.rescale(X_test, continuous, MinMax))
    y_train, y_test = y[train], y[test]

    arr = [X_train, X_test, y_train, y_test]
    return arr

    Impute and derive the class of all missing data from each split.
    
    Args:
        X: The dataset
        y: The target values
        columns_org: column names before dummification
        continuous: column names of continuous values
        columns_dummified: column names after dummification
        train: indices of the training set
        test: indices of the test set
    
    Returns:
        Imputed and fully processed data for each split
    
Impute and derive the class of all missing data from each split.
Impute and derive the class of all missing data from each split .
def execute_split(X,y, columns_org, continuous, columns_dummified, train, test):
    X = X.copy()
    [X, MinMax] = pre.scale(pd.DataFrame(X, columns = columns_dummified), continuous)
    X = np.array(X)
    X_train, X_test = X[train], X[test] 
    X_train = pd.DataFrame(X_train, columns = columns_dummified)
    X_test = pd.DataFrame(X_test, columns = columns_dummified)
    imp_dum = KNNImputer(n_neighbors = 5)
    X_train.iloc[:] = imp_dum.fit_transform(X_train)
    X_test.iloc[:]  = imp_dum.transform(X_test)
    X_train = derive_class(X_train, columns_org.drop(continuous))
    X_test  = derive_class(X_test, columns_org.drop(continuous))
    X_train = np.array(pre.rescale(X_train, continuous, MinMax))
    X_test = np.array(pre.rescale(X_test, continuous, MinMax))
    y_train, y_test = y[train], y[test]
    arr = [X_train, X_test, y_train, y_test]
    return arr
def execute_split ( X , y , columns_org , continuous , columns_dummified , train , test ) : X = X . copy ( ) [ X , MinMax ] = pre . scale ( pd . DataFrame ( X , columns = columns_dummified ) , continuous ) X = np . array ( X ) X_train , X_test = X [ train ] , X [ test ] X_train = pd . DataFrame ( X_train , columns = columns_dummified ) X_test = pd . DataFrame ( X_test , columns = columns_dummified ) imp_dum = KNNImputer ( n_neighbors = 5 ) X_train . iloc [ : ] = imp_dum . fit_transform ( X_train ) X_test . iloc [ : ] = imp_dum . transform ( X_test ) X_train = derive_class ( X_train , columns_org . drop ( continuous ) ) X_test = derive_class ( X_test , columns_org . drop ( continuous ) ) X_train = np . array ( pre . rescale ( X_train , continuous , MinMax ) ) X_test = np . array ( pre . rescale ( X_test , continuous , MinMax ) ) y_train , y_test = y [ train ] , y [ test ] arr = [ X_train , X_test , y_train , y_test ] return arr
Impute and derive the class of all missing data from each split.
Impute and derive the class of all missing data from each split .
'''
    Impute and derive the class of all missing data from each split.
    
    Args:
        X: The dataset
        y: The target values
        columns_org: column names before dummification
        continuous: column names of continuous values
        columns_dummified: column names after dummification
        train: indices of the training set
        test: indices of the test set
    
    Returns:
        Imputed and fully processed data for each split
    '''
Imputed and fully processed data for each split
Imputed and fully processed data for each split
X
None
y
The target values
The target values
columns_org
column names before dummification
column names before dummification
continuous
column names of continuous values
column names of continuous values
columns_dummified
column names after dummification
column names after dummification
train
indices of the training set
indices of the training set
test
indices of the test set
indices of the test set