Zero_to_Hero_Machine_Learning / pages /2.Introduction to Data Science.py
shwetashweta05's picture
Update pages/2.Introduction to Data Science.py
f5d4bbb verified
import streamlit as st
import numpy as np
import pandas as pd
st.header("**Data Science**")
st.subheader(":red[**What do you mean by Data Science**]")
st.write("Data Science is all about using data to find patterns, make predictions, and solve problems. It combines knowledge from fields like statistics, programming, and domain expertise to turn raw data into meaningful insights.Data Science helps us make better decisions using data.")
st.subheader(":red[**Examples of Data Science**]")
st.write("""
- **1.Netflix or YouTube Recommendations**
- Netflix uses data science to recommend shows based on what you’ve watched before.
- **2.Weather Forecasting**
- Predicting rain or sunny days based on historical weather data.
- **3.Fraud Detection in Banks**
- Detecting unusual spending patterns to prevent credit card fraud.
- **4.Sports Analytics**
- Analyzing players' performances to make better team strategies.
- **5.Healthcare**
- Predicting diseases based on patient symptoms or past data.
""")
st.subheader(":red[**What do you mean by Artificial Intelligence**]")
st.write("""Artificial Intelligence (AI) is a way of teaching computers to think and act like humans.
It means making machines smart enough to:
- Solve problems
- Make decisions
- Learn from experience
""")
st.write("AI is like giving a computer a brain but it’s not as powerful as the human brain. It follows rules and learns from data.")
st.subheader(":red[**Examples of AI in Everyday Life**]")
st.write("""
- Siri, Alexa, or Google Assistant uses AI to understand your voice and respond.
- YouTube or Netflix suggests videos based on what you like.
- AI shows you products based on your previous searches and purchases.
- AI-powered chat systems answer customer questions on websites.
""")
st.subheader(":red[**What do you mean by Machine Learning**]")
st.write("**Machine learning**- is a subset of AI, which uses algorithms that learn from data to make predictions. These predictions can be generated through supervised learning, where algorithms learn patterns from existing data, or unsupervised learning, where they discover general patterns in data. ML models can predict numerical values based on historical data, categorize events as true or false, and cluster data points based on commonalities.")
st.subheader(":red[**Examples of Machine Learning**]")
st.write("""
- Gmail uses ML to identify and filter spam emails.
- Siri or Google Assistant learns to understand your voice commands better over time.
- Amazon shows products you might like based on your past purchases.
- Banks use ML to detect unusual transactions and prevent fraud.
- Cars use ML to understand road signs
""")
st.subheader(":red[**Types of Machine Learning**]")
st.write("Machine Learning can be divided into three main types based on how the model learns from data:")
st.subheader(":blue[**1. Supervised Learning**]")
st.write("In supervised learning, the machine is trained using labeled data, meaning the data comes with input-output pairs. The model learns to predict the output from the input by identifying patterns in the data.")
st.write("""**Examples:**
- Predicting house prices based on size, location, and number of rooms.
- Email classification: Sorting emails as "spam" or "not spam."
""")
st.subheader("**Types of Supervised Learning:**")
st.write("**1.Regression:** Predicting continuous values.Example: Predicting a person’s salary based on their experience.")
st.write("**2.Classification:** Predicting discrete categories.Example: Determining whether an email is spam or not.")
st.subheader(":blue[**2. Unsupervised Learning**]")
st.write("In unsupervised learning, the data has no labels. The model identifies hidden patterns or groups within the data without guidance.")
st.write("""**Examples:**
- Customer segmentation: Grouping customers based on their buying behavior.
- Recommendation systems: Suggesting products based on similar users.
""")
st.subheader("**Types of Unsupervised Learning:**")
st.write("**1.Clustering:** Grouping data points into similar clusters.Example: Grouping movies by genre based on viewers’ preferences.")
st.write("**Dimensionality Reduction:** Reducing the number of features in the data.Example: Compressing image data for faster processing.")
st.subheader(":blue[**3. Reinforcement Learning**]")
st.write("Reinforcement learning is about learning by trial and error. The model learns to make a sequence of decisions to maximize a reward.")
st.write("""**Examples:**
- Learning to drive by interacting with the road environment.
- Training a robot to walk by rewarding good steps.
""")
st.image("machine.jpg")
st.subheader(":red[**What do you mean by Deep Learning**]")
st.write("Deep Learning is a specialized field of Machine Learning where machines learn from data using structures called neural networks.These networks are designed to work like the human brain with layers of \"neurons\" processing information step by step.It’s like teaching a machine to think by showing it lots of examples and letting it learn on its own.")
st.write("""**Examples:** 1.Imagine you want a computer to recognize handwritten digits (like on checks):
- Input Data: Provide many images of handwritten numbers with labels (e.g., “This is 5”).
- Training: A neural network learns the patterns in these images, like the curves of "5."
- Prediction: When you show it a new handwritten digit, it predicts what number it is.
- 2.Understand and respond to your voice using deep learning.
- 3.Unlocking your phone by recognizing your face.
- 4.Identifying diseases from X-rays or MRI scans.
- 5.Suggesting what to watch next based on your viewing history.
""")
st.subheader(":red[**Types of Neural Networks in Deep Learning**]")
st.write(""":blue[**1.Convolutional Neural Networks (CNNs):**]
- Used for image and video processing.
- Detecting objects in photos, like identifying dogs in an image.
""")
st.write(""":blue[**2.Recurrent Neural Networks (RNNs):**]
- Used for sequential data, like text or speech.
- Predicting the next word in a sentence (e.g., in chat apps).
""")
st.write(""":blue[**3.Generative Adversarial Networks (GANs):**]
- Used to create new data similar to what it has seen.
- Generating realistic images of non-existent people.
""")
st.write(""":blue[**4.Transformers:**]
- Used for language tasks, powering tools like ChatGPT.
- Translating languages or summarizing text.
""")