Possible Inconsistency and Variable Naming in Exercise 8.13 (Page 269)

未关闭 适合新手
#234 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1-3 小时
新手友好度
67/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
领域
documentation

调研方向

在本书的补充材料中找到第269页Exercise 8.13的代码。检查散点图的变量名和unit 43标签的位置,然后将它们与后续的fitlm排除步骤进行比较。完成标准是命名清晰且图中的标签易于阅读;该issue没有指出具体文件或测试。

由索引模型根据 Issue 内容生成。

描述

Suggestion for the next edition

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.

Image

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!

主要语言
MATLAB
星标
30
派生
1
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

UniprJRC/DSwithMATLAB 的其他 Issue

查看 UniprJRC/DSwithMATLAB 的全部 Issue

相似的 Issue

更多 MATLAB Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。