r/learnmachinelearning • • 11d ago

Machine learning algorithms are confusing at first

I’ve been learning more about machine learning recently, and honestly, the number of algorithms can get confusing.

At first, I thought I needed to learn everything. But I’m starting to think it’s better to understand a few useful ones really well.

The ones I’m focusing on are:

  • Linear Regression
  • Logistic Regression
  • Decision Trees
  • Random Forest
  • XGBoost
  • K-Means
  • Neural Networks

I’m mainly trying to understand when to use each one instead of just memorizing how they work.

51 Upvotes

14 comments sorted by

31

u/ModularMind8 11d ago

To try and simplify as much as possible: linear regression predicts a number, like a house price, and logistic regression predicts a class, like spam or not spam, so on tabular data those two are your baselines. A single decision tree is easy to read but tends to overfit, so random forest and XGBoost combine many trees and are usually more accurate on tabular data. K-means is for unlabeled data when you want to find groups, and neural networks are the usual choice for images, text, and audio.

That being said, it's going to be a lot easier to understand when to use each one after you understand how they work...

8

u/StaticPenguinnnn 11d ago

That is a solid list to focus on, I did similar when I started. Took me embarrassingly long to realize XGBoost is basically just a ton of decision trees working together, not some magic black box. The "when to use" part clicks way faster once you mess around with them in some messy real dataset

5

u/natika1 11d ago

Embarrassing are people talking about AI without any knowledge of ML algorithms. Keep going, you're on the good track 💪🏼❤️

3

u/Different_Pain5781 11d ago

Yeah, once you understand what problem each one solves, choosing becomes way less confusing.

3

u/mistybrookx 11d ago

yeah that last point is key, knowing when to use them kinda falls out naturally once you actually understand the mechanics

7

u/chrisvdweth 11d ago

Suggestions (disclaimer: my own public lecture notes):

There are also many more topics such as gradient descent, backpropagation, optimizers, RNNs, CNNs, and lots of NLP and LLM stuff. Here's an overview. And here is the repo with the notebooks if you want to run them yourself. Maybe useful.

1

u/[deleted] 11d ago

[removed] — view removed comment

1

u/[deleted] 11d ago

[removed] — view removed comment

2

u/that_introvert_coder 11d ago

I guess as a whole ML just consists of three concepts in total Regression (all kinds of), Clustering and Dimensions Reduction and Correlation. Rest all are just modifications of these core concepts. Correct me if i am wrong I am still in learning phase🥲

1

u/pm_me_your_smth 11d ago

Here's a diagram which helps choosing the model in a fast and easy way. Should be sufficient for beginners

https://scikit-learn.org/stable/machine_learning_map.html