- Hustle Hub
- Posts
- Hustle Hub #20
Hustle Hub #20
🛖 How to Reduce Bias in Machine Learning Models, Building Side Hustle, & More
New to Hustle Hub? Make sure to subscribe for more!
Read Time: 5 minutes
Hey friends,
Hope you enjoyed the issue last week.
Recently I’ve been thinking of interviewing data experts (i.e. data scientist, data engineer, ML engineer) for them to share their career journeys and learning experience in our weekly issues. The interviews will be done in Q&A format and packed with actionable advice to transform your career, including:
How to learn data science
How to build a data science portfolio
How to prepare for interviews
How to land a job
Mistakes and lessons learned
… and more career secrets 👀
Do you think this interview will be useful to you? Reply to this email and let me know! 🤝🏻
In today's issue, I’d like to share with you some tips to reduce bias (or underfitting) in ML models, the risk of relying on a single source of income, and a cool Python tool (Atri) to build websites.
Let’s get started! 🚀
🛖 What's in the hub today?
Tip: How to reduce bias in machine learning models
Mistake: I relied on a single source of income
Learning: Start building your side hustle
Book: Losing My Virginity
Tool: Build websites using Atri (Python web framework)
⭐️ 1 Tip
How to Reduce Bias in Machine Learning Models
When it comes to building ML models, balancing between bias and variance is often tricky as it involves a lot of testing and experimentation.
But what exactly are bias and variance? Here’s my layman’s definition:
Bias — How well our model predicted the value over the actual value.
High Bias: The model didn’t learn well from training data, hence the model is underfitting.
Low Bias: The model learned well from training data, hence the model is accurate.
Variance — How well our model predicted using validation or testing data.
High Variance: The model memorised only the training data. Although the model performed well using training data, it failed using validation or testing data, hence the model is overfitting.
Low Variance: The model learned well from training data, hence the model was able to perform well when using validation or testing data, hence the model is consistent.
When a model has high bias, it’s said to be underfitting. Here are some tips to reduce avoidable bias:
Increase the model size
Model size could mean the number of neurons or layers in a neural network. Essentially, you’re making the model more complex to allow it to learn the more complex pattern from training data.
Reduce regularisation
If you used regularisation in your model and it has high bias, reducing (or removing) regularisation would help reduce bias.
As this would increase variance, hence it’s important to test and find the balance.
Use more relevant features
This is what we call features engineering. One of the reasons why the model didn’t learn well (high bias) is that the input features were not useful for the model to learn important patterns from training data. Garbage in, Garbage out.
There are many ways to do features engineering. The bottom line is to understand the business domain, know what features could be useful for the model to learn and feed those features for model training.
This approach is often more effective than doing hyperparameters tuning blindly.
⚠️ Adding more training data would not help reduce bias in a model.
As the model couldn’t learn the important patterns from the existing training data, adding more training data would make no difference.
I hope these tips are helpful to reduce bias in a ML model.
👉🏻 Let me know if you want me to also talk about handling ML models with high variance. I’ll consider sharing that in my next issue!
⚠️ 1 Mistake
When I first started out in my career, my focus was to have a stable job, earn a salary, pay off my student loan, save some money, and that’s it.
I thought that’s how money is made. Work for a stable job, make $$, save $$, and repeat.
But I soon realised I was wrong.
I settled on a short-term stable job for long-term financial risk.
What if I got fired today? Would I still be able to pay off my student loan?
What if there’s a massive layoff today due to an economic downturn? Could I still survive?
Is a full-time job really that stable when we all are purely numbers under the company’s balance sheets?
That’s when I realised I was taking short-term comfort for a long-term risk because I relied on a single source of income.
And I freaked out.
🧠 1 Learning
This is especially true during the massive tech layoff nowadays. Job security is fake and every job is replaceable.
Amazon: 18,000 jobs cut
Alphabet: 12,000 jobs cut
Microsoft: 10,000 jobs cut
Meta: 11,000 jobs cut
Some people who have been loyal and working at a company for 30 years got laid off due to cost-cutting measures.
Again, at the end of the day, we all boil down to numbers. If the numbers no longer make sense to a company financially, the numbers would be removed, hence the layoff.
🧠 Here’s what I’ve learned:
🔥 Start building your side hustle.
Don’t rely on your full-time income. Explore your passion, do what you love, and make some side income along the way.
For example, I love teaching data science and helping companies solve business problems using data.
So I started building my side hustle and have been earning side income from multiple income streams along the way.
Skills > Money
Learn new skills that the market needs and people are willing to pay for.
Once you have the skills, start selling and making money. Don’t wait.
Once your side income > full-time income, consider quitting your job to build a business around your side hustle (if you want).
📚️ 1 Book
This is an autobiography written by Richard Branson himself. For the record, Richard Branson has nearly a hundred successful ventures, from the airline business (Virgin Atlantic Airways), music (Virgin Records), to cola (Virgin Cola) to other financial services.
After reading his book, I was very inspired by his grit and how he overcame all the challenges throughout his entrepreneurial life — something that I think we can apply in our life or business.
📚️ Here are my takeaways from the book:
Screw it, just do it. Sometimes, all you need is just to take action and the rest will follow.
Always have a big picture at the forefront of your mind.
Praise people and look for the best in them.
Give it a try for everything in life. Experience it and have fun.
In life, try to do something different. You won't regret trying new things. But you'll regret not trying them.
Sometimes, you need to make a fool of yourself to succeed in business.
Don't live in the past, but live for the future.
Be prepared to expect the unexpected.
👉🏻 Have you read this book? What's your thought on it?
🧰 1 Tool
Because before Atri framework, Django was the only framework available to build web apps, hence the limitations.
So when I first saw this new Python framework to build full-stack web development, I was super pumped (and it’s backed by Y Combinator!)
Here are what you can build using Atri framework:
Frontend development: Use a powerful visual builder to create frontend or write React code.
Backend development: Write backend using Python API that is inspired from Unity's game engine.
Deployment support: Use CLI to deploy at your platform of choice such as AWS, GitHub Pages, etc. (or Atri cloud).
If you’re a Python lover, you’ll love Atri framework. Give it a shot and let me know how it goes!
You can also watch the 1-min introduction video on what you can build with Atri framework. 👇🏻
🚀 Whenever you’re ready, there are 4 ways I can help you:
Book a coaching call with me if you need help in the following:
• How To Get Into Data Science
• LinkedIn Growth, Content Strategy & Personal Branding
• 1:1 Mentorship & Career Guidance
• Resume Review
Promote your brand to ~1000 subscribers in the data/tech space by sponsoring this newsletter.
Watch my YouTube videos where I talk about data science tips, programming, and my tech life (P.S. Don’t forget to like and subscribe 💜).
Follow me on LinkedIn and Twitter for more data science career insights, my mistakes and lessons learned from building a startup.
That's all for today
Thanks for reading. I hope you enjoyed today's issue. More than that, I hope it has helped you in some ways and brought you some peace of mind.
You can always write to me by simply replying to this newsletter and we can chat.
See you again next week.
- Admond
Reply