Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue in 20.2.3 code #124

Open
alioh opened this issue Mar 22, 2021 · 0 comments
Open

Fix issue in 20.2.3 code #124

alioh opened this issue Mar 22, 2021 · 0 comments

Comments

@alioh
Copy link

alioh commented Mar 22, 2021

In 20.2 bias_modeling notebook, there is an issue with "Example: Linear Regression and Sine Waves" code, when you run it you will get "Expected 2D array, got scalar array instead".

To fix this issue, make the following changes to line 23:

  • from: return Line(x_start, x_end, clf.predict(x_start)[0], clf.predict(x_end)[0])
  • to: return Line(x_start, x_end, clf.predict([[x_start]])[0], clf.predict([[x_end]])[0])

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant