Feedback about Warm-up: numpy - on the Polynomial (Mis)Fit Example in the Tensors Tutorial
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 9.3k
- Forks
- 4.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
Hi there,
I was looking at the tutorial on fitting a polynomial with NumPy and PyTorch:
https://docs.pytorch.org/tutorials/beginner/examples_tensor/polynomial_numpy.html
I noticed that the resulting third-degree polynomial is not a very good fit for the sin(x) function it's supposed to approximate:
f(x) = 0.0003655185795843861 + 0.8513230793867113 x + -6.305803723372667e-05 x² + -0.09255975933441395 x³
You can see a graph of both functions here—they look pretty different:
https://www.geogebra.org/calculator/qyykjrjf
My concern is that this might be a confusing example for beginners. It could give them the wrong impression of what a good result looks like when using PyTorch.
Cheers,
Carlos Rogério Camargo
cc @albanD @jbschlosser
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the polynomial NumPy tutorial at docs.pytorch.org/tutorials/beginner/examples_tensor/polynomial_numpy.html and reproduce the reported comparison with sin(x). Check whether the example or its explanation needs correction, and consider the work complete when the tutorial gives beginners an accurate, clearly explained interpretation of the fit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python, pytorch
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100