News for hackers. Stuff that matters.
Re:Introduction to Statistical Learning by noch on Tuesday August 04, 2020 @04:32PM (#24054202)
> [I]f one is wanting to learn R

A useful practice, in my experience, is to implement R code samples in some other language, like C/D. Implementing lower level math functions for oneself can also be fun instead of relying on a library, depending on one's ultimate goals/interests.

Re:Introduction to Statistical Learning by adenadel on Tuesday August 04, 2020 @05:12PM (#24054547)
I think that this is a great exercise to really learn the implementation details of the methods, but the point of ISLR is more to get scientists (and the like) up and running with the usage of these methods.
Re:Introduction to Statistical Learning by bvrstvr on Tuesday August 04, 2020 @05:19PM (#24054613)
I'm a data scientist without a formal background in programming. Can someone please explain why implementing math functions in C/D is different than doing it in R?

For example, I would assume that creating a mean function using numbers and operators would be language-agnostic.

Re:Introduction to Statistical Learning by fizixer on Tuesday August 04, 2020 @05:37PM (#24054762)
- R: the mean function is already created

- C: You will create the mean function

It's the difference between using a calculator and knowing how to multiply two 5 digit numbers with pen and paper.

You might say, "Oh but we can do that in R". Well, if you start doing that one function at a time, very soon you find yourself with R grinding to a halt.

Re:Introduction to Statistical Learning by disgruntledphd2 on Wednesday August 05, 2020 @04:25AM (#24058462)
Go look at the R source for mean sometime (you want the base function). It's not as simple as one might imagine.
Re:Introduction to Statistical Learning by cinntaile on Tuesday August 04, 2020 @05:48PM (#24054846)
If you want to you can recreate the mean function in R as well, so why would you choose to do it in another language if your goal is to learn R?
Re:Introduction to Statistical Learning by dunefox on Wednesday August 05, 2020 @07:51AM (#24059776)
No good reason for C/D/... other than the wanting to learn the particular language. Otherwise, use R or Julia to stay in the scientific domain.
Re:Introduction to Statistical Learning by iamcreasy on Tuesday August 04, 2020 @11:02PM (#24056880)
For optimal performance you need to control few things simultaneous, such as memory allocation/access. R do now allow you to access memory but C does.
Re:Introduction to Statistical Learning by dunefox on Wednesday August 05, 2020 @07:50AM (#24059767)
I think Julia would be a better choice, especially since you can directly use R & Python from it. This way you can implement the methods in a scientific language yourself and still use the original R methods.