featureselection.py
def infogain(X, y, n_features):
    '''
    Runs infogain feature selection on the data (X) and the target values (y) and finds
    the index of the top n_features number of features.

    Args:
        X: A Numpy array containing the dataset
        y: A Numpy array consisting of the target values
        n_features: An integer specifying how many features should be selected

    Returns a list containing the indices of the features that have been selected
    '''
    score = mutual_info_classif(X, y,random_state=0)
    index = list(np.argsort(list(score))[-1*n_features:])
    index.sort()
    return index

    Runs infogain feature selection on the data (X) and the target values (y) and finds
    the index of the top n_features number of features.

    Args:
        X: A Numpy array containing the dataset
        y: A Numpy array consisting of the target values
        n_features: An integer specifying how many features should be selected

    Returns a list containing the indices of the features that have been selected
    
Runs infogain feature selection on the data (X) and the target values (y) and finds
the index of the top n_features number of features.
Runs infogain feature selection on the data ( X ) and the target values ( y ) and finds the index of the top n_features number of features .
def infogain(X, y, n_features):
    score = mutual_info_classif(X, y,random_state=0)
    index = list(np.argsort(list(score))[-1*n_features:])
    index.sort()
    return index
def infogain ( X , y , n_features ) : score = mutual_info_classif ( X , y , random_state = 0 ) index = list ( np . argsort ( list ( score ) ) [ - 1 * n_features : ] ) index . sort ( ) return index
Runs infogain feature selection on the data (X) and the target values (y) and finds
the index of the top n_features number of features.
Runs infogain feature selection on the data ( X ) and the target values ( y ) and finds the index of the top n_features number of features .
'''
    Runs infogain feature selection on the data (X) and the target values (y) and finds
    the index of the top n_features number of features.

    Args:
        X: A Numpy array containing the dataset
        y: A Numpy array consisting of the target values
        n_features: An integer specifying how many features should be selected

    Returns a list containing the indices of the features that have been selected
    '''
X
A Numpy array containing the dataset
A Numpy array containing the dataset
y
A Numpy array consisting of the target values
A Numpy array consisting of the target values
n_features
An integer specifying how many features should be selected
An integer specifying how many features should be selected