PDLPorters / PDLPorters/PDL-Fit
Bad fitting
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I faced with bad fitting.
This is simple code:
use PDL;
use PDL::Fit::Polynomial;
good fit
$x=sequence(10) * 0.001;
$y=1+$x-2 * $x2+3 * $x3;
wcols $x,$y,'1.dat';
($yfit, $coef) = fitpoly1d $x, $y, 4;
wcols $x,$yfit,'1fit.dat';
bad fit
$x=0.5+sequence(10) * 0.001;
$y=1+$x-2 * $x2+3 * $x3;
wcols $x,$y,'2.dat';
($yfit, $coef) = fitpoly1d $x, $y, 4;
wcols $x,$yfit,'2fit.dat';
Contributor guide
No contributing guide indexed for this repository
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 by reproducing the two examples in the issue and trace the fitpoly1d entry point used by PDL::Fit::Polynomial. Compare the outputs for the shifted and unshifted x values, then identify the expected fitting behavior before changing anything. Done means the reported shifted-input case fits correctly and both examples are covered by verification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100