سؤال

R supports a wide range of OOP designs like s3,s4,RC and others via packages,and it's a bit overwhelming to decide on which to use and a more basic question that I have is when and where do you use OOP while doing machine learning or data analytics ,can someone answer this from a data scientist/ML practitioner point of view .

I'm aware of how OOP works in R at a superficial level ,but

should I invest time in learning OOP in R ? how practical is it from a data science point of view ?

هل كانت مفيدة؟

المحلول

I have used S3, S4 and R6 (you forgot that one in your overview ;)). I would agree with Hadley Wickham that S3 is sufficient for most tasks. However, this is only required if you start building advanced functions that operate on objects. Say for example you build a model with one function and you want to create a summary and print function for the object returned by your model building function. For general Data Science purposes I would say that it helps to know the systems but none of them are very good examples of real OOP. For that I would recommend to work in Python, Ruby or Java. All have been build with OOP in mind.

In regards to knowing OOP, I think it is vital for someone involved in ML. Not when you are prototyping in R or Python but definitely when you start working on production code. I think this Quora thread gives a good run down on when OOP becomes important in ML.

If your focus is more on statistics in R it may be of less importance.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى datascience.stackexchange
scroll top