
Hello friends!
Welcome to this week’s Sloth Bytes.
I hope you had an amazing 2 weeks, sorry missing last week!

🦥 No selling out today
I am genuinely considering selling feet pics, so if you work at a company with a marketing budget please forward this to your boss immediately or the feet come out.

Sloths are introverts
Sloths prefer to be alone and don't like being touched. If you get too close, they might hurt you. They protect themselves with their sharp teeth and claws.

Machine Learning For Dummies

Ever wanted to make computers learn from data? Create models that predict things? Or create the next ChatGPT?
Let me show you how Machine Learning works in simple terms.
Why Machine Learning?
Because it’s useful when the rules are hard to hand-code but you have enough representative data to learn a pattern. Machine learning does not replace traditional programming; most real systems use both.
And no, the computer is not literally “thinking.” A model is learning parameters that help it map inputs to useful outputs.
But Isn't It Super Complex?
It can get math-heavy, especially as you go deeper, but you do not need to master every derivation before building useful models. Probability, statistics, linear algebra, optimization, and some calculus become increasingly useful depending on what you’re studying.
Let's break it down into pieces you can understand.
Types of Machine Learning
Think of these as different ways computers can learn:
Supervised Learning: Learn from labeled examples.
You provide inputs plus known target answers.
The model learns a mapping from features to labels or numeric values.
Common examples: spam classification, fraud detection, price prediction.
Unsupervised Learning: Look for structure without target labels.
You provide the input data but no “correct answer” column.
Common tasks include clustering and dimensionality reduction.
Anomaly detection can be supervised, semi-supervised, or unsupervised depending on the data and method.
Self-Supervised Learning: Create training targets from the data itself.
For example, predict a hidden or next piece of text from surrounding text.
This is a major way modern language and vision models learn from huge unlabeled datasets.
Reinforcement Learning: Learn a policy by interacting with an environment.
An agent takes actions, observes outcomes, and receives rewards.
The challenge is maximizing long-term reward, not simply matching a labeled answer.
Common examples: games, robotics, control systems, and some model-alignment techniques.
What about those fancy neural network things?
Neural networks are a family of models, not a separate learning type. They can be trained with supervised, self-supervised, unsupervised, or reinforcement-learning objectives. Modern deep-learning systems use neural networks for everything from image classification to language models.
A better mental model than “artificial brain” is a large mathematical function with many adjustable parameters. Training changes those parameters so the model’s outputs better match the objective you care about.
How do I get started?
You'll need:
Python — the most common language in the ML ecosystem
Data skills — cleaning, visualization, SQL, and understanding where your dataset came from
Math — especially probability/statistics and linear algebra; calculus and optimization matter more as you go deeper
Software engineering — reproducible code, tests, versioning, and monitoring still matter
Curiosity — lots of it
Essential Programming Tools
These are your best friends:
Python Libraries
NumPy (for numbers)
Pandas (for data)
Scikit-learn (for ML)
TensorFlow/PyTorch (for deep learning)
Start Small
Don't try to build ChatGPT on day one.
Begin with supervised learning with Linear regression and Logistic Regression
The Basic ML Workflow
A model that scores well on the data it already saw has proven almost nothing. The real question is whether it generalizes to new data.
Define the task and metric. Decide what you are predicting and how success will be measured. Accuracy is not always the right metric—precision, recall, F1, ROC-AUC, MAE, RMSE, or another task-specific metric may matter more.
Split the data. Training data teaches the model. Validation data helps choose models and tune hyperparameters. The test set should stay untouched until the end so it gives you an honest final estimate.
Fit preprocessing on training data only. Imputation, scaling, feature selection, and similar learned preprocessing must not peek at the validation or test set. Otherwise you create data leakage.
Train the model. The algorithm adjusts parameters to reduce a loss or objective on the training data.
Evaluate and iterate. Compare training and validation performance, inspect errors, and change the data/features/model deliberately.
Test once you’re done choosing. Repeatedly tuning against the test set quietly turns it into another validation set.
Overfitting vs underfitting
Overfitting means the model learned the training data too specifically and performs worse on new examples. Underfitting means it has not captured enough of the underlying signal even on the training data.
More complexity is not automatically better. Better data, better features, regularization, more representative examples, or a simpler model can all beat “make the neural network bigger.”
Watch the metric
A model can be “95% accurate” and still be useless. If only 1% of transactions are fraud, a model that predicts “not fraud” every time is 99% accurate and catches exactly zero fraud cases. Always choose metrics that match the real cost of mistakes.
Free Resources
Tons of places to learn:
YouTube tutorials
Online courses
Remember
Start with a simple baseline before a fancy model
Keep training, validation, and test roles separate
Prevent data leakage during preprocessing and feature engineering
Use metrics that match the actual problem
Compare against a naive baseline so you know the model is adding value
Inspect errors instead of staring only at one score
Expect production data to drift after deployment—evaluation is not a one-time event
If you want to keep learning
Data cleaning explained — because your model is only as smart as the messy spreadsheet you feed it.
Federated learning explained — see how models can train across devices without centralizing raw user data.
AI agents explained — move from training models to understanding how modern AI systems use models, tools, memory, and loops.


Writer RAG tool: build production-ready RAG apps in minutes
RAG in just a few lines of code? We’ve launched a predefined RAG tool on our developer platform, making it easy to bring your data into a Knowledge Graph and interact with it with AI. With a single API call, writer LLMs will intelligently call the RAG tool to chat with your data.
Integrated into Writer’s full-stack platform, it eliminates the need for complex vendor RAG setups, making it quick to build scalable, highly accurate AI workflows just by passing a graph ID of your data as a parameter to your RAG tool.
*A message from our sponsor.


Thank you to everyone who submitted 😃
mc-milo, JamesHarryT, nhillemann, trgr-boi, Yoshlix, ravener, RelyingEarth87, agentNinjaK, vinny635,levi-manoel, amirsamgoharpay, tobiaoy, taypham88, anshurajpro23, and GabrielDornelas.
Amateur Hour
Write a function that takes time t1 and time t2 and returns the number of hours passed between the two times.
Examples
hoursPassed("3:00 AM", "9:00 AM")
output = "6 hours"
hoursPassed("2:00 PM", "4:00 PM")
output = "2 hours"
hoursPassed("1:00 AM", "3:00 PM")
output = "14 hours"
hoursPassed("4:00 PM", "4:00 PM")
output = "no time passed"Notes
Time
t1will always be the starting time andt2, the ending time.Return the string
"no time passed"ift1is equal tot2.
How To Submit Answers
Reply with
A link to your solution (github, twitter, personal blog, portfolio, replit, etc)
or if you’re on the web version leave a comment!
If you want to be mentioned here, I’d prefer if you sent a GitHub link or Replit!

Working on 2 videos!
First video to come out will probably go over the whole DeepSeek situation and how to use it yourself, and the other one will be how to make money from programming!
That’s all from me!
Have a great week, be safe, make good choices, and have fun coding.
If I made a mistake or you have any questions, feel free to comment below or reply to the email!
See you all next week.






