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