Possible Inconsistency and Variable Naming in Exercise 8.13 (Page 269)
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 67/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- documentation
Research direction
Locate the code for Exercise 8.13 on page 269 in the book’s supplementary materials. Review the scatter plot variable names and the label placement for unit 43, then compare them with the later fitlm exclusion step. Done means the naming is clear and the plotted label is readable; the issue does not identify a specific file or test.
Written by the indexing model from the issue text.
Description
Dear Professors,
While testing Exercise 8.13 on page 269, I noticed a small detail regarding variable naming and coordinate positioning in the 3D scatter plot snippet.
In the code snippet for Exercise 8.13:
sel = [9 30 31 38 47 21];
scatter3(X(sel,1), X(sel,2), y(sel), 'r', 'MarkerFaceColor', 'r')
sel1 = 43;
scatter3(X(sel1,1), X(sel1,2), y(sel1), 'k', 'MarkerFaceColor', 'k')
text(X(sel1,1), X(sel1,2), y(sel1), '43')
Using sel for the six outliers and sel1 for unit 43 creates a slight naming collision/confusion when moving to the fitlm model refitting step further down page 269, where sel is reused to specify the excluded units:
sel = [9 30 31 38 47 21];
out = fitlm(X, y, 'Exclude', sel)
Additionally, calling text() with the exact coordinates of unit 43 renders the label '43' directly over the black marker point, making it hard to read depending on the 3D rotation angle.
Also, maybe I suggest adding a small spatial offset to the text command can improve the readability ex:
text(X(sel1,1) + 0.1, X(sel1,2), y(sel1), '43')
Thanks again for your time!
- Dominant language
- MATLAB
- Stars
- 30
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from UniprJRC/DSwithMATLAB
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
UniprJRC/DSwithMATLAB#243 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
UniprJRC/DSwithMATLAB#242 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
UniprJRC/DSwithMATLAB#241 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
UniprJRC/DSwithMATLAB#240 ·
-
Suggestion for the next edition
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UniprJRC/DSwithMATLAB#238 · 2 comments ·
All issues in UniprJRC/DSwithMATLAB
Similar issues
-
bug priority: p3 size: xs
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
Ax/Atb trim the caller's GpuIds in place, so blocksize-1 solvers run on one GPU after the first anglePossibly taken @AnderBiguri claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
mathworks/MATLAB-Coding-Guidelines#7 · 3 comments ·