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

Chapter 10 Question 7 #108

Open
s17k opened this issue Jun 26, 2020 · 1 comment
Open

Chapter 10 Question 7 #108

s17k opened this issue Jun 26, 2020 · 1 comment

Comments

@s17k
Copy link

s17k commented Jun 26, 2020

The solution is obviously wrong because the check at the end fails (there should be no variability in this ratio).
The reason is that "scale" in R standardizes columns, not rows (which is counter-intuitive, but they do tell us to make sure that the sd of each observation, not variable is 1).
This can be solved by running dsc = t(scale(t(USArrests))) instead of dsc = scale(USArrests)

@leowang396
Copy link

agreed

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

2 participants