def select_k_best(self, k):
        """Selects k best features in dataset

        :param k: features to select
        :return: k best features
        """
        x_new = SelectKBest(chi2, k=k).fit_transform(self.x_train, self.y_train)
        return x_new
def select_k_best ( self , k ) : x_new = SelectKBest ( chi2 , k = k ) . fit_transform ( self . x_train , self . y_train ) return x_new
Selects k best features in dataset

        :param k: features to select
        :return: k best features