khuyentran1401 / machine-learning-articles

List of interesting articles on different topics of machine learning and deep learning
https://towardsdatascience.com/how-to-organize-your-data-science-articles-with-github-b5b9427dad37?source=friends_link&sk=4dfb338164ad6e95809d943f0dc0578e
164 stars 55 forks source link

Object-oriented programming for data scientists: Build your ML estimator #25

Open khuyentran1401 opened 4 years ago

khuyentran1401 commented 4 years ago

TL;DR

What is OOP and why it is important?

Article Link

https://towardsdatascience.com/object-oriented-programming-for-data-scientists-build-your-ml-estimator-7da416751f64

Author

Tirthajyoti Sarkar

Key Takeaways

What is OOP?

Create classes for abstract data

Why should we care about OOP?

import matplotlib.pyplot as pt

.pyplot is the method of the class matplotlib

Think about it. How do you use linear_model from sklearn. You would call

from sklearn.linear_model import LinearRegression
lm = LinearRegression()
lm.fit()

LinearRegression is a class of linear regression model. Since the .fit() of lm is different from the .fit() of other models, this is where OOP is really useful

Useful Tools

Comments/ Questions