• About
  • Privacy Policy
  • Disclaimer
  • Contact
Soft Bliss Academy
No Result
View All Result
  • Home
  • Artificial Intelligence
  • Software Development
  • Machine Learning
  • Research & Academia
  • Startups
  • Home
  • Artificial Intelligence
  • Software Development
  • Machine Learning
  • Research & Academia
  • Startups
Soft Bliss Academy
No Result
View All Result
Home Machine Learning

Data Science: Supervised Machine Learning | by Stephan Knopp | May, 2025

softbliss by softbliss
May 10, 2025
in Machine Learning
0
Data Science: Supervised Machine Learning | by Stephan Knopp | May, 2025
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter


Question 3: Can Life Expectancy be predicted from Income?

This question will be used to demonstrate classification. Since there are no categorical values present in the data set the life expectancy is used to create two classes: high and low countries, the threshold being the 75th percentil = 77.4 years. It should be predicted if a country is in the high or low class. First create a descriptive statistic using the Pandas DataFrame describe method:

df = pd.read_csv("worldbank_development.csv", sep=',')
df = df.dropna(how='any',axis=0)
life_exp = df[df["Life expectancy at birth, total (years) [SP.DYN.LE00.IN]"] != ".."]
life_exp = life_exp["Life expectancy at birth, total (years) [SP.DYN.LE00.IN]"]
life_exp.astype(float).describe()

Output:

count    265.000000
mean 72.175783
std 7.216460
min 50.596000
25% 66.924000
50% 72.647321
75% 77.449874
max 86.089000
Name: Life expectancy at birth, total (years) [SP.DYN.LE00.IN], dtype: float64

As a classifier I used DecisionTreeClassifier from scikit-learn. When looking at a scatter plot it is clear that income and life expectancy correlate very strong. This is especially true for low income countries (below 30,000$). For countries above 50,000$ GNI the correlation is nearly zero. So further increasing the income has nearly no effect on the Life expectancy for those countries:

When evaluating the fit from the model by using a confusion matrix the results are good to very good although there are no two distinct clusters in this scatter plot. To evaluate this further metrics like accuracy (correct predictions divided by total predictions), precision (reliability of positive predictions) and recall (also known as sensitivity) can be used. The F1 score combines those two. Extra care has to be taken when one of the two groups is far more prevalent than the other. This can happen for example for rare diseases like HIV. In this case labeling all results as negative may still seems to be very accurate since in for example 99% the cases this is correct. For this reason metrics like the precision is needed.

Tags: DataKnoppLearningMachineScienceStephanSupervised
Previous Post

Raise Series A/B Funding with EIT Digital Champions 2025!

Next Post

AI updates from the past week: IBM watsonx Orchestrate updates, web search in Anthropic API, and more — May 9, 2025

softbliss

softbliss

Related Posts

Elevate marketing intelligence with Amazon Bedrock and LLMs for content creation, sentiment analysis, and campaign performance evaluation
Machine Learning

Elevate marketing intelligence with Amazon Bedrock and LLMs for content creation, sentiment analysis, and campaign performance evaluation

by softbliss
May 10, 2025
Empowering YouTube creators with generative AI
Machine Learning

Empowering YouTube creators with generative AI

by softbliss
May 9, 2025
Clustering Eating Behaviors in Time: A Machine Learning Approach to Preventive Health
Machine Learning

Clustering Eating Behaviors in Time: A Machine Learning Approach to Preventive Health

by softbliss
May 9, 2025
Not Always Bigger – O’Reilly
Machine Learning

Not Always Bigger – O’Reilly

by softbliss
May 9, 2025
Japan Develops AI-Powered Drug Design, Healthcare Robotics, Digital Health Platforms
Machine Learning

Japan Develops AI-Powered Drug Design, Healthcare Robotics, Digital Health Platforms

by softbliss
May 8, 2025
Next Post
AI updates from the past week: IBM watsonx Orchestrate updates, web search in Anthropic API, and more — May 9, 2025

AI updates from the past week: IBM watsonx Orchestrate updates, web search in Anthropic API, and more — May 9, 2025

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Premium Content

Enhance Your Business Efficiency with Microsoft CRM Solutions

Enhance Your Business Efficiency with Microsoft CRM Solutions

April 6, 2025
Scientists use Google Cloud AI products for their research

Scientists use Google Cloud AI products for their research

April 10, 2025
Researchers, Higher Ed Union Fight NIH Grant Terminations

Researchers, Higher Ed Union Fight NIH Grant Terminations

April 3, 2025

Browse by Category

  • Artificial Intelligence
  • Machine Learning
  • Research & Academia
  • Software Development
  • Startups

Browse by Tags

Amazon App Apr Artificial Berkeley BigML.com Blog Build Building Business Content Data Development Gemini generation Generative Google Guide Impact Innovation Intelligence Key Language Learning LLM LLMs Machine Microsoft MIT Mobile model Models News NVIDIA Official opinion OReilly Research Science Solutions Startup Strategies students Tech Tools

Soft Bliss Academy

Welcome to SoftBliss Academy, your go-to source for the latest news, insights, and resources on Artificial Intelligence (AI), Software Development, Machine Learning, Startups, and Research & Academia. We are passionate about exploring the ever-evolving world of technology and providing valuable content for developers, AI enthusiasts, entrepreneurs, and anyone interested in the future of innovation.

Categories

  • Artificial Intelligence
  • Machine Learning
  • Research & Academia
  • Software Development
  • Startups

Recent Posts

  • Emotional Intelligence in AI: Understanding AI Girlfriend Chatbots
  • AI updates from the past week: IBM watsonx Orchestrate updates, web search in Anthropic API, and more — May 9, 2025
  • Data Science: Supervised Machine Learning | by Stephan Knopp | May, 2025

© 2025 https://softblissacademy.online/- All Rights Reserved

No Result
View All Result
  • Home
  • Artificial Intelligence
  • Software Development
  • Machine Learning
  • Research & Academia
  • Startups

© 2025 https://softblissacademy.online/- All Rights Reserved

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?