title: How do I solve the future warning -> % (min_groups, self.n_splits)), Warning) in python?
body: <p>When I run mean_acc() method in my program, there are % (min_groups, self.n_splits)), Warning) errors...</p>
  
  <pre><code>def mean_acc():
      models = [
          RandomForestClassifier(n_estimators=200, max_depth=3, random_state=0),
          LinearSVC(),
          MultinomialNB(),
          LogisticRegression(random_state=0)]
      CV = 6
      cv_df = pd.DataFrame(index=range(CV * len(models)))
      entries = []
      for model in models:
          model_name = model.__class__.__name__
          accuracies = cross_val_score(model, features, labels, scoring='accuracy', cv=CV)
          for fold_idx, accuracy in enumerate(accuracies):
              entries.append((model_name, fold_idx, accuracy))
      cv_df = pd.DataFrame(entries, columns=['model_name', 'fold_idx', 'accuracy'])
  
      print(cv_df.groupby('model_name').accuracy.mean())
  </code></pre>
  
  <p>These are the errors shown when I run my program with the mean_acc() method. May I know how do I solve these errors below? Please help to help me take a look at my codes above that have caused these errors, thanks!!!</p>
  
  <pre><code> % (min_groups, self.n_splits)), Warning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\model_selection\_split.py:626: Warning: The least populated class in y has only 1 members, which is too few. The minimum number of members in any class cannot be less than n_splits=5.
    % (min_groups, self.n_splits)), Warning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\model_selection\_split.py:626: Warning: The least populated class in y has only 1 members, which is too few. The minimum number of members in any class cannot be less than n_splits=5.
    % (min_groups, self.n_splits)), Warning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\model_selection\_split.py:626: Warning: The least populated class in y has only 1 members, which is too few. The minimum number of members in any class cannot be less than n_splits=5.
    % (min_groups, self.n_splits)), Warning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\linear_model\logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.
    FutureWarning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\linear_model\logistic.py:459: FutureWarning: Default multi_class will be changed to 'auto' in 0.22. Specify the multi_class option to silence this warning.
    "this warning.", FutureWarning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\linear_model\logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.
    FutureWarning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\linear_model\logistic.py:459: FutureWarning: Default multi_class will be changed to 'auto' in 0.22. Specify the multi_class option to silence this warning.
    "this warning.", FutureWarning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\linear_model\logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.
    FutureWarning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\linear_model\logistic.py:459: FutureWarning: Default multi_class will be changed to 'auto' in 0.22. Specify the multi_class option to silence this warning.
    "this warning.", FutureWarning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\linear_model\logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.
    FutureWarning)
  C:\Users\L31307\PycharmProjects\FYP\venv\lib\site-packages\sklearn\linear_model\logistic.py:459: FutureWarning: Default multi_class will be changed to 'auto' in 0.22. Specify the multi_class option to silence this warning.
    "this warning.", FutureWarning)
  </code></pre>