featureselection.py
def run_feature_selection(method,X,y):
    '''
    Runs the specific ranking based feature selection method.

    Args:
        method: A string that refers to the feature selection method to be used
        X: An Arraylike structure containing the dataset
        y: An Arraylike structure consisting of the target values

    Returns:
        A list containing the indices of the features that have been selected
    '''
    X=np.array(X)
    y=np.array(y)
    if method[:3] == 'cfs':
        return cfs(X, y)
    elif method[:3] == 'jmi':
        if(len(method.split("_"))==1):
            return JMI.jmi(X,y)
        else:
            return JMI.jmi(X,y, n_selected_features = int(method.split("_")[1])) 
    elif method[:4] == 'mrmr':
        if(len(method.split("_"))==1):
            return mr.mrmr(X,y)
        else:
            return mr.mrmr(X,y, n_selected_features = int(method.split("_")[1]))    
    elif method[:4] =='fcbf':
        return fcbf(X,y)
    elif method[:7] == 'reliefF':
        return reliefF(X,y,int(method[8:]))
    elif method[:8] == 'infogain':
        return infogain(X,y,int(method[9:]))

    Runs the specific ranking based feature selection method.

    Args:
        method: A string that refers to the feature selection method to be used
        X: An Arraylike structure containing the dataset
        y: An Arraylike structure consisting of the target values

    Returns:
        A list containing the indices of the features that have been selected
    
Runs the specific ranking based feature selection method.
Runs the specific ranking based feature selection method .
def run_feature_selection(method,X,y):
    X=np.array(X)
    y=np.array(y)
    if method[:3] == 'cfs':
        return cfs(X, y)
    elif method[:3] == 'jmi':
        if(len(method.split("_"))==1):
            return JMI.jmi(X,y)
        else:
            return JMI.jmi(X,y, n_selected_features = int(method.split("_")[1])) 
    elif method[:4] == 'mrmr':
        if(len(method.split("_"))==1):
            return mr.mrmr(X,y)
        else:
            return mr.mrmr(X,y, n_selected_features = int(method.split("_")[1]))    
    elif method[:4] =='fcbf':
        return fcbf(X,y)
    elif method[:7] == 'reliefF':
        return reliefF(X,y,int(method[8:]))
    elif method[:8] == 'infogain':
        return infogain(X,y,int(method[9:]))
def run_feature_selection ( method , X , y ) : X = np . array ( X ) y = np . array ( y ) if method [ : 3 ] == 'cfs' : return cfs ( X , y ) elif method [ : 3 ] == 'jmi' : if ( len ( method . split ( "_" ) ) == 1 ) : return JMI . jmi ( X , y ) else : return JMI . jmi ( X , y , n_selected_features = int ( method . split ( "_" ) [ 1 ] ) ) elif method [ : 4 ] == 'mrmr' : if ( len ( method . split ( "_" ) ) == 1 ) : return mr . mrmr ( X , y ) else : return mr . mrmr ( X , y , n_selected_features = int ( method . split ( "_" ) [ 1 ] ) ) elif method [ : 4 ] == 'fcbf' : return fcbf ( X , y ) elif method [ : 7 ] == 'reliefF' : return reliefF ( X , y , int ( method [ 8 : ] ) ) elif method [ : 8 ] == 'infogain' : return infogain ( X , y , int ( method [ 9 : ] ) )
Runs the specific ranking based feature selection method.
Runs the specific ranking based feature selection method .
'''
    Runs the specific ranking based feature selection method.

    Args:
        method: A string that refers to the feature selection method to be used
        X: An Arraylike structure containing the dataset
        y: An Arraylike structure consisting of the target values

    Returns:
        A list containing the indices of the features that have been selected
    '''
A list containing the indices of the features that have been selected
A list containing the indices of the features that have been selected
method
A string that refers to the feature selection method to be used
A string that refers to the feature selection method to be used
X
An Arraylike structure containing the dataset
An Arraylike structure containing the dataset
y
An Arraylike structure consisting of the target values
An Arraylike structure consisting of the target values