Live data from Hacker News

Another Book on Data Science – Learn R and Python in Parallel

anotherbookondatascience.com

81–90 of 96 posts

Re: Another Book on Data Science – Learn R and Python in Parallel

#81
post #21
post #11

Earlier quoted context omitted.

I agree for the most part, but R does have a few things beyond the tidyverse: built-in dataframe support, lots of domain-specific packages, more consistent interfaces for basic statistics and machine learning models, etc. Python is definitely better for matrices (because of NumPy) and anything involving custom gradient descent methods (because of TensorFlow). I think 90% of data science content is for beginners becau…

Even if you ignore the tidyverse, the example code for "roll your own linear regressions by hand" uses the R6 object system, which is... not even one of the two popular object systems for R (which are S3 and S4). No beginner needs to learn how to write classes in R.

`no beginner needs to learn how to write classes in R`. a) using classes properly is great for all level R users; b) a major reason that classes are not widely used (for beginners) is that S3/S4 are not easy to follow. R6 provides a natural and clear way to understand and write classes (especially for beginners).

Re: Another Book on Data Science – Learn R and Python in Parallel

#82

i only read the chapter on optimization/linear programming - its far too brief and misses key concepts for it to be useful. there are no real applications of the concepts covered in the section.

Yes, it is very brief. I tried to give some useful reference books/papers/links for each subject appeared in the book. Hope that is useful if the readers are willing to dive deeper. But the concept of linear programming itself is not complex, the users are generally not required to understand simplex/interior point algorithm. If they are able to translate the actual problem into the code then it is basically done. It is not like constrained optimization for which customized treatment based on mathematical theories is more important than writing the code.

Re: Another Book on Data Science – Learn R and Python in Parallel

#83
post #11

Earlier quoted context omitted.

I agree for the most part, but R does have a few things beyond the tidyverse: built-in dataframe support, lots of domain-specific packages, more consistent interfaces for basic statistics and machine learning models, etc. Python is definitely better for matrices (because of NumPy) and anything involving custom gradient descent methods (because of TensorFlow). I think 90% of data science content is for beginners becau…

> built-in dataframe support Not an advantage if you ask me - exactly because data.frame is built in, people have been building their own versions (tibble, data.table) instead of improving it. That's how R ended up with 3 different structures that are similar but have inconsistent apis and behaviour. > lots of domain-specific packages That's true. > more consistent interfaces for basic statistics and machine learning…

> because data.frame is built in, people have been building their own versions (tibble, data.table) instead of improving it.

To make what I think your point is more explicit, people build their own things in R because R must maintain compatibility with S. So by and large, changes happen in packages and not the base language. This does lead to a proliferation of solutions for the same kinds of problems.

Re: Another Book on Data Science – Learn R and Python in Parallel

#84

Earlier quoted context omitted.

> You mean like keras? or tensorflow? Or base random forest. You know, like the original Breiman implementation. > ... > Since we're moving some big applications to keras/ TF we do use python and will be using more in the future. Not sure if I misunderstood, or you're contradicting yourself there. > R is far superior in its the quality of the packages, their documentation, their ability to behave predictably on a giv…

My point behind the keras/ TF comment is that the libraries have front ends in both python and R, so its mix mox/ dealers choice on what you like to work in (since the backends of both are identical). The primary reason to moving these to python is due to convenience/ the community. Most new work is published in python. If we find a new/ interesting model we want to implement, its probably written in python. Rather t…

> My point behind the keras/ TF comment is that the libraries have front ends in both python and R, so its mix mox/ dealers choice on what you like to work in (since the backends of both are identical).

Not as a point of argument, just additional information: R's support for keras and TF is a wrapper around the Python interface to those libraries.

Re: Another Book on Data Science – Learn R and Python in Parallel

#85
post #71

I skimmed through the book, and think it does a very poor job at showcasing how R and Python are juxtaposed in industry. To be fair, the book advertises showing R and Python code side-by-side. And that’s what it does. But it does it unlike how the languages are most often used in industry. As a quick example, I saw no tidyverse code, which is essentially the only thing keeping R in the game. Learning R from this book…

> tidyverse code, which is essentially the only thing keeping R in the game From my experience this is not the case. In biomedicine and bioinformatics few people actually use tidyverse because the data is much better represented as a matrix, and not in the "tidy" form. Outside of that corporations (well at least 2 I contracted with) used `data.table` explicitly. Join 3 ad-click dataframes matching by userID, sessionI…

I agree with your experiences.

I've only use base R for my medical data (subsetting dataframe and such). Very rarely do I need tidy and also I find the pipe operator makes debugging harder. If and when I need it I'll use it that's that.

I think R have much more packages in medical, especially statistical packages, where many fields within medical cares about inferences not just prediction/forecasting. So I disagree with the "essentially the only thing keeping R in the game". The breath of packages in R is one of the many things that keep R in the game.

The tribalism and highly bias comments makes it very toxic and harder to have an honest discord.

They are just tools, use what makes you happy and get the job done.

Re: Another Book on Data Science – Learn R and Python in Parallel

#87
post #6

Earlier quoted context omitted.

I whole heartedly agree. Python is garbage for data science. If an industrial grade NN library was written for it, plus some quant libraries, I think most people would switch. I work in finance doing data science-y things and have yet to meet anyone who doesn’t think that Python is a pile of garbage. People used to make the easy to learn argument, but Julia is even easier. And more elegant, extensible, and faster.

> If an industrial grade NN library was written for it Can you give tell us which language and industrial grade NN library you're using? Because from where I'm sitting I see that Python is the only language that gets first grade support for both Tensorflow and Pytorch. It's so ahead for working with NN that it's not even close.

I was talking about Julia, not Python. Python obviously has industrial grade NN libraries.

Re: Another Book on Data Science – Learn R and Python in Parallel

#88
post #19
post #6

Earlier quoted context omitted.

I whole heartedly agree. Python is garbage for data science. If an industrial grade NN library was written for it, plus some quant libraries, I think most people would switch. I work in finance doing data science-y things and have yet to meet anyone who doesn’t think that Python is a pile of garbage. People used to make the easy to learn argument, but Julia is even easier. And more elegant, extensible, and faster.

You, uh, don't like PyTorch and TensorFlow? I can't tell if this is sarcastic.

I was talking about Julia, not Python. Python clearly has great NN libraries and great data science libraries.

Re: Another Book on Data Science – Learn R and Python in Parallel

#89
post #11

Earlier quoted context omitted.

I agree for the most part, but R does have a few things beyond the tidyverse: built-in dataframe support, lots of domain-specific packages, more consistent interfaces for basic statistics and machine learning models, etc. Python is definitely better for matrices (because of NumPy) and anything involving custom gradient descent methods (because of TensorFlow). I think 90% of data science content is for beginners becau…

> built-in dataframe support Not an advantage if you ask me - exactly because data.frame is built in, people have been building their own versions (tibble, data.table) instead of improving it. That's how R ended up with 3 different structures that are similar but have inconsistent apis and behaviour. > lots of domain-specific packages That's true. > more consistent interfaces for basic statistics and machine learning…

> Not an advantage if you ask me - exactly because data.frame is built in, people have been building their own versions (tibble, data.table) instead of improving it. That's how R ended up with 3 different structures that are similar but have inconsistent apis and behaviour.

I've been fortunate to only work on projects that use built-in data frames, never encountered tibble or data.table in the wild.

> there is no one go-to library for ML in R (like sklearn in Python) and each package has it's own strange interface and implementation.

I still disagree here - one example being the unified interface for generalized linear models. Also, the vast majority of classifiers (RF, SVM, etc.) have similar or identical interfaces. Also, the unified `predict` interface as well. Granted, `sklearn` does have a consistent API as well.

That said, some of this is just a personal preference for the vaguely functional interface in R. The object-orientedness in Python feels a little forced for some tasks in `sklearn`.

Re: Another Book on Data Science – Learn R and Python in Parallel

#90

Earlier quoted context omitted.

You mean like keras? or tensorflow? Or base random forest. You know, like the original Breiman implementation. Python has utility. But R is far superior in its the quality of the packages, their documentation, their ability to behave predictably on a given data type. I run a machine learning shop. Right now all of the training, application, and data management is handled via R. R is simply superior in too many ways f…

> You mean like keras? or tensorflow? Or base random forest. You know, like the original Breiman implementation. > ... > Since we're moving some big applications to keras/ TF we do use python and will be using more in the future. Not sure if I misunderstood, or you're contradicting yourself there. > R is far superior in its the quality of the packages, their documentation, their ability to behave predictably on a giv…

> > R is far superior in its the quality of the packages, their documentation, their ability to behave predictably on a given data type.

> I not only disagree but I think that the exact opposite is true for each one of these points. But if things are working well in our shop, I'm not going to try to convince you otherwise.

I partially agree with you here. I'm extremely careful about what non-standard packages I use in R. Code quality varies wildly outside of these, likewise for documentation. But outside of neural networks, I've never found a package in Python that I felt better about in terms of code quality or documentation than its equivalent in R.

Post reply on HN