Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 3
    You should not reshape the y_train since you want it as 1D array. Commented Sep 24, 2020 at 8:34
  • i have no idea why this is needed ;( Commented Dec 2, 2022 at 6:13
  • @WestCoastProjects If you read the documentation for sklearn fit, the input X and Y must both be 2D arrays, to quote the documentation X is an: ` {array-like, sparse matrix} of shape (n_samples, n_features)` Commented Jan 4, 2023 at 10:18