Join 25,000+ aspiring Data Scientists and receive Python & Data Science tips every Tuesday!

Published 7 months agoย โขย 2 min read

Hi Reader,

In case you havenโt checked out the Data School blog in a while, Iโve published a few new posts:

- โFind the perfect dataset for your Data Science project ๐ฏโ
- โSimulate the Monty Hall problem in Python ๐๐๐โ
- โSolve a medical mystery with a confusion matrix ๐งชโ

These are expanded versions of past Tuesday Tips!

โSQL Tutorial for Data Scientists & Data Analysts (free)

Although Python dominated the โTop Programming Languages of 2023โ, SQL took first place when ranked by job postings ๐ฅ (source).

If youโre looking to learn SQL, the tutorial above includes 30+ lessons and 40+ practice problems you can try directly in the browser, some of which were sourced from real Data Science interviews!

When faced with a new classification problem, **Machine Learning practitioners have a dizzying array of algorithms from which to choose:** Naive Bayes, decision trees, Random Forests, XGBoost, neural networks, and many others.

**Where should you start?** For many practitioners (including myself), the first algorithm to reach for is one of the oldest in the field: Logistic regression.

**Here are a few attributes of logistic regression that make it incredibly popular:**

- Runs fast
- Highly interpretable
- Doesnโt necessarily require input features to be scaled
- Can generate a meaningful baseline without any tuning
- Easy to regularize
- Outputs well-calibrated predicted probabilities

In other words, **it helps you to get going quickly with your Machine Learning project!** You can focus your energy on building your initial ML pipeline (from data ingestion to prediction) without spending much computational time or code on model training and tuning.

Although you *can* use a ML algorithm without truly understanding it, learning how it works will ultimately help you to develop an intuition for when to use it and how to tune it.

To gain that deeper understanding, I recommend reading this lesson from my Data Science course:

๐ Logistic regression lesson (Jupyter notebook)

During this lesson, youโll learn:

- Why is it called โlogistic regressionโ if itโs used for classification?
- Why is it considered a linear model?
- How do you interpret the model coefficients?
- How does it generate class predictions?
- What are its advantages and disadvantages?

If you get stuck on any of the concepts in the lesson, the resources listed in my logistic regression guide will help you to get un-stuck!

If youโve decided to use logistic regression, youโll need to tune it in order to maximize its performance. Iโve got a short video that will teach you how to tune logistic regression in scikit-learn:

๐ Important tuning parameters for LogisticRegression (video)

For more details, check out the scikit-learn documentation.

**If you enjoyed this weekโs tip, please forward it to a friend!** Takes only a few seconds, and it really helps me grow the newsletter! ๐

See you next Tuesday!

- Kevin

P.S. I thought you said this was a linear systemโ

*Did someone awesome forward you this email? **Sign up here to receive Data Science tips every week**!*

Kevin Markham

Join 25,000+ aspiring Data Scientists and receive Python & Data Science tips every Tuesday!

Read more from Learn Data Science from Data School ๐

Hi Reader, happy Tuesday! My recent tips have been rather lengthy, so I'm going to mix it up with some shorter tips (like today's). Let me know what you think! ๐ฌ ๐ Link of the week A stealth attack came close to compromising the world's computers (The Economist) If you haven't heard about the recent "xz Utils backdoor", it's an absolutely fascinating/terrifying story! In short, a hacker (or team of hackers) spent years gaining the trust of an open-source project by making helpful...

13 days agoย โขย 1 min read

Hi Reader, Today's tip is drawn directly from my upcoming course, Master Machine Learning with scikit-learn. You can read the tip below or watch it as a video! If you're interested in receiving more free lessons from the course (which won't be included in Tuesday Tips), you can join the waitlist by clicking here: Yes, I want more free lessons! ๐ Tip #43: Should you discretize continuous features for Machine Learning? Let's say that you're working on a supervised Machine Learning problem, and...

20 days agoย โขย 2 min read

Hi Reader, I'm so excited to share this week's tip with you! It has been in my head for months, but I finally put it in writing โ๏ธ It's longer than usual, so if you prefer, you can read it as a blog post instead: Jupyter & IPython terminology explained ๐ Link of the week Python Problem-Solving Bootcamp (April 1-21) Want to improve your Python skills quickly? There's no better way than solving problems, reviewing alternative solutions, and exchanging ideas with others. That's the idea behind...

about 1 month agoย โขย 3 min read